Autobook: Simple framework for automated opening book building
[pachi.git] / tools / autobook / expand.sh
bloba507af9a2200d84b3a3380b7489a4dae2a119740
1 #!/bin/sh
3 # Create subdirectories (followup nodes) in the cwd
5 # Config:
6 # Prior value weight:
7 priorsims=16
9 # Expected env:
10 # $CMDDIR
11 # $SEQDIR
13 pachi="$1"
15 cat "$SEQDIR/a.sgf" | "$CMDDIR/../sgf2gtp.pl" -g |
16 sed -e 's/genmove/uct_evaluate/' |
17 $pachi |
18 sed -ne '/^=/,${s/^= //;/./p}' |
19 while read move val; do
20 mkdir "$move" || continue
22 echo "$(echo "$val * $priorsims" | bc)"
23 echo "$priorsims"
24 } >"$move"/stats
25 done