"A Master of Go", iOS/iPadOS Go AI app

For discussing go computing, software announcements, etc.
Post Reply
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: A Go AI app for iOS with that strong neural network

Post by wineandgolover »

Tired of borrowing my wife's iPad mini (most recent version), I got a new iPhone 11 Pro.

Running side-by-side with her iPad it seems to be at least 20% faster on the leelaMaster gx89 version, less so on LeelaZero 242.

I’m happy enough. Will explore more.
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: A Go AI app for iOS with that strong neural network

Post by wineandgolover »

y_ich wrote: About batch size,
if you choose 8, maybe you will get 10% more eps(evaluations per second) on iOS 13 depending on weight you use.
(On iOS 12, I was sorry that there were no effects)
But honestly I am not sure it is effective for strength or not.
batch( = parallelism) may loose accuracies of playouts even if it increases playout speed.
Hi y_ich,
1) On my iPhone 11 pro, running iOS 13.1.3, increasing batch size seems to make it a little faster, but so far, it also finds difficult-to-find better moves much quicker. I'm currently using batch size of 5.

2) Are the settings defined anywhere? What do all the options do? For example, what is low thread priority, resign threshold, Cinit, softmax temperature, and virtual loss? Can I assume that networkLeelaZero_242 the official 40-block network 242 converted to your format?

3) I would like to help you update the networks, but I can't follow the directions on your GitHub page: https://github.com/new3Rs/a_master_of_g ... /README.md

Just for starters, the sample dropbox links provided tell me I don't have access, so I can't see your examples.

I'm not a programmer. However, I am able to follow step-by-step instructions, and was able to compile / install lizzie / LZ / Katago. So if you can either help me directly, or clarify the readme, I'd be happy to build the json / converted weight files, to make available the most current 15b, 20b, and 40b Leela Zero weights. I'm using macOS.

If you'd rather leave it to a gifted programmer, or if one is reading this and wants to help, that is fine with me.

Current strongest models:

LZ15b_245
http://zero.sjeng.org/networks/0d2694c5 ... 7e9c9c3.gz

LZ20b_248
http://zero.sjeng.org/networks/9d0457b1 ... 6da8751.gz

LZ40b_249
https://zero.sjeng.org/networks/6ee288b ... 6cf0538.gz

Thanks.
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

wineandgolover san,

Thank you for keeping using my app!

About No.2, I amd sorry for lack of documentation.
If you set "low thread priority" on, you will reduce speed of playouts and get longer battery duration.
"resign threshold" is the winrate at which AI resigns.
"Cinit" determines wideness of search tree. The larger Cinit is, the wider tree become.
"softmax temperature" determines broadness of policy(next move intuition). The smaller it is, the narrower candicate moves become.
"virtual loss" adjusts how much the search avoids same variations for parallelism. the larger it is, the better AI avoids. It does not mean the stronger though.

You can leave these parameters alone, or select one among "instant parameter settings"

And yes, LeelaZero_242 was converted from the official #242 weight.

About No.3,
Could you give me a log with error?
I may help you or fix the problem if it is a bug.

You seem to want to get the very strongest AI at present.
Good, me too^^

But I want to point out that the difference of Elo rating between #249 and #242 is only 155 points, which is about 70% winrate.
(It sounds big but do you really want to choose best sparring partner among Tyson, Foreman, Ali, et al.? I am kidding.)
I will update the weight when the difference of rating become 200 point bigger.

Thanks.
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

Grünauer san,

I have succeeded to run KataGo on iOS 13 though I am not sure it supports handicap stones and variable komi well.
Do you have good experiences of KataGo on PC?

Still I need time to embed it into my app.

Please look forward.

One excuse. You may need extra money for KataGo since it works only on iOS 13.
(Otherwise, iOS 11/12 users will have to pay for a function they cannot use...)
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

Marcel Grünauer wrote:
y_ich wrote:Do you have good experiences of KataGo on PC?
I am running it on macOS 10.15 on a 2019 iMac; it works very well.
So you mean that KataGo works well for variable komi and better than Leela Zero with handicap stones.
Amazing.
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: A Go AI app for iOS with that strong neural network

