Some of you may have noticed from this thread in the computer go sub forum that I was working on a tool to help using Leela (the bot from the excellent work of Gian-Carlo that everybody knows). I had opened a GitHub project and kept working on it for some time.
In fact, I had arrived to a point where I though I should announce it to the community. And that's when L19 went down for two weeks... At first I waited, then moved to some other fun Go/Leela related project.
And today I was showed a similar project on Reddit, so it prompted me to finally make this announcement.
*edit: screen shoot*
So here it is, you can find a v0.2 release on the Github project. This tools requires to have both GnuGo and Leela working on the computer. It offers two features:
- The first feature "Run *.sgf analysis" will use Leela to evaluate all positions in the provided *.sgf file. It will create a *.rsgf file (for "reviewed sgf file") made of your game an all the variations proposed by Leela for each moves. For each variation, it adds the win probability of Leela. Also, for all position, it will add Gnugo score estimation. The result is a very big, but valid, *.sgf file, but I think it's hardly usable from a standard SGF editor. One parameter that can be adjusted is the time per move that Leela should spend evaluating the position. I typically use 30s or 60s to review my own games, so the analysis time is quite long... But I am free to do something else during that time.
- The second feature "Open *.rsgf for review" is there to make reviewing the result of the analysis as simple as possible. It shows two gobans: on the left the game as it went ; on the right, the different propositions from Leela. Move your mouse pointer over the different positions and the sequence is displayed. The score estimation is displayed as well. In case you want to explore further, you can open that position in a third board and play out variations alone or against Leela/Gnugo.
Some more informations:
- I could not try it a lot under Windows, but it should be ok.
- Version 6 to 8 of Leela should work, although I mainly used V8 so far
- I have not GPU card, so I only tried the CPU version. But I guess the GPU one should work the same way.
- Normally, different sizes of Goban work as well (<- i did not try that in a while)
- The leela_analysis.py part can be ran from a terminal with a *.sgf filename as argument. And so can be used in an script. I only play online during luch time at work, and use my software combined with this script to have my game analysed during the afternoon so that it's ready to review when I am back home.
How to install:
- For Linux users, the best is to download the python source code from Github then run the main.py file using python. In the setting part, you will have to indicate the command line for Leela and Gnugo. For example, I use /home/pnprog/Leela080GTP/leela_062_linux_x64 --gtp --noponder and gnugo --mode gtp
- For windows users, I have packaged a *.exe file with Leela and Gnugo, you can download it from there. Once it is downloaded, unzip and run the GoReviewPartner.exe
Just a few things I want to add:
- I am just an amateur go player and an amateur programmer, so do not take that software too seriously. I am just interested in experimenting with what computer could bring to us and how learning Go could change in the future.
- All the kudos should go to Gian-Carlo, Leela is the real thing, not my software. Also big thanks to the author(s) of the gomill python library.
- I won't have any problem if somebody else borrow some of the ideas I put in this software and make something better (<- that should not be that difficult in fact), even for some commercial software. I am just fond of Go and programming, so this is my way to contribute to Go. But the source code is licensed under GPL3, keep that in mind if you want to reuse some part of my (ugly) code.
For now, I am interested in Rayon, the open source Go bot that seems quite strong. I haven't been able to make it work on my computer, but if I succeed, I may add support for this bot into my software. If you notice some bugs, or have some idea for improvement, let me know in this thread.
Have a good day!
pnprog
.
?