New android app "BadukAI"

For discussing go computing, software announcements, etc.
akigo
Lives with ko
Posts: 186
Joined: Sun Jun 28, 2020 11:20 am
GD Posts: 0
Has thanked: 13 times
Been thanked: 154 times

Re: New android app "BadukAI"

Post by akigo »

lovego wrote:The new version is great! The image recognition speed is very fast, but the accuracy needs to be improved, I found that sometimes there will be extra pieces on the edge of the board. In addition, whether it can support the recognition of 9 or 13 board!
1) Your example
The decision whether an intersection is empty or occupied by black or occupied by white, is done by a neural network. This network was only trained with "unmarked" stones, so it doesn't handle numbered stones well. That's why the result is so terrible in your example.
Numbered stones introduce much more variety, so you would need a much more complex network even to differentiate between empty, black and white. So the detection would take much longer. Therefore, I'm not sure if it's worthwhile to try that. Moreover, images with numbered stones are usually generated from an sgf file anyway, so it would be easier to load that one directly into BadukAI.

2) Extra pieces on the edge of the board
I suspect that the reason for this is similar to (1): Stones on the edge look different, because there is no complete intersection. So they have to be trained. But if you generate stone images for training from a board, you get 289 interior stone images and only 72 edge stone images. So the latter are trained too little, therefore the detection on the edge is worse. But that's only a theory yet. I still have to check it.

3) Partial images (9x9, 13x13, corners/sides for tsumego)
I'm working on that ...
lovego
Dies in gote
Posts: 61
Joined: Thu Jan 21, 2021 6:17 pm
Rank: KGS 1 dan
GD Posts: 0

Re: New android app "BadukAI"

Post by lovego »

Wow, I look forward to that!
And is there an updated acceleration weight? Now the strongest is kata1-b40c256-s10499183872-d2559211369
Zeed
Beginner
Posts: 8
Joined: Mon Jan 18, 2021 3:29 pm
GD Posts: 0

Re: New android app "BadukAI"

Post by Zeed »

I'm curious if anyone else's going to find it interesting, but could you make a one color mode? So you can play with bot like the usual, but all the stones would be white or black. That would be really cool!
akigo
Lives with ko
Posts: 186
Joined: Sun Jun 28, 2020 11:20 am
GD Posts: 0
Has thanked: 13 times
Been thanked: 154 times

Re: New android app "BadukAI"

Post by akigo »

Zeed wrote:I'm curious if anyone else's going to find it interesting, but could you make a one color mode? So you can play with bot like the usual, but all the stones would be white or black. That would be really cool!
At least godave89 will also find it interesting (well ... unless you are godave89). I will add that in the next version.
Zeed
Beginner
Posts: 8
Joined: Mon Jan 18, 2021 3:29 pm
GD Posts: 0

Re: New android app "BadukAI"

Post by Zeed »

No idea who that is, but thanks, can't wait for it.
Also, when switching networks the position on the board resets so you need to save it every time before switching, is it possible to switch the network but remain the position without saving and downloading sgf every time?
akigo
Lives with ko
Posts: 186
Joined: Sun Jun 28, 2020 11:20 am
GD Posts: 0
Has thanked: 13 times
Been thanked: 154 times

Re: New android app "BadukAI"

Post by akigo »

lovego wrote:Wow, I look forward to that!
And is there an updated acceleration weight? Now the strongest is kata1-b40c256-s10499183872-d2559211369
I published an accelerated version here: https://github.com/aki65/aki65.github.i ... ag/v1.12.1
Zeed wrote:No idea who that is, but thanks, can't wait for it.
Also, when switching networks the position on the board resets so you need to save it every time before switching, is it possible to switch the network but remain the position without saving and downloading sgf every time?
You can use "Load sgf", then "Load last game" to get back the last position (created by playing or editing), so no need to save sgf.
getseclectic
Beginner
Posts: 1
Joined: Fri Dec 31, 2021 12:37 pm
Rank: 6k
GD Posts: 0
OGS: notalamer

Re: New android app "BadukAI"

Post by getseclectic »

It looks like the autosaved SGF doesn't include all the moves in order, just the final board state. Would it be possible to implement this?
akigo
Lives with ko
Posts: 186
Joined: Sun Jun 28, 2020 11:20 am
GD Posts: 0
Has thanked: 13 times
Been thanked: 154 times

Re: New android app "BadukAI"

Post by akigo »

