LC0 For Android!!! History Made!!

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
abik
Posts: 740
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

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

Post by abik » Mon May 27, 2019 8:10 pm

Laskos wrote:
Sat May 25, 2019 7:58 am
Thanks. 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: 764
Joined: Sat Jul 05, 2014 5:54 am
Location: Southwest USA

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

Post by supersharp77 » Tue May 28, 2019 8:54 pm

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

User avatar
Eduard
Posts: 224
Joined: Fri Oct 26, 2018 10:58 pm
Location: Germany
Full name: Eduard Nemeth
Contact:

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

Post by Eduard » Tue May 28, 2019 9:58 pm

Great, thanks!

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

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

Post by abik » Tue May 28, 2019 10:08 pm

supersharp77 wrote:
Tue May 28, 2019 8:54 pm
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.
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: 17
Joined: Thu Nov 17, 2016 11:08 pm
Location: Cuba
Full name: Leandro Álvarez González

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

Post by lealgo » Tue May 28, 2019 10:17 pm

supersharp77 wrote:
Tue May 28, 2019 8: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: 12
Joined: Thu Jul 05, 2018 11:14 pm
Full name: Aleksei

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

Post by Aleksei » Tue May 28, 2019 11:14 pm

lealgo wrote:
Tue May 28, 2019 10:17 pm
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: 17
Joined: Thu Nov 17, 2016 11:08 pm
Location: Cuba
Full name: Leandro Álvarez González

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

Post by lealgo » Tue May 28, 2019 11:33 pm

Aleksei wrote:
Tue May 28, 2019 11:14 pm
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: 764
Joined: Sat Jul 05, 2014 5:54 am
Location: Southwest USA

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

Post by supersharp77 » Tue May 28, 2019 11:39 pm

lealgo wrote:
Tue May 28, 2019 10:17 pm
supersharp77 wrote:
Tue May 28, 2019 8: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: 12
Joined: Thu Jul 05, 2018 11:14 pm
Full name: Aleksei

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

Post by Aleksei » Wed May 29, 2019 4:58 am

lealgo wrote:
Tue May 28, 2019 11:33 pm
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: 243
Joined: Fri Mar 17, 2006 7:01 am
Location: Russia
Full name: Vladimir Medvedev
Contact:

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

Post by WinPooh » Wed May 29, 2019 9:25 am

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.

Post Reply