Post by wineandgolover »

y_ich wrote:wineandgolover san,

...

About No.3,
Could you give me a log with error?
I may help you or fix the problem if it is a bug.
Please understanding that posting about my flailing is a bit embarrassing.
Regarding not being able to see the json examples from your dropbox account, this is the error I get when I try to access "https://dl.dropboxusercontent.com/s/4ue9d86yaglengl/LeelaMaster_GX89_fp16.json" :
Screen Shot 2019-11-01 at 12.27.17 PM.png
Screen Shot 2019-11-01 at 12.27.17 PM.png (51.9 KiB) Viewed 55312 times
Furthermore, I assume I have to install the converter onto my computer, just as I did LZ and Lizzie, right? I assume that is how I will run this command:

Code: Select all

./make.sh <board size> <URL of weight>
Below you can see the two commands I ran to try to do so (I also tried both commands with ".git" on the end.) I'm sure I made a simple and stupid mistake.

Code: Select all

Last login: Fri Nov  1 12:01:25 on ttys001
Bradys-MacBook-Pro-2018:~ bradydaniels$ git clone -b next https://github.com/new3Rs/a_master_of_go
Cloning into 'a_master_of_go'...
fatal: Remote branch next not found in upstream origin
Bradys-MacBook-Pro-2018:~ bradydaniels$ git clone -b next https://github.com/new3Rs/a_master_of_go/LZ2mlmodel
Cloning into 'LZ2mlmodel'...
remote: Not Found
fatal: repository 'https://github.com/new3Rs/a_master_of_go/LZ2mlmodel/' not found
Bradys-MacBook-Pro-2018:~ bradydaniels$ 

This is why I asked for step-by-step instructions on how to convert networks, where the steps include installing the appropriate stuff from GitHub.
y_ich wrote:You seem to want to get the very strongest AI at present.
Good, me too^^

But I want to point out that the difference of Elo rating between #249 and #242 is only 155 points, which is about 70% winrate.
(It sounds big but do you really want to choose best sparring partner among Tyson, Foreman, Ali, et al.? I am kidding.)
I will update the weight when the difference of rating become 200 point bigger.
My interest lies less in sparring with a better partner, and more with optimizing for the hardware I have.

I understand and agree with not updating too frequently, and it makes sense for the 40b because it's pretty recent. But given the new A13 processor, I think it is worthy to try a 20 block network, which I suspect will still be pretty fast. And once I can do that successfully, perhaps updating the 15 block is also worthwhile, since the old one is based on 226, six months old.

I'd be happy to do this myself if I can, and let you focus on more important things, like say, the KataGo conversion. Alas, I am stuck.

Thanks again for your software, and for putting up with me.
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

wineandgolover san,

I am sorry for my poor description in README.md.

1. JSON in README.md is an example.
You should replace "https://dl.dropboxusercontent.com/s/4ue9d86yaglengl/LeelaMaster_GX89_fp16.json" to the URL for your own model which you will convert according to the instruction in README.md.
By the way, this means that you need your web server to put your model like Dropbox in the example.

2. Your understanding is right for make.sh, but you do not need to add "-b next" option when git clone.

Code: Select all

git clone https://github.com/new3Rs/a_master_of_go

cd a_master_of_go/LZ2mlmodel

# make.sh assumes that pipenv has already been installed in your computer.
# If not, comment out the line below.
# brew install pipenv

./make.sh 19 <URL of weight>

# create and edit your JSON file.

# put JSON file and converted model in your web server.
I am developing these scripts on macOS and I am not sure that they work well on other platforms.
Please let me know your platform.

3. optimization
I am sorry that I was kidding.
You fun is my fun.

(Finding optimized hyper parameters(Cinit, softmax temperature, virtual loss, etc.) sounds very difficult.
AlphaZeo, Leela Zero, and ELF OpenGo projects studied it, experimented many games, and optimized their parameters. Then they got different conclusions.)

