It is currently Sun Jan 21, 2018 3:20 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
Offline
 Post subject: LeelaSabaki - Leela integration with Sabaki
Post #1 Posted: Sat Dec 09, 2017 1:50 pm 
Dies in gote
User avatar

Posts: 57
Location: Germany
Liked others: 0
Was liked: 13
Rank: 4 kyu
Several people have requested some type of Leela integration for Sabaki, but it's not Sabaki's philosophy to prefer one engine over another. So I've decided to draft some sort of engine integration protocol for Sabaki as a GTP extension, so that any engine can tell Sabaki what to do (in a limited way). It's still in the works, but I've implemented something in the Sabaki v0.32.0 beta version.

Together with the new Sabaki beta, I've also written LeelaSabaki, a laconically named proxy to Leela, which extends Leela with the aforementioned engine integration protocol. Currently, LeelaSabaki only does one thing: Whenever a move is generated, LeelaSabaki will add other variations Leela considered to the game tree in Sabaki, along with winning statistics. It also works with Leela Zero.

Attachment:
File comment: Leela integration with Sabaki
screenshot.png
screenshot.png [ 489.7 KiB | Viewed 1667 times ]

I don't want to say any more about the engine integration protocol, as I don't want other engines to implement it just yet, because it might change drastically soon. But I'd be happy if you give LeelaSabaki a try; just follow the instructions and make sure you're using Sabaki v0.32.0 beta. Furthermore, I'm interested in hearing how you think Leela (or any engine in general) can integrate itself more with Sabaki.


This post by yishn was liked by: apetresc
Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #2 Posted: Sat Dec 09, 2017 1:55 pm 
Lives in gote

Posts: 609
Location: Austin, Texas, USA
Liked others: 43
Was liked: 199
This is great, I'll have a look later. I wanted to mention I think I saw an issue with Sabaki and LeelaZero where if you click somewhere in the tree and ask LeelaZero to make a move, Sabaki does not replay the game to LeelaZero correctly. It replays all black moves and then all white moves. LeelaZero depends on the correct move order, so this confuses it. Can you look into this?

Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #3 Posted: Sat Dec 09, 2017 2:10 pm 
Dies in gote
User avatar

Posts: 57
Location: Germany
Liked others: 0
Was liked: 13
Rank: 4 kyu
yoyoma wrote:
I wanted to mention I think I saw an issue with Sabaki and LeelaZero where if you click somewhere in the tree and ask LeelaZero to make a move, Sabaki does not replay the game to LeelaZero correctly. It replays all black moves and then all white moves.

I've explained this behavior here: https://github.com/yishn/Sabaki/pull/294

But I see why replaying with correct move order is important. I'm open to solutions.

Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #4 Posted: Sat Dec 09, 2017 4:33 pm 
Lives in gote

Posts: 609
Location: Austin, Texas, USA
Liked others: 43
Was liked: 199
I see you point out that in general SGF files can do almost anything. But in trying to handle all SGF file types, Sabaki doesn't support LeelaZero (or AQ and others like it). I propose you parse the SGF and determine if it is a normal game with simple moves (no position setup, removing/overwriting etc). In that case play back the moves to the engine as normal. At least this will allow it to work with LeelaZero.

ETA: Maybe someone (I nominate you? :mrgreen: ) can define some GTP command extensions. Something like explain_move or dump_analysis, and it returns an SGF string containing moves the engine analyzed. If it's SGF the engine would be free to annotate those variations with whatever text it likes describing winrates etc.

ETA2: Also a command like winrate that returns the engine's position evaluation.

Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #5 Posted: Mon Dec 11, 2017 10:13 am 
Beginner

Posts: 11
Liked others: 0
Was liked: 2
Rank: ogs 12kyu
Universal go server handle: qianyilong
yishn wrote:
But I see why replaying with correct move order is important. I'm open to solutions.


My two cents on a simple solution. Perhaps when you configure a new engine you could have a simple toggle that configures strict ordering. You can enable strict ordering for engines that need it and leave it off for those that don't.

I personally hate the proliferation of switches and toggles from a software dev perspective because they often introduce more spots for bugs and problems but sometimes it is the lesser of two evils.

Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #6 Posted: Sat Jan 06, 2018 1:55 pm 
Dies with sente
User avatar

