It is currently Fri Apr 26, 2024 2:48 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
Offline
 Post subject: Leela Zero can run on Android!
Post #1 Posted: Wed Aug 01, 2018 9:39 pm 
Dies in gote

Posts: 23
Liked others: 7
Was liked: 3
There is an android app called GridMaster that can download and install LeelaZero as its engine. Check it out:

https://play.google.com/store/apps/deta ... ster&hl=en

Some tips:
- Go to Settings-> Engine to download LZ.
- After you have Leela Zero, Edit->Gtp init, and key in "time_settings 0 15 1"
for 15 seconds per move. If you don't set a time limit LZ will take forever to make a move.
- GridMaster has a way of loosing the time limit setting. If you find LZ taking too long to make a move, kill the app and restart again. It will resume from the last move.
- When making a move, do a long slide down from the top. If you find the stone for placement is concealed under you fat finger, slide off screen and do a long slide in again.

This LZ is not as brutal as the PC+GPU version, but it is still very strong. I can beat 2-3d ranking android apps, but this LZ beats me hands down.

Enjoy!


Last edited by chut on Sat Aug 04, 2018 9:40 pm, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #2 Posted: Thu Aug 02, 2018 5:20 am 
Lives with ko

Posts: 129
Liked others: 20
Was liked: 17
Gridmaster is a great app. I use the payed version. Oh indeed, he added LZ to his engine downloads and I did not know that. But the process fails here, IDK why. After retry, it says the file already exists. And it will not be listed in the list of engines.

Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #3 Posted: Thu Aug 02, 2018 7:53 am 
Dies in gote

Posts: 23
Liked others: 7
Was liked: 3
Sneegurd wrote:
Gridmaster is a great app. I use the payed version. Oh indeed, he added LZ to his engine downloads and I did not know that. But the process fails here, IDK why. After retry, it says the file already exists. And it will not be listed in the list of engines.


Unistall the app and reinstall again. That should fix it. Good luck :)


This post by chut was liked by: Sneegurd
Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #4 Posted: Fri Aug 24, 2018 7:34 am 
Dies in gote

Posts: 24
Liked others: 11
Was liked: 9
Rank: EGF 1 dan
FYI for the latest version (0.36) the time settings can be configured directly from the normal clock settings (so the extra gtp init command is not needed any more for playing 'without clock'), and for playing with clock you can now also select asymmetrical settings. Also, the startup and install behavior is improved (Engines no longer connect on the main thread, and they should reconnect less frequently).


This post by evdw was liked by: chut
Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #5 Posted: Tue Aug 28, 2018 2:59 am 
Dies in gote

Posts: 54
Liked others: 0
Was liked: 0
Rank: KGS 3 dan
i did install leelaZ into GridMaster on my asus phone, but not on my samsung tablet.
however the instruction posted here is not very clear.
i offer my experience on asus smart phone:
1. the major problem for me is setting > "+" (a page of all setting options, under Engine there is a "+" click on it) > (there are two options: from local, or from internet, if choosing "download from internet" NEVER WORKs for me, i got install failed.)
2. a workaround i found it works
; get the supposed download leelaZ file directly
from the GridMaster author's web page:
http://gridmaster.tengen.nl/engines/armv7l/
i got one of 3 files: "lz-192x15-0.15_armv7.zip.signed,"
then go back to setting > engine "+" > "from local" > then find the file you downloaded > when asked for arg, don't put anything in, just click ok. for me this way it works for my asus smart phone; but not for my tablet.