getseclectic wrote:It looks like the autosaved SGF doesn't include all the moves in order, just the final board state. Would it be possible to implement this?
The drawback of saving all moves is that re-loading the game (and jumping to the final position to continue with it) takes much longer than the current implementation which saves and loads only the final position.

But I agree, sometimes it's desirable to keep all the moves to obtain a complete game record. So I will do something about this in the next version (possibly offering the loading of all moves as an additional option).
veikko
Beginner
Posts: 11
Joined: Fri Feb 08, 2019 6:36 pm
Rank: OGS 3k
GD Posts: 0
Has thanked: 11 times
Been thanked: 3 times

Re: New android app "BadukAI"

Post by veikko »

Something changed in BadukAI? Previously optimized 40 blocks weights worked without a problem on Snapdragon 845. Now they make KG crash (normal non-optimized weights are still functioning).
And
Gosei
Posts: 1464
Joined: Tue Sep 25, 2018 10:28 am
GD Posts: 0
Has thanked: 212 times
Been thanked: 215 times

Re: New android app "BadukAI"

Post by And »

veikko wrote:Something changed in BadukAI? Previously optimized 40 blocks weights worked without a problem on Snapdragon 845. Now they make KG crash (normal non-optimized weights are still functioning).
which version and which network?
veikko
Beginner
Posts: 11
Joined: Fri Feb 08, 2019 6:36 pm
Rank: OGS 3k
GD Posts: 0
Has thanked: 11 times
Been thanked: 3 times

Re: New android app "BadukAI"

Post by veikko »

And wrote:
veikko wrote:Something changed in BadukAI? Previously optimized 40 blocks weights worked without a problem on Snapdragon 845. Now they make KG crash (normal non-optimized weights are still functioning).
which version and which network?
BadukAI 1.12 / kata1-b40c256-s104991

Unfortunately I don't remember which BadukAI version was the last functioning. This issue began months ago.
And
Gosei
Posts: 1464
Joined: Tue Sep 25, 2018 10:28 am
GD Posts: 0
Has thanked: 212 times
Been thanked: 215 times

Re: New android app "BadukAI"

Post by And »

v1.12.0
"In particular, all this means, that loading an external optimized network (which consists of two files) now requires you to select both files, one after the other."
https://github.com/aki65/aki65.github.io/releases
do you do that?
veikko
Beginner
Posts: 11
Joined: Fri Feb 08, 2019 6:36 pm
Rank: OGS 3k
GD Posts: 0
Has thanked: 11 times
Been thanked: 3 times

Re: New android app "BadukAI"

Post by veikko »

And wrote:v1.12.0
"In particular, all this means, that loading an external optimized network (which consists of two files) now requires you to select both files, one after the other."
https://github.com/aki65/aki65.github.io/releases
do you do that?
Yes, I've selected both *.bin.gz and *.tflite.
And
Gosei
Posts: 1464
Joined: Tue Sep 25, 2018 10:28 am
GD Posts: 0
Has thanked: 212 times
Been thanked: 215 times

Re: New android app "BadukAI"

Post by And »

in this case, only akigo will probably help :)
akigo
Lives with ko
Posts: 186
Joined: Sun Jun 28, 2020 11:20 am
GD Posts: 0
Has thanked: 13 times
Been thanked: 154 times

Re: New android app "BadukAI"

Post by akigo »

Unfortunately I don't own a phone with SD 845, so I can't analyze the problem. Thus I can only hint at a few potential reasons for this:

1) Model structure
The code in BadukAI for running KG models hasn't changed for a long time, but the models themselves have (including structural changes). I wouldn't expect these to break compatibility with SD 845, but you never know. To check that, you could load the first published 40b model (from https://github.com/aki65/aki65.github.i ... tag/v1.4.1) and check if that one works.

2) Permissions
There are a lot of different file access permission models on different android versions, so accessing external model files can always be a problem. To check that, you could load the internal 20b network (it's also optimized) and check if that one works.

3) Operating system
Did you receive a system update from your phone's manufacturer recently ? I'm asking because BadukAI needs to access the neural processing unit (NPU) to run the optimized models. The interface, that it uses on SD 845 (and many other chipsets) to do so, was recently discovered to have some security flaws in rare circumstances. Some vendors took the easy way out: Instead of fixing the problem, they blocked the interface completely. I had this on one of my own phones some time ago. Very annoying, but nothing to be done about it.
If that also happened on your phone, it would explain the crash.
Post Reply