Posts: 84
Liked others: 19
Was liked: 16
KGS: 2k
Tygem: 1d
IGS: 1k
Wbaduk: 1d
OGS: 1d
Hi!
I use Leela and LeelaZero on Sabaki a lot with no trouble. I love Sabaki and really was looking forward to use LeelaSabaki as well, but somehow I can't seem to find the way to run it :sad:
I've tried to type many things, like:
--flat --help C:\Users\Dontbtme\Downloads\Sauvegarde\Jeu de go\Logiciels\leelasabaki-v0.2.0\Leela0110GTP_OpenCL.exe --gtp --noponder
I've tried with the <> and [] used in the explanations, or with and without the --gtp, etc.
Anyway, even though I suspect the answer might be obvious, I'm becoming more and more desperate :oops:
What am I doing wrong? :sad:

_________________
Bored with skillful play? Watch my blunders on my YouTube Channel


Last edited by Dontbtme on Mon Jan 08, 2018 7:55 am, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #7 Posted: Mon Jan 08, 2018 7:02 am 
Dies in gote
User avatar

Posts: 57
Location: Germany
Liked others: 0
Was liked: 13
Rank: 4 kyu
Dontbtme wrote:
Hi!
I use Leela and LeelaZero on Sabaki a lot with no trouble. I love Sabaki and really was looking forward to use LeelaSabaki as well, but somehow I can't seem to find the way to run it :sad:
I've tried to type many things, like:
--flat --help C:\Users\Ra\Downloads\Sauvegarde\Jeu de go\Logiciels\leelasabaki-v0.2.0\Leela0110GTP_OpenCL.exe --gtp --noponder
I've tried with the <> and [] used in the explanations, or with and without the --gtp, etc.
Anyway, even though I suspect the answer might be obvious, I'm becoming more and more desperate :oops:
What am I doing wrong? :sad:


You should remove the '--help' option, as it will only print a help note and therefore not enter GTP mode.

Did you try to put the path to Leela in quotation marks? It seems like you have spaces in your path. Also, you can try running LeelaSabaki in the command line to see what error messages it writes.

Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #8 Posted: Mon Jan 08, 2018 7:54 am 
Dies with sente
User avatar

Posts: 84
Liked others: 19
Was liked: 16
KGS: 2k
Tygem: 1d
IGS: 1k
Wbaduk: 1d
OGS: 1d
I tried all the above and... that's it! :bow:
For the curious and the helpless like me, here's the working line (in my case):
--flat "C:\Users\Dontbtme\Downloads\Sauvegarde\Jeu de go\Logiciels\leelasabaki-v0.2.0\Leela0110GTP_OpenCL.exe" --noponder
I just tried it a bit, but I can already tell I'll use LeelaSabaki a lot :D
Oh, and being able to flatten or not the variations is an awesome idea, depending on how we intend to use the sgf file later on :tmbup:
Thanks a lot for this great tool!

_________________
Bored with skillful play? Watch my blunders on my YouTube Channel

Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #9 Posted: Mon Jan 08, 2018 3:14 pm 
Dies in gote
User avatar

Posts: 57
Location: Germany
Liked others: 0
Was liked: 13
Rank: 4 kyu
I've just released a new version of LeelaSabaki (together with a new version of Sabaki) which lets you visualize network probabilities from Leela in Sabaki as heatmaps.

Attachment:
File comment: LeelaSabaki heatmap
leelasabaki-heatmap.png
leelasabaki-heatmap.png [ 433.84 KiB | Viewed 220 times ]


This post by yishn was liked by: Waylon
Top
 Profile  
 
Offline
 Post subject: Re: LeelaSabaki - Leela integration with Sabaki
Post #10 Posted: Mon Jan 08, 2018 9:56 pm 
Dies with sente

Posts: 93
Liked others: 3
Was liked: 47
Rank: OGS 7 kyu
yishn wrote:
I've just released a new version of LeelaSabaki (together with a new version of Sabaki) which lets you visualize network probabilities from Leela in Sabaki as heatmaps.
The result looks nice!

_________________
I am the author of GoReviewPartner, a small software aimed at assisting reviewing a game of Go. Give it a try!

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 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