t-regress/test-game.sh: Very crude testcase check script
[pachi/t.git] / t-regress / test-game.sh
blob13f69139d6b504c61667bd8210d2c5816fbad8e1
1 #!/bin/sh
3 # test-game: Run testcases within a single game
5 # Usage: test-game FILENAME
7 # Examine a game record and run testcases for all moves described
8 # in the "game comment".
10 sgf="$1"
12 sed -ne '/GC\[/,/\]/{ s/.*GC\[//; s/\].*//; p; }' <"$sgf" |
13 while read move class desc; do
14 moven="${move%:*}"
15 movec="${move#*:}"
16 echo "Move $moven ($movec)"
17 tools/sgf2gtp.pl -g -n $((moven-1)) <"$sgf" | ./pachi -d 4 -t =20000
18 echo "$class: $movec"
19 done