Re: [Computer-go] Using gogui to visualize a CNN for move prediction
Maybe you can also have a look at the michi-c code to see how gogui analyze commands can be used https://github.com/db3108/michi-c2 (code in C). Look for the function display_live_gfx() (in ui.c where it is defined and in michi.c where it is used) and also in the doc/manual.html to see the results of the implemented commands. Denis On 09/01/2016 10:32, RĂ©mi Coulom wrote: Use gogui itself, and check gogui analyze commands: http://gogui.sourceforge.net/doc/analyze.html You can see an example there: http://www.remi-coulom.fr/Amsterdam2007/ On 01/09/2016 05:31 AM, Justin .Gilmer wrote: Hello, I've trained a deep CNN for move prediction and would like to visualize it using gogui (or a python library if anyone knows of one!). I have gogui installed and have a somewhat decent understanding of the go text protocol, although this is my first time trying to use it. I'm not looking to have my CNN play another program, instead I'd like to iterate through an existing sgf file and view the model probablities at each state of the game. So, I'm trying to write a python script which can communicate with gogui but I'm getting confused with which gogui executable from the list below I should be using: gogui-adapter gogui-convert gogui-dummygogui-server gogui-terminal gogui-twogtp gogui gogui-client gogui-display gogui-regress gogui-statistics gogui-thumbnailer I assume one of these should just wait for the program to give a bunch of genmove commands? Seems like gogui-regress is what I want? I see no documentation on how to use this on http://gogui.sourceforge.net/doc/index.html and the provided help isn't very helpful. Hoping someone on this mailing list has used gogui before :). Am I missing anything? Is there any easier way to visualize my model? Many thanks! -Justin Gilmer ___ Computer-go mailing list Computer-go@computer-go.org http://computer-go.org/mailman/listinfo/computer-go
Re: [Computer-go] [ANN] yet another go engine : michi-c release 1.4 on GitHub
On 29/08/2015 15:12, Erik van der Werf wrote: Nice! FYI: I tried the portable option and compiled for Android, but that seems buggy. The code runs on my phone, and the program does make moves, but many moves are bad (e.g., too many are on the second line). On my PC it seems OK. BR, Erik Thank you for your feedback. I don't think the problem has to do with the portable code as I have verified on Linux that two builds (one with PORTABLE defined and the other without) play exactly the same moves. More likely there is still some issue with portability on Android. Unfortunately, I have no possibility to test myself on this platform. If someone could help, he would be much welcome (the use of the options mcdebug, tsdebug could help in comparing results between platforms). If you could send me in private the log file (michi.log) that has been generated in the working directory, maybe I could see if something wrong happened. In addition, if the large patterns files are not found, this could explain some bad moves. When analyzing your mail, I noticed that I had thrown away some important lines in the README about large patterns. The doc has been updated. Thank you. Best regards, Denis ___ Computer-go mailing list Computer-go@computer-go.org http://computer-go.org/mailman/listinfo/computer-go
[Computer-go] [ANN] yet another go engine : michi-c release 1.4 on GitHub
Hi, michi-c is a port in C of the michi program by Petr Baudis with the same goals (see https://gitub.com/pasky/michi). It has many of the extensions that Petr has hoped: - early passing, - graphics in gogui, - parameters modifications by gtp commands, - speed improvement by tracking liberties and blocks, - preliminary time management and dynamic komi - read simple SGF files - small user manual Currently (version 1.4), it runs exactly the same algorithms as the michi python version. The michi goal for brevity has been relaxed in favor of speed and functionalities. Michi-c is relatively fast even if there is still much room for improvements. It runs 3200 playouts/s from an empty 19x19 board on an i7-4790K (single threaded and using large patterns). With this setting, it plays about even with gnugo on 19x19 (winrate 57 % +/- 2.5% measured on 400 games) at an average speed of 400 seconds per game (about 3.3 sec/move). The development is done on Linux but the goal is to keep the code portable. Michi-c comes with everything included. The only requirements are : - a C compiler with the standard C library to build the gtp engine, - gogui (http://gogui.sourceforge.net) to use the engine confortably if gogui is supported on your system. The code for the MCTS tree search and the playout policy is about 1000 lines of C (20 % of the total). Michi-c can be downloaded at https://github.com/db3108/michi-c2. It is distributed under the MIT license. Thanks to Horace Ho, Andreas Pearson, Eric Steinmetz and J.Kartz who have provided feedback and/or corrections about portability issues of earlier versions with IOS (iphone 6), Windows 32 bits system with Microsoft Visual Studio and MAC OS X. And of course, many thanks to Petr Baudis for having published the michi.py code and setting up the goals for this project. Denis ___ Computer-go mailing list Computer-go@computer-go.org http://computer-go.org/mailman/listinfo/computer-go
Re: [Computer-go] michi-c a recoding in C of Petr Baudis's michi
Hi Horace, Thank you for your kind words. On 13/05/2015 03:19, Horace Ho wrote: michi and michi-c are wonderful! It's a dream come true with a handy go engine to learn from. As it's at the early stage of the project (12 hours ;-), do you have any preference on the code license? Personally I wish the code will be released in a more liberated kind of license (e.g. BSD) instead of GNU (as sometimes it did no go well with Apple AppStore policy). Sorry, I kept the michi license, which is MIT. The README file of the project has been updated. Denis ___ Computer-go mailing list Computer-go@computer-go.org http://computer-go.org/mailman/listinfo/computer-go
[Computer-go] michi-c a recoding in C of Petr Baudis's michi
Hello ! End of March, Petr Baudis released his Minimalist Pachi called michi (thread Michi - 15x15 ~6k KGS in 540 lines of Python code). I found the goals of his project (see the README at https://github.com/pasky/michi) very attractive. So, I decided to recode michi in C following Petr's suggestion One of the things I would hope to inspire is rewrite of the same algorithm in different, faster programming languages. I tried to keep C code very simple and translated michi python in a straightforward manner when this was possible (almost everywhere). The result is available at https://github.com/db3108/michi-c. (after some discussion by email with Petr, we decided that it would be better to make separate projects on GitHub) Obviously the code got fatter (1300 executable lines of C instead of 540 of python). But it also got faster, almost a 10x acceleration, even if it is yet single threaded. Here is an extract of the results obtained against gnugo. More results can be found in the perfs.txt attached file. michi vs gnugo-3.7.10 level 10 (400 games 13x13) nsimulations/move 1400 4000 12000 python winrate (%)36.5 codetime per game (sec) 430.6 C winrate (%)37.8 66.5 80.8 codetime per game (sec)44.2 123.4 340.7 michi vs gnugo-3.8 level 10 (400 games 13x13) - nsimulations/move 1400 4000 12000 python winrate (%)41.8 codetime per game (sec) 419.5 C winrate (%)38.8 66.5 codetime per game (sec)44.9 124.6 Uncertainty on winrates is between 2 and 2.4 %. There is still a lot of room for improvements. As the speed of the program is concerned, the 2 main ones are : - parallelization - fast board implementation with incremental update of blocks and liberties, I have plans to continue to work on it with the priority of implementing the fast board. Adapting existing and well tested code that I already have, this should not take too long, I hope. Meanwhile, if someone would like to try his hands on parallelization, his efforts would be much apreciated. Some kind of coordination should certainly be necessary, as I used for simplicity some constructs that could prevent easy parallelization. But I hope this could be manageable. For the above modifications we must relax the objective of brevity. So this will be the right time to include some functionalities that will increase the usability of the program (time management, variable parameters modifiable by gtp commands for CLOP tuning, variable boardsize, intelligent early passing, etc.) I believe that these new developments should not be detrimental to the clarity and the brevity of the original michi and I would like to let michi-c unchanged (except for bug corrections and/or modifications to make it clearer and shorter). Therefore, I have setup another project for the new developments at https://github.com/db3108/michi-c2 Any thoughts ? PS. If someone can understand and help to correct the spurious message got from gogui-regress when running make test, I would be very grateful. ;-) Denis Results below are obtained on two rather old quadcores i7-860 and i7-920 from 2010-2011. michi vs gnugo-3.7.10 level 10 (400 games 13x13) uncertainty about 2.4 % on winrates nsimulations 1400 4000 12000 python winrate (%)36.5 codetime per game (sec) 430.6 C winrate (%)37.8 66.5 80.8 codetime per game (sec)44.2 123.4 340.7 - michi vs gnugo-3.8 level 10 (400 games 13x13) - nsimulations 1400 4000 12000 python winrate (%)41.8 codetime per game (sec) 419.5 C winrate (%)38.8 66.5 ?? codetime per game (sec)44.9 124.6 --- michi vs gnugo-3.7.10 level 10 (400 games 13x13, without large pattern) --- With visit_to_expand = 8 nsimulations 1400 4000 12000 C winrate (%)20.0 50.5 codetime per game (sec)44.6 125.1 --- michi vs gnugo-3.7.10 level 10 (400 games 13x13, without large pattern) --- With visit_to_expand = 2 nsimulations 1400 4000
Re: [Computer-go] michi-c a recoding in C of Petr Baudis's michi
On 12/05/2015 16:58, Jason House wrote: Michi's source is more than 540 lines. I've wondered about trying to split the source into 3 pieces: - UI/glue code not in the line count - Board implementation - Core playout/search code I imagine that would allow easier customization of the board implementation... Both in python or in ports to other languages. Hi Jason, I won't speak for Petr Baudis, but he spoke of 540 *executable* lines of python. For michi-c, I discarded in the line count : - all blank lines or lines that contain only comments, - all lines with only one { or } in it, - data tables, - code dedicated to debug (as in debug.c) So, indeed, the total line count for all the files is larger than 1300 (2621 lines actually). For michi-c, I already made a separate file for the pattern code (patterns.c), for some debug code (debug.c) and prepare to make another separate file board.c for the fast board implementation. Actually, the michi.py file already contains well separated components even if they are present in the same file (and one single file also has some advantages for a short program). Best, Denis ___ Computer-go mailing list Computer-go@computer-go.org http://computer-go.org/mailman/listinfo/computer-go
Re: [Computer-go] [ANN] Michi - 15x15 ~6k KGS in 540 lines of Python code
On 25/03/2015 16:36, Petr Baudis wrote: So what's the strongest program you can make with minimum effort and code size while keeping maximum clarity? Chess programers were exploring this for long time, e.g. with Sunfish, and that inspired me to try out something similar in Go over a few evening recently: Thank you for the result of your few evenings. This is a great piece of code, interesting to study and to play with. It certainly replaces more than tens of thousands of words for someone that want to be introduced to the computer go field. If I find the time, I will follow what you suggest, trying to keep the right balance between clarity, brevity and efficiency. Many thanks again, ___ Computer-go mailing list Computer-go@computer-go.org http://computer-go.org/mailman/listinfo/computer-go