LC0 For Android!!! History Made!!

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: LC0 For Android!!! History Made!!

Post by abik »

Laskos wrote: Sat May 25, 2019 9:58 amThanks. How many NPS you get with Lc0 after 10s from starting position? I get around 400 on 4 cores.
On a Pixel C with default 2 threads, and 48x5 weights, about 600 nps.
supersharp77
Posts: 1242
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: LC0 For Android!!! History Made!!

Post by supersharp77 »

New Compile with weights built in.....unfortunately Arm7 compile crashed in Chess for android (engine exit)

New: There are two special test builds for those who couldn't or wouldn't fiddle with UCI Options and full paths, or maybe those using a GUI without that capability. These builds contain a small 48x5 weights file embedded into the engine itself. You'll still be able to use other weights with them, but the embedded weights will load when you didn't specify one. Get them here:

32 bits:

https://github.com/LeelaChessZero/lc0/f ... a-48x5.zip

64 bits:

https://github.com/LeelaChessZero/lc0/f ... 4-48x5.zip
Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Re: LC0 For Android!!! History Made!!

Post by Eduard »

Great, thanks!
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: LC0 For Android!!! History Made!!

Post by abik »

supersharp77 wrote: Tue May 28, 2019 10:54 pmNew: There are two special test builds for those who couldn't or wouldn't fiddle with UCI Options and full paths, or maybe those using a GUI without that capability. These builds contain a small 48x5 weights file embedded into the engine itself. You'll still be able to use other weights with them, but the embedded weights will load when you didn't specify one.
Nice to have them embedded (although for Chess for Android in particular, the new options setup is now available).
I tried both the armv7 and aarch64, and both binaries run just fine in Chess for Android, no engine exit....
lealgo
Posts: 21
Joined: Fri Nov 18, 2016 12:08 am
Location: Cuba
Full name: Leandro Álvarez González

Re: LC0 For Android!!! History Made!!

Post by lealgo »

supersharp77 wrote: Tue May 28, 2019 10:54 pm .....unfortunately Arm7 compile crashed in Chess for android (engine exit)
Hi,

May I ask which Android version you're running on that device? I've added a note on the wiki about the current builds:
The current builds are compiled using the latest Android NDK targeting the API Level 28 (equivalent to Android 9 Pie). But they're tested and run on Android 8 & 9. So older Android versions may not work. The plan is to build them for API Level 21 (Android 5.0 Lollipop and up) so they support a wider range of devices.
Also, could you try this build:

https://github.com/LeelaChessZero/lc0/f ... roid24.zip

Regards,
Leandro
Aleksei
Posts: 25
Joined: Fri Jul 06, 2018 1:14 am
Full name: Aleksei

Re: LC0 For Android!!! History Made!!

Post by Aleksei »

lealgo wrote: Wed May 29, 2019 12:17 am Hi,

May I ask which Android version you're running on that device? I've added a note on the wiki about the current builds:

Regards,
Leandro
Hi Leandro! The problem is not with the weights, but with the engine. For arm7 engines, the API level should be lowered to API 16! I always use api 16 for arm7 engines, and they all working fine. Eg for arm7 & arm8 (using NDK's toolchain).

Code: Select all

rem make_standalone_toolchain.py --arch arm --api 16 --install-dir d:\android-standalone-32
rem make_standalone_toolchain.py --arch arm64 --api 24 --install-dir d:\android-standalone-64
Here is small video, example from my 32 bit arm7 device where you can see that engine exits. http://s000.tinyupload.com/index.php?fi ... 6715416598
My device
Image
lealgo
Posts: 21
Joined: Fri Nov 18, 2016 12:08 am
Location: Cuba
Full name: Leandro Álvarez González

Re: LC0 For Android!!! History Made!!

Post by lealgo »

Aleksei wrote: Wed May 29, 2019 1:14 am Hi Leandro! The problem is not with the weights, but with the engine. For arm7 engines, the API level should be lowered to API 16! I always use api 16 for arm7 engines, and they all working fine. Eg for arm7 & arm8 (using NDK's toolchain).
Hi Aleksei,

I'll try lowering the API level. I might also try using an older NDK, as the latest one appears to have issues when targeting lower API levels.
Did you try loading the engine with DroidFish too?
Thank you for your report & hints.

Regards,
Leandro
supersharp77
Posts: 1242
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: LC0 For Android!!! History Made!!

Post by supersharp77 »

lealgo wrote: Wed May 29, 2019 12:17 am
supersharp77 wrote: Tue May 28, 2019 10:54 pm .....unfortunately Arm7 compile crashed in Chess for android (engine exit)
Hi,

May I ask which Android version you're running on that device? I've added a note on the wiki about the current builds:
The current builds are compiled using the latest Android NDK targeting the API Level 28 (equivalent to Android 9 Pie). But they're tested and run on Android 8 & 9. So older Android versions may not work. The plan is to build them for API Level 21 (Android 5.0 Lollipop and up) so they support a wider range of devices.
Also, could you try this build:

https://github.com/LeelaChessZero/lc0/f ... roid24.zip

Regards,
Leandro
Here are my tablet specs.... :) :wink:
Huawei Tablet BG2 Marshmallow 6.0 SDK 23 ART2.1.0 4cores armeabi-v7a,armeabi kernel v 3.18.22+
598 mhz-1300 mhz
Aleksei
Posts: 25
Joined: Fri Jul 06, 2018 1:14 am
Full name: Aleksei

Re: LC0 For Android!!! History Made!!

Post by Aleksei »

lealgo wrote: Wed May 29, 2019 1:33 am Hi Aleksei,

I'll try lowering the API level. I might also try using an older NDK, as the latest one appears to have issues when targeting lower API levels.
Did you try loading the engine with DroidFish too?
Hi Leandro!

NDK r19 stable version is working fine, i've tried r20 beta versions they working too, but the engines become little bit slower (which is weird).. Regarding Droidfish - same story, engine not working at all.
User avatar
WinPooh
Posts: 267
Joined: Fri Mar 17, 2006 8:01 am
Location: Russia
Full name: Vladimir Medvedev

Re: LC0 For Android!!! History Made!!

Post by WinPooh »

It would be really nice to have something like go playing Leela: https://play.google.com/store/apps/deta ... android.aq
When you install application from the Market and it just works - all work with weights being handled in internal dialogs/settings of the program.