It is currently Tue Jul 27, 2021 11:27 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 361 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 19  Next
Author Message
Offline
 Post subject: Re: New android app "BadukAI"
Post #261 Posted: Sat Nov 28, 2020 10:12 am 
Dies in gote

Posts: 35
Liked others: 20
Was liked: 7
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.


This post by Amigo was liked by: go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #262 Posted: Sat Nov 28, 2020 11:15 am 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
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.


This post by akigo was liked by 2 people: And, go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #263 Posted: Thu Dec 03, 2020 12:42 pm 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
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.


This post by akigo was liked by 2 people: And, go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #264 Posted: Thu Dec 03, 2020 1:57 pm 
Lives in sente
User avatar

Posts: 773
Liked others: 155
Was liked: 134
@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!!! :clap:


This post by And was liked by: go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #265 Posted: Fri Dec 04, 2020 7:12 am 
Lives in sente
User avatar

Posts: 773
Liked others: 155
Was liked: 134
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"?

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #266 Posted: Fri Dec 04, 2020 12:49 pm 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
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.

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #267 Posted: Sun Dec 06, 2020 1:25 pm 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
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.


This post by akigo was liked by 2 people: And, go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #268 Posted: Mon Dec 07, 2020 11:03 am 
Lives with ko

Posts: 143
Liked others: 190
Was liked: 29
Rank: 25 kyu
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

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #269 Posted: Mon Dec 07, 2020 12:28 pm 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
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.


This post by akigo was liked by: go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #270 Posted: Sat Dec 19, 2020 9:48 am 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
I made a new version (1.0) which is now also available on google play store: https://play.google.com/store/apps/details?id=net.kir.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.


This post by akigo was liked by 3 people: Amigo, And, go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #271 Posted: Sat Dec 19, 2020 10:00 am 
Lives in sente
User avatar

Posts: 773
Liked others: 155
Was liked: 134
fantasy!!! Thank you very much !!!


This post by And was liked by: go4thewin
Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #272 Posted: Sun Dec 20, 2020 2:51 am 
Lives in gote

Posts: 325
Liked others: 16
Was liked: 94
Fantastic program, thanks a lot :clap: , LZ is OK, but KG doesn't work in this new version (KG is dead/crashed)
(Samsung S20+, Android 11)
Attachment:
Screenshot_20201220-104340_BadukAI.jpg
Screenshot_20201220-104340_BadukAI.jpg [ 34.37 KiB | Viewed 3033 times ]

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #273 Posted: Sun Dec 20, 2020 5:54 am 
Lives in sente
User avatar

Posts: 773
Liked others: 155
Was liked: 134
on my tablet, the new version, KG 20b is 5-6 times faster, and does not slow down at all !!!

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #274 Posted: Sun Dec 20, 2020 7:07 am 
Lives in sente
User avatar

Posts: 773
Liked others: 155
Was liked: 134
it seems impossible, but the optimized KG 20b network works just as well as the original! in the position from
https://lifein19x19.com/viewtopic.php?p=244851#p244851
the new network finds the right move very quickly and shows the win!!! incredible !!!

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #275 Posted: Sun Dec 20, 2020 4:18 pm 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
Vargo wrote:
Fantastic program, thanks a lot :clap: , LZ is OK, but KG doesn't work in this new version (KG is dead/crashed)
(Samsung S20+, Android 11)


I'm very sorry for that. Unfortunately, I can't test on android 11, since my device wasn't updated yet. So finding the cause of this crash requires some guesswork. I went through the changes from the last version and found one slightly "suspicious" part. So I changed that, thereby producing version 1.1. It's a shot in the dark, but please try if that version improves things for you.

If it still crashes, it would be revealing to know if this also happens with the 10b network or only with the 20b one.

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #276 Posted: Sun Dec 20, 2020 8:30 pm 
Lives in gote

Posts: 325
Liked others: 16
Was liked: 94
akigo wrote:
... producing version 1.1
Thank you !

I installed it. KG still doesn't work with Android 11 (10b or 20b makes no difference, KG crashes instantly) but LZ works fine.

I installed v.1.1 on my backup phone (Android 9) and everything is fine, both KG and LZ work :tmbup:

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #277 Posted: Mon Dec 21, 2020 10:47 am 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
@Vargo

Thank you for checking all that. So it seems that something is different on android 11 which the code doesn't handle correctly. I found a change between android 10 and 11 which might be responsible for that and made a test release where this is handled
https://github.com/aki65/aki65.github.io/releases/download/v1.2.0-test1/baduk_ai__arm64-v8a-rel-1.2.apk
It would be very nice if you could check if that resolves the issue.

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #278 Posted: Mon Dec 21, 2020 10:27 pm 
Lives in gote

Posts: 325
Liked others: 16
Was liked: 94
akigo wrote:
... check if that resolves the issue
Yes it does :clap:

Everything works perfectly (KG 10b, 20b, and LZ 15b, 40b).
Thank you again for this great app.

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #279 Posted: Tue Dec 22, 2020 1:20 pm 
Dies with sente

Posts: 105
Liked others: 12
Was liked: 125
Thanks for testing.

So I made an official release (1.2) with this change (available on my github page and in play store).

Top
 Profile  
 
Offline
 Post subject: Re: New android app "BadukAI"
Post #280 Posted: Wed Dec 23, 2020 11:53 am 
Lives in sente
User avatar

Posts: 773
Liked others: 155
Was liked: 134
@akigo

are you planning on making an optimized KG 40b network? maybe optional?

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 361 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 19  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group