New android app "BadukAI"
-
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
New android app "BadukAI"
Hi,
I have created a new android app "BadukAI" which allows you to play and analyse with two AIs:
1) Katago: To my knowledge the first native implementation on android. It uses the 20 blocks network from version 1.5.0 and runs on the GPU via OpenCL, so your device needs OpenCL capability (which most have nowadays). On Snapdragon 855+ processor it does about 10 nodes per second (on top OpenCL-performers like the latest Exynos 990 it should be twice as fast).
2) LeelaZero: You can choose between a 15 blocks network (trained against 40b self-play) and a 40 blocks network (LZ 273). The implementation is optimized for android and can use the DSP on recent Snapdragon chipsets so will be quite fast on such devices. On Snapdragon 855+ for example it does about 200 n/s (for 15 blocks) and 50 n/s (for 40 blocks).
Unfortunately I can't distribute the app via google play store since google forces new apps on play store to target at least SDK 29 and this SDK does not permit an app to start another executable anymore (such as leelazero or katago).
Therefore I made it available via my github page:
https://aki65.github.io/
If you are interested, you can read a complete description and download the app from there.
I have created a new android app "BadukAI" which allows you to play and analyse with two AIs:
1) Katago: To my knowledge the first native implementation on android. It uses the 20 blocks network from version 1.5.0 and runs on the GPU via OpenCL, so your device needs OpenCL capability (which most have nowadays). On Snapdragon 855+ processor it does about 10 nodes per second (on top OpenCL-performers like the latest Exynos 990 it should be twice as fast).
2) LeelaZero: You can choose between a 15 blocks network (trained against 40b self-play) and a 40 blocks network (LZ 273). The implementation is optimized for android and can use the DSP on recent Snapdragon chipsets so will be quite fast on such devices. On Snapdragon 855+ for example it does about 200 n/s (for 15 blocks) and 50 n/s (for 40 blocks).
Unfortunately I can't distribute the app via google play store since google forces new apps on play store to target at least SDK 29 and this SDK does not permit an app to start another executable anymore (such as leelazero or katago).
Therefore I made it available via my github page:
https://aki65.github.io/
If you are interested, you can read a complete description and download the app from there.
-
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"
leela-zero works in Go GridMaster and Ah Q Go. Ah Q Go was in google play. Go GridMaster is now (https://play.google.com/store/apps/deta ... gridmaster)
would be interesting version of KataGo cpu only
would be interesting version of KataGo cpu only
-
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"
And,
you are right about AhQGo and Gridmaster, but these were put into play store some time ago when the restriction I mentioned was not yet valid. This restriction applies:
- if you put a new app into play store after august 3, 2020
- if you update an existing app in play store after november 2, 2020
As far as Katago cpu version is concerned, I tested it on android and it is much slower than OpenCL version, so not really attractive at the moment in my opinion ...
you are right about AhQGo and Gridmaster, but these were put into play store some time ago when the restriction I mentioned was not yet valid. This restriction applies:
- if you put a new app into play store after august 3, 2020
- if you update an existing app in play store after november 2, 2020
As far as Katago cpu version is concerned, I tested it on android and it is much slower than OpenCL version, so not really attractive at the moment in my opinion ...
-
ClaudeBrisson
- Beginner
- Posts: 1
- Joined: Sat Sep 19, 2020 2:14 am
- Rank: 2k
- GD Posts: 0
Re: New android app "BadukAI"
You should still be able to do so, using the JNI java <-> native interface. It requires some work, since you have to wrap the executable in a C/C++ library as a code resource, but it should be possible, though.
-
Uberdude
- Judan
- Posts: 6727
- Joined: Thu Nov 24, 2011 11:35 am
- Rank: UK 4 dan
- GD Posts: 0
- KGS: Uberdude 4d
- OGS: Uberdude 7d
- Location: Cambridge, UK
- Has thanked: 436 times
- Been thanked: 3718 times
Re: New android app "BadukAI"
I'm not sure if my phone, a Huawei Mate 10 Pro, supports OpenCL. https://browser.geekbench.com/android_d ... ate-10-pro seems to suggest it does, but whilst LZ works KG gets stuck on the initialising phase.
-
Vargo
- Lives in gote
- Posts: 337
- Joined: Sat Aug 17, 2013 5:28 am
- GD Posts: 0
- Has thanked: 22 times
- Been thanked: 97 times
Re: New android app "BadukAI"
Very nice, and very strong !
A little test :
B : Crazy Stone Deep Learning set at 5Dan
v
W : BadukAI (LZ40B) 5sec/move, Exynos 990
H3, komi 7.5 (for H3 : black_1 manually, click "pass", black_2 manually, click pass, black_3 manually, click "play W")
I installed BadukAI on my phone and on a tablet, in both, I get the message "KG is dead/crashed", but with LZ, everything is perfect, and it's very easy to use.
Thanks.
A little test :
B : Crazy Stone Deep Learning set at 5Dan
v
W : BadukAI (LZ40B) 5sec/move, Exynos 990
H3, komi 7.5 (for H3 : black_1 manually, click "pass", black_2 manually, click pass, black_3 manually, click "play W")
I installed BadukAI on my phone and on a tablet, in both, I get the message "KG is dead/crashed", but with LZ, everything is perfect, and it's very easy to use.
Thanks.
- Attachments
-
- badukAI40B5sec_CSDL5DH3komi75.sgf
- (2.13 KiB) Downloaded 10012 times
-
go4thewin
- Lives with ko
- Posts: 150
- Joined: Thu Jan 23, 2020 6:09 am
- Rank: 25 kyu
- GD Posts: 0
- Has thanked: 200 times
- Been thanked: 30 times
Re: New android app "BadukAI"
Thanks for great app! I have snapdragon 625 (adreno 506 GPU w/opencl 2.0), leela works, Kata stuck on initializing like uberdude. Great speed! I get 5 visits/sec with leela. Thanks Vargo for test!
I also have a powervrsgx 6110 GPU (rockchip rk3368) with opencl 1.2 support and it says kata dead/crashed.
I also have a powervrsgx 6110 GPU (rockchip rk3368) with opencl 1.2 support and it says kata dead/crashed.
set katago to play at your level https://docdro.id/sHZU1ti or experiment with gtp4zen ( https://rb.gy/kx2ilb )
-
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"
@Uberdude,go4thewin
First initialisation of katago after app installation takes very long, since katago has to tune its opencl parameters for your device. On my phone it lasts about 4 minutes. Did you wait that long (keeping the device active) ? Give it 10 minutes just to make sure. I know this is a lot to ask but it will only be necessary on first start of katago after app installation. Subsequent initialisations will take only a few seconds.
First initialisation of katago after app installation takes very long, since katago has to tune its opencl parameters for your device. On my phone it lasts about 4 minutes. Did you wait that long (keeping the device active) ? Give it 10 minutes just to make sure. I know this is a lot to ask but it will only be necessary on first start of katago after app installation. Subsequent initialisations will take only a few seconds.
-
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"
I have a smartphone and 4 tablets. doesn't work anywhere (incompatible with your phone). this is the first android go game app that doesn't work. I've tried many different go game apps (about 20), all work.
Ah Q Go at 5 dan level thinks about 4 seconds per move (on an inexpensive tablet). is it slow?
Does anyone have KataGo working?
I do not know applications for android with KataGo. can you make it compatible with most devices?
Ah Q Go at 5 dan level thinks about 4 seconds per move (on an inexpensive tablet). is it slow?
Does anyone have KataGo working?
I do not know applications for android with KataGo. can you make it compatible with most devices?
-
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"
@Vargo,go4thewin
If katago crashes although the device supports opencl, this might be
a) because katago can't find the OpenCL library
b) because some OpenCL extensions are missing that katago needs
c) due to another not OpenCL related problem
The easiest one to investigate is a). If you would like to do so, please install the app "clpeak" from play store. If you start it, it displays a drop-down menu titled "platform:" on top of the page. If you post the platforms that can be selected there, I can check if they can be found by my app.
If katago crashes although the device supports opencl, this might be
a) because katago can't find the OpenCL library
b) because some OpenCL extensions are missing that katago needs
c) due to another not OpenCL related problem
The easiest one to investigate is a). If you would like to do so, please install the app "clpeak" from play store. If you start it, it displays a drop-down menu titled "platform:" on top of the page. If you post the platforms that can be selected there, I can check if they can be found by my app.
-
go4thewin
- Lives with ko
- Posts: 150
- Joined: Thu Jan 23, 2020 6:09 am
- Rank: 25 kyu
- GD Posts: 0
- Has thanked: 200 times
- Been thanked: 30 times
Re: New android app "BadukAI"
Thanks so much! Is this enough info? Edit: I did what you instructed with my snapdragon e ink ereader and katago works for me now on android. Amazing speed for outdated hardware, 80 visits/min!
With the other one, maybe the program is looking for libOpencl.so instead of libPVRocl.so? But regardless being able to use katago on android now is so great for me. Hopefully the sanderland's team will do the same thing you did with katrain.
With the other one, maybe the program is looking for libOpencl.so instead of libPVRocl.so? But regardless being able to use katago on android now is so great for me. Hopefully the sanderland's team will do the same thing you did with katrain.
Last edited by go4thewin on Sat Sep 19, 2020 9:38 am, edited 2 times in total.
set katago to play at your level https://docdro.id/sHZU1ti or experiment with gtp4zen ( https://rb.gy/kx2ilb )
-
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"
@go4thewin,
thank you very much for the information, this clears things up for the PowerVR:
First we have problem (a) from my last post since the library name is PowerVR-specific. This one I could probably fix.
But we also have problem (b), e.g. extension cl_khr_fp16 is missing. This one I can't change since it comes from katago code.
So I must state that katago probably won't run on the PowerVR, sorry. Perhaps I should follow And's suggestion and make an alternative cpu-only version despite its terrible speed ...
thank you very much for the information, this clears things up for the PowerVR:
First we have problem (a) from my last post since the library name is PowerVR-specific. This one I could probably fix.
But we also have problem (b), e.g. extension cl_khr_fp16 is missing. This one I can't change since it comes from katago code.
So I must state that katago probably won't run on the PowerVR, sorry. Perhaps I should follow And's suggestion and make an alternative cpu-only version despite its terrible speed ...
-
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"
akigo terrible speed ... you primarily do for people, right? many are not satisfied with the speed of existing applications? many people want to play with the 9d + bot? But I have no doubt that many will be delighted with the KataGo app! (of course, if it works for them!) 
-
go4thewin
- Lives with ko
- Posts: 150
- Joined: Thu Jan 23, 2020 6:09 am
- Rank: 25 kyu
- GD Posts: 0
- Has thanked: 200 times
- Been thanked: 30 times
Re: New android app "BadukAI"
I used the app opencl-z.apk if you want to try a different app. You just open it and it detects opencl automatically, there's nothing to select
set katago to play at your level https://docdro.id/sHZU1ti or experiment with gtp4zen ( https://rb.gy/kx2ilb )