stats_add_result_decay(): Fix division by zero in case of decay==1
[pachi.git] / joseki / README
blob6ef72f05fdc13cc4c49debe5e00d8709ee244370
1 This is a joseki pattern scanner. At the beginning, you should
2 have a SGF file with various joseki as variations; they are assumed
3 to be laid out in the upper right corner; only variations leading
4 to a comment containing the word "GOOD" are considered. All variations
5 should be tagged as real moves, not move placement.
7 This pattern scanner works with the Kogo joseki dictionary. You need
8 to just preprocess the file with this script:
10         perl -ple 's/\w+\[\]//g; s/PL\[\d\]//g;'
12 Then, use the ./sgfvar2gtp.pl script to convert the SGF to a GTP stream,
13 one game per good variation.
15 Then, feed that GTP stream to ./pachi -e joseki to get a pattern datafile
16 on the output - the file contains list of quadrant positions (identified
17 by their zobrist hashes) and the associated w-to-play and b-to-play
18 joseki followups.
20 Save the pattern datafile to joseki19.pdict; if Pachi will find this file
21 in its working directory, it will use the quadrant positions in fuseki
22 for playouts and UCT priors.
25 In summary, the recipe for getting Pachi-compatible joseki dictionary
26 from the Kogo is:
28         wget http://waterfire.us/071012_KJD.zip
29         unzip 071012_KJD.zip
30         cat Kogo\'s\ Joseki\ Dictionary.sgf | perl -ple 's/\w+\[\]//g; s/PL\[\d\]//g;' >kogo.sgf
31         perl joseki/sgfvar2gtp.pl kogo.sgf >kogo.gtp
32         cat kogo.gtp | ./pachi -e joseki -d 0 | grep -v ^= | grep -v '^$' >joseki19.pdict