[Computer-go] Visualization request

Petr Baudis pasky at ucw.cz
Wed Nov 24 18:08:22 PST 2010


On Wed, Nov 24, 2010 at 11:53:23PM +0100, Magnus Jäverberg wrote:
> Hi, and thank you for the answer. 
> It would be great If you can save the data in the sgf file, or as a separate xml file. I would be happy to experiment with the visualization.

  I just pushed out a simple implementation of something that could be
useful for you, given the proper post-processing; you will find it in
the last git version.

  I'm used to coding lazily and substituting tedious stuff like I/O
conversions by quick'n'dirty shell/perl wrappers, which is probably not
terribly user friendly, but I hope it will still be useful.

  This is the relevant excerpt of the README, describing how to use this:


Pachi can evaluate all available moves in a given situation
and for each give a value between 0 and 1 representing perceived
likelihood of winning the game if one would play that move. I.e. it can
suggest which moves would be good and bad in a single given situation.

To achieve the latter, follow few simple steps:

1. Take an SGF record of your game and generate a GTP file from it:

        ./sgf2gtp.pl <file.sgf >file.gtp

2. Open the file.gtp in your favorite plaintext editor and trim it after
(remove all lines following) the move producing the situation you wish
to analyze.

3. Instead, add the following line at the bottom of file.gtp:

        0 uct_evaluate black

(replace `black` with `white` if it is white to play).

4. Run Pachi as follows:

        ./zzgo -t =500 -d 0 <file.gtp | sed -n '/^=0/,${s/^=0 //;p}'

If you want to know more details on what is Pachi thinking about the
various moves, remove the `-d 0` and `| sed -n ...` parts. To improve
the accuracy of values (at the expense of run time), raise the value
of 500 (try 2000 or 10000; 100000 will usually already take couple of
hours). The values will be most useful in the middle game; in fuseki
and most yose situations, expect a lot of noise.


  I think making the output gogui-friendly for easy visualization
would be pretty simple now, however the gogui documentation contains
no actual examples and I'm not much of a gogui user myself; if you tell
me exactly what GTP commands I need to add and show me examples of how
their output should look like, I can implement that. Or perhaps you
would like to give that a try yourself, just look for "uct_evaluate"
in gtp.c - it should be quite easy.

  Let me know if you'd find anything further useful for analyzing

				Petr "Pasky" Baudis
The true meaning of life is to plant a tree under whose shade
you will never sit.

More information about the Computer-go mailing list