IMPORTANT
1. the file "lz-192x15-0.15_armv7.zip.signed," in it has a weight file "192x15.gz" which is a weak weight file, and no Hash ID to identify it.
2. i used PC winrar to add a strong current network weight file HASH "b1c37640" file, (downloaded from http://zero.sjeng.org/network-profiles, , unzip it become a text file, and rename it b1c37640.txt) into "lz-192x15-0.15_armv7.zip" of "lz-192x15-0.15_armv7.zip.signed," and change the only line in cmd.txt
leelaz -g --weights 192x15.gz
into
leelaz -g --weights b1c37640.txt
after all done, re-zip all four files (b1c37640.txt, 192x15.gz, cmd.txt, leelaz or remove 192x15.gz just 3 files) into ,say , "b1c37649.zip", around 50 mb, signed or regular zip files don't matter, either one works.
3. then go back to GridMaster > setting > engine "+" > "from local" > then find the file "b1c37649.zip" in your android phone > when asked for arg, don't put anything in, just click ok and wait patiently to see it finishes install leelaz.
4. this works for me to realize leelaZ for smartphone android. and i checked it with sabaki leelaZ in PC, they worked exactly the same, just that android version works slower, and the time_settings does not work as you set, say, setting 5 seconds may take about 15 to 20 seconds. I don't think this android version uses GPU, but a cpuonly version. wait when GPU android phones come to market, and hope the GridMaster's author would update cpu version to GPU android version.
5. reason for install fail may be caused by storage shortage. at least leave 2G for device storage free when install leelaz. i noticed when Grid Master runs, it sucks in 800-900 mb storage space.

---- BTW, i think this android version may reach 7 - 8 dan in fox Weiqi site, if you use time_settings 0 16 1, but it may take you 30-35 seconds per move. and the touch to put your move option you should set "double touch," otherwise, you may miss cast your move by taking default setting: one touch to casting your move.

Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #6 Posted: Wed Sep 05, 2018 3:59 pm 
Dies in gote

Posts: 24
Liked others: 11
Was liked: 9
Rank: EGF 1 dan
kyotosato wrote:
1. the major problem for me is setting > "+" (a page of all setting options, under Engine there is a "+" click on it) > (there are two options: from local, or from internet, if choosing "download from internet" NEVER WORKs for me, i got install failed.)


GridMaster uses standard webview to show the download page. Perhaps webview is broken in your Android installation? I originally intended the local file option for people that compile their own engine, but it's a good workaround for this case.

kyotosato wrote:
1. the file "lz-192x15-0.15_armv7.zip.signed," in it has a weight file "192x15.gz" which is a weak weight file, and no Hash ID to identify it.


That network file, like all the other ones for their respective sizes, is simply the latest one from http://zero.sjeng.org/. I'm surprised you think it's weak, it's supposed to be the strongest of all 192x15 networks on that page! (BTW I rename them because I don't like the long redundant hash names in the command line options. If you want to identify a network just unzip and run sha256sum.)

kyotosato wrote:

4. this works for me to realize leelaZ for smartphone android. and i checked it with sabaki leelaZ in PC, they worked exactly the same, just that android version works slower, and the time_settings does not work as you set, say, setting 5 seconds may take about 15 to 20 seconds.


The latest version of GridMaster may be a bit better with time controls.

kyotosato wrote:
I don't think this android version uses GPU, but a cpuonly version. wait when GPU android phones come to market, and hope the GridMaster's author would update cpu version to GPU android version.


Correct, all versions on my site are compiled for cpu only. I don't have time to work on GPU code, but if someone implements a generic GPU solution that compiles for Android I'll definitely update.

kyotosato wrote:
5. reason for install fail may be caused by storage shortage. at least leave 2G for device storage free when install leelaz. i noticed when Grid Master runs, it sucks in 800-900 mb storage space.


Hmm that's quite a lot; normally GridMaster is much smaller. Perhaps it has something to do with the huge networks you're using?

Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #7 Posted: Thu Sep 06, 2018 4:43 am 
Dies in gote

Posts: 54
Liked others: 0
Was liked: 0
Rank: KGS 3 dan
@evdw
thank you, the author, to response to me as a user. I pay respect to you for your effort in making this wonderful go program.
1. the program is restricted to network size. i tried to use facebook elf v1, and couldn't be loaded. my android boxes are restricted to zip size under 60mb.
2. i wasn't sure about the original network you provided, i just guess it might not be a current network. however, i shouldn't comment on something i am not sure. About weight network, currently i am interested in which current network may be stronger than facebook elf v.1; or i should say, more stable than elf v.1.
3. about suck in 600~800mb, is because if i repeatedly load network files, fail or not, they all cumulatively stay in memory storage.
4. Actually, later i found your detailed instruction; it is a very clear setup instruction - screen shots on the left, and your explanation on the right. it's just that i found it after i put my post here.

I hope and looking forward if you have spare time later, you could realize GPU version. teaching and research is an interesting and wonderful job and I enjoyed it my last half life. thank you again.

Top
 Profile  
 
Offline
 Post subject: Re: Leela Zero can run on Android!
Post #8 Posted: Thu Sep 06, 2018 1:21 pm 
Dies in gote

Posts: 24
Liked others: 11
Was liked: 9
Rank: EGF 1 dan
kyotosato wrote:
1. the program is restricted to network size. i tried to use facebook elf v1, and couldn't be loaded. my android boxes are restricted to zip size under 60mb.
2. i wasn't sure about the original network you provided, i just guess it might not be a current network. however, i shouldn't comment on something i am not sure. About weight network, currently i am interested in which current network may be stronger than facebook elf v.1; or i should say, more stable than elf v.1.

I'm not sure why you experience a restriction on the network size. You don't really need to unpack (or repack) them; Leela Zero can just read the compressed files directly. Just change the command line options to point to the place where the alternative network is stored.

BTW I think Elf is still a bit stronger, but I personally don't care (all networks are strong enough for me). Also I've heard Elf is not good at handicap, so unless perhaps if you're a top pro there really isn't much need for it.

kyotosato wrote:
3. about suck in 600~800mb, is because if i repeatedly load network files, fail or not, they all cumulatively stay in memory storage.

The previous version had some issues cleaning up failed installs. It should be better now, but perhaps some old files still persist. It might be best to clear all files and caches and do a clean reinstall.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group