Page 18 of 37
Re: New android app "BadukAI"
Posted: Tue Nov 24, 2020 12:22 pm
by And
akigo wrote:
In my understanding they will look the same in memory. But .bin.gz loads faster, so if you have both formats available, you should prefer .bin.gz
I understand correctly, if during the game I do not connect another network, the network is loaded only once, at the beginning of the game, anyway? I have doubts after your answer because this first load time is very negligible in my opinion

Re: New android app "BadukAI"
Posted: Tue Nov 24, 2020 12:28 pm
by And
go4thewin wrote:this seems to work well. if you pre place the stones on the star points like the older style of playing go
http://gokifu.com/s/2i9-gokifu-17000101 ... shi().html then it seems like a fun game with s342 if you don't want to use the calibrated ai. I wish you could just get it to use an opening book for the first moves.
EDIT: just found out you can play the opening moves with the bigger net, then use the smaller net and hit the "load last game" button in Baduk Ai and continue your game. Thanks And, great idea
in AQGoPro there is an option "master opening book": "After turning on the opening book, if the current situation exists in the opening book, Al will automatically select the best point in the opening book to play."
Re: New android app "BadukAI"
Posted: Tue Nov 24, 2020 1:32 pm
by And
@akigo
could you add the option "opening book"? even a simple
Re: New android app "BadukAI"
Posted: Thu Nov 26, 2020 4:20 pm
by akigo
And wrote:@akigo
could you add the option "opening book"? even a simple
I think your idea (starting with a bigger net, then switching to a smaller one) is a much better solution as it is way more flexible than any opening book could ever be.
Re: New android app "BadukAI"
Posted: Sat Nov 28, 2020 9:59 am
by Amigo
could you add a 13x13 board?
Re: New android app "BadukAI"
Posted: Sat Nov 28, 2020 10:12 am
by Amigo
the opening book is easier, even a few moves would be good. it is also a way to make your program available to everyone, not just the “elite”. that is, almost everything that is now, move to "special settings". it remains just a game. for example 15k - 9d. when choosing, for example, 5k, the opening book and the network corresponding to the level are connected, etc.
Re: New android app "BadukAI"
Posted: Sat Nov 28, 2020 11:15 am
by akigo
I made a new version (0.19) which adds some features for solving tsumego and L&D problems with KataGo (of course there are specialized programs for that, but to my knowledge they don't run natively on android).
In the following explanation I assume that it is black's turn in the problem. The basic workflow is as follows:
1) Start KataGo with a 20b network and use AnalysisWideRootNoise=0.03 in the configuration. This widens KataGo's search so that "apparently bad" moves also receive proper attention (these contra-intuitive moves which are often the solution of a difficult problem).
2) Enter the problem position (you can use "pass" to enter several stones of the same color in a row). Make sure to end with a white stone so that it's black's turn.
3) Tap the dashed rectangle in the top row to restrict KataGo's analysis to the problem area: Set the "number of moves to restrict to region" to a high number (e.g. 30) to make sure that the whole analysis sequence is inside the problem area. Then click "Ok" and draw a rectangle on the board which includes the whole problem (by dragging from the top left corner to the bottom right one). Make it as small as possible to speed up search.
4) Tap "ponder" and wait until a clear favourite move emerges. This should be the solution.
Often this basic workflow will be sufficient. But there are some hard problems which require a little "tuning":
a) In L&D problems one side is enclosed. On an otherwise empty board this will give the enclosing side a winrate near 100% whether it kills or not. So the winrate difference between killing and non-killing moves will be very low which makes it very hard for an AI to find the killing one. To ease this you should "balance" the position by adding a few stones of the enclosed side in the empty corners.
b) In some L&D problems the outside is not completely solid, so that it requires some reading to see that breaking through is impossible. This is no issue for human problem solvers since they know by "convention" that breaking through is not the aim. But KataGo doesn't know this and will waste a lot of time by analysing attempts to break through. To prevent this you may add some stones to the outside (as long as they don't affect any liberties or prevent forcing moves)
And then there is this nasty thing called "ko": As the analysis is restricted to the problem rectangle there are no ko threats (with the rare exception of local ones). So KataGo will regard a sequence with a favourable ko as equally good as an unconditional one, and it will regard a sequence with an unfavourable ko as always failing. So if
1) the basic workflow doesn't yield a solution and you want to check for a solution with an unfavourable ko or
2) the basic workflow detects a solution with a favourable ko and you want to check for an unconditional solution,
then you should add another local position to the board which provides a big ko threat for the relevant color. I use this one in the top left corner
----wb
wwwwwb
wwwwwb
bbbbbb
to provide a huge threat for black. To allow KataGo executing and defending the threat you must modify the basic workflow slightly: In the popup dialog "Region" you must enter the coordinates of the threat (B19) in "Moves allowed outside rectangle for black" and the coordinates of the defense (C19) in "Moves allowed outside rectangle for white".
Keep in mind that KataGo was not designed for this use case, so don't blame it if you find a problem where all this still doesn't yield the correct solution. But in my experience it works quite often and it's fun to try.
Re: New android app "BadukAI"
Posted: Thu Dec 03, 2020 12:42 pm
by akigo
I made a new version (0.20) where I added an opening book after all. So you can now
a) make a weak network's opening stronger
b) get an "old school" human-style opening against any network if you are in the mood to do so
The opening book can be switched on and off any time in the settings.
Re: New android app "BadukAI"
Posted: Thu Dec 03, 2020 1:57 pm
by And
@akigo
here, seriously, you are a superman in terms of programming !!! as if by magic, you fulfill almost any request! and speed! superman (superbrain)! I'm no kidding. thanks!!!