About 20b block networks, win‐loss records show that ELFv2 is still strongest, it is stronger than the latest 20b(15b) weight which learned 40b self-games.
But ELFv2 is slower than ELFv1, I think ELFv1 is the best 20b for "A Master of Go", so I keep it preinstalled.

Anyway, you can try conversions and enjoy to watch their games.
Please feel free to tell me your troubles in conversion.
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

Grünauer san,

I am sorry that unlocking KataGo is not available yet due to my mistake of procedure.
Please wait for a few days.

About coins, I have no idea about accuracy of KataGo's score estimation yet.
I have been using GnuGo estimation for a long time, at least it is quite good at grading.
So it is still there. You do not need to use them.
I hope that I may add whole game analysis on server some day. Coins will be used for it.

Thank you for your patience.
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: A Go AI app for iOS with that strong neural network

Post by wineandgolover »

I am very excited that katago is coming to Master of Go.

Y_ich, I hope you are charging a single, up-front fee for this upgrade, rather than having ongoing fees. I think you should be rewarded for your efforts, and I’m happy to pay, but I personally feel disincentivized by apps that keep requesting money to utilize standard functions. For katago, the functions I’d expect to use the most are its built-in score estimation, variable komi, handicap capabilities, and ability to play well on various board sizes.

Out of interest, in your testing, is katago running pretty fast?

Thanks!
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

wineandgolover san,

“Unlocking KataGo” is non-consumable. Once you buy it, you can use it forever with no charge.

KataGo on the app is not as fast as other weights.
I do not succeed to let it use Neural Engine yet.
Its performance is about 19 eps on the latest iPad Pro.
And currently the KataGo engine supports only 19x19.
I will extend to 9x9 and 13x13 later.

Now both the version 4.0.1 and KataGo item are available.

Enjoy!
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

Grünauer san,

I am glad to see that you seem enjoy the new feature.

I will consider the UI of the scale-icon button.

About pts. in the winrate bar, it is not a score.
It means how the latest move get or lose winrate percentage.
(It have been shown in previous versions.)
User avatar
wineandgolover
Lives in sente
Posts: 866
Joined: Sun Jul 25, 2010 6:05 am
GD Posts: 0
Has thanked: 318 times
Been thanked: 345 times

Re: A Go AI app for iOS with that strong neural network

Post by wineandgolover »

Hi y_ich,

I bought the katago expansion because I want to support you and your efforts. I fully expected that the initial roll-out might feel a little beta-like, and am cool with that.

Right now, I think you have handicap and variable komi working, great job! Does it support katago score estimation, like that displayed on recent versions of Lizzie? This is one of the key strengths of katago over other bots.

I hope you make progress with the neural engine. This will make a huge speed difference. Does it look promising?

I bought the upgrade on my iPhone. How do I access it on my iPad (same apple ID)? It’s currently asking me to buy it again.

I expect I won’t use katago much until it supports scoring and gets faster. but I appreciate your efforts to make that happen. Thanks!
- Brady
Want to see videos of low-dan mistakes and what to learn from them? Brady's Blunders
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

wineandgolover san,

About two questions, Grünauer san's answers are correct. Thank you, Grünauer san!

Now the version 4.0.2 is available.
The 20b weight runs 3x faster than 4.0.1 thanks to Neural Engine.
It is still slower than Leela Zero weight. I will investigate whether further speed-up is possible.
y_ich
Dies with sente
Posts: 112
Joined: Fri Nov 16, 2018 5:29 pm
Rank: Tygem 7d
GD Posts: 0
Been thanked: 36 times

Re: A Go AI app for iOS with that strong neural network

Post by y_ich »

Grünauer san,

I will consider about your request.
Mr25
Beginner
Posts: 1
Joined: Wed Dec 25, 2019 10:31 pm
Rank: 8k
GD Posts: 0

Re: A Go AI app for iOS with that strong neural network

Post by Mr25 »

Hi,

Recently bought your app. Really great.

Question: Have you considered using one of these networks as an option? They are modeled on Leela zero but use smaller nets so it’s much faster:

https://github.com/leela-zero/leela-zer ... -552210675

Cheers!
Post Reply