Life In 19x19
http://www.lifein19x19.com/

New android app "BadukAI"
http://www.lifein19x19.com/viewtopic.php?f=18&t=17784
Page 1 of 27

Author:  akigo [ Fri Sep 18, 2020 10:05 am ]
Post subject:  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.

Author:  And [ Fri Sep 18, 2020 11:31 am ]
Post subject:  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

Author:  akigo [ Fri Sep 18, 2020 12:18 pm ]
Post subject:  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 ...

Author:  ClaudeBrisson [ Sat Sep 19, 2020 2:16 am ]
Post subject:  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.

Author:  Uberdude [ Sat Sep 19, 2020 3:01 am ]
Post subject:  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.

Author:  Vargo [ Sat Sep 19, 2020 4:16 am ]
Post subject:  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.

Attachments:
badukAI40B5sec_CSDL5DH3komi75.sgf [2.13 KiB]
Downloaded 5053 times

Author:  go4thewin [ Sat Sep 19, 2020 5:47 am ]
Post subject:  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.

Author:  akigo [ Sat Sep 19, 2020 6:48 am ]
Post subject:  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.

Author:  And [ Sat Sep 19, 2020 6:50 am ]
Post subject:  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?

Author:  akigo [ Sat Sep 19, 2020 7:11 am ]
Post subject:  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.

Author:  go4thewin [ Sat Sep 19, 2020 7:35 am ]
Post subject:  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.

Author:  akigo [ Sat Sep 19, 2020 8:34 am ]
Post subject:  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 ...

Author:  And [ Sat Sep 19, 2020 8:51 am ]
Post subject:  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!) :)

Author:  Vargo [ Sat Sep 19, 2020 8:58 am ]
Post subject:  Re: New android app "BadukAI"

Among the 6 possibilities, only the first two work, the other four crash clpeak

Attachment:
Screenshot_20200919-173721_clpeak.jpg
Screenshot_20200919-173721_clpeak.jpg [ 188.7 KiB | Viewed 109548 times ]

Attachment:
Screenshot_20200919-173701_clpeak.jpg
Screenshot_20200919-173701_clpeak.jpg [ 160.59 KiB | Viewed 109548 times ]

Attachment:
Screenshot_20200919-174209_clpeak.jpg
Screenshot_20200919-174209_clpeak.jpg [ 165.42 KiB | Viewed 109548 times ]

Author:  go4thewin [ Sat Sep 19, 2020 9:11 am ]
Post subject:  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

Author:  Vargo [ Sat Sep 19, 2020 9:46 am ]
Post subject:  Re: New android app "BadukAI"

Thanks, go4thewin.
Attachment:
1.jpg
1.jpg [ 315.4 KiB | Viewed 109521 times ]

Author:  akigo [ Sat Sep 19, 2020 11:10 am ]
Post subject:  Re: New android app "BadukAI"

@Vargo

Thanks for the detailed information. Based on that I made a small change which might help. Unfortunately I don't have an Exynos 990 device, so I can't test it, but I think it's worth a try. Please download and install the APK file again (version 0.2 now).

Author:  Uberdude [ Sat Sep 19, 2020 12:28 pm ]
Post subject:  Re: New android app "BadukAI"

@akigo: I waited longer this time, and after around 2 mins it went from KG is initialising to dead/crashed.

Here's the platforms from clpeak:
vendor lib64
system vendor lib64
system vendor lib
mali
pocl
default

Author:  akigo [ Sat Sep 19, 2020 12:35 pm ]
Post subject:  Re: New android app "BadukAI"

@Uberdude

This is the same output from clpeak as Vargo's, so you might also try downloading the new version ...

Author:  akigo [ Sat Sep 19, 2020 12:59 pm ]
Post subject:  Re: New android app "BadukAI"

@Uberdude,Vargo

I forgot to say that you should uninstall the old "BadukAI" app before installing the new version.

Page 1 of 27 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/