Re: New android app "BadukAI"
Posted: Fri Dec 04, 2020 7:12 am
by And
if you start a new game (edit config, save), and before that the "opening book" and "play b" were enabled, then the first move is not saved to the log file. also this leads to errors. for example, if after the first move d16 you press the "ponder", then among the possible moves there is also the move d16! can be done after (edit config, save) to turn off "play b"?
Re: New android app "BadukAI"
Posted: Fri Dec 04, 2020 12:49 pm
by akigo
And wrote:if you start a new game (edit config, save), and before that the "opening book" and "play b" were enabled, then the first move is not saved to the log file. also this leads to errors. for example, if after the first move d16 you press the "ponder", then among the possible moves there is also the move d16! can be done after (edit config, save) to turn off "play b"?
Yes, I will add that in the next version.
Re: New android app "BadukAI"
Posted: Sun Dec 06, 2020 1:25 pm
by akigo
I made a new version (0.21). It fixes the strange effect that And discovered in his last post (thanks for reporting). Moreover, I added a new option "b/w board" in the settings: If ticked, the board, stones and markers are displayed in black and white which should improve readability on e-ink displays.
Re: New android app "BadukAI"
Posted: Mon Dec 07, 2020 11:03 am
by go4thewin
all these changes seem too good to be true, i never thought an app like this would exist. So if one uses the kyu-rank mode with the faster, optimized 20b net, will it still be as strong as the old 20b kyu rank bots? Its alot faster than leela zero now. it seems like no loss of strength from the old version playing against kyu rank 10. wow
Re: New android app "BadukAI"
Posted: Mon Dec 07, 2020 12:28 pm
by akigo
go4thewin wrote:So if one uses the kyu-rank mode with the faster, optimized 20b net, will it still be as strong as the old 20b kyu rank bots?
Yes, according to my test matches between the "optimized 20b" version and the "old 20b" version, there should be no significant difference.
Re: New android app "BadukAI"
Posted: Sat Dec 19, 2020 9:48 am
by akigo
I made a new version (1.0) which is now also available on google play store:
https://play.google.com/store/apps/deta ... r.baduk_ai
The 32 bit version now includes the same optimizations as the 64 bit version, so the KG 20b network is much faster. Moreover, both versions use much less storage than previous ones.