Change default time settings from -t =80000 to -t 15
[pachi.git] / t-regress / test-game.sh
blob03e12682448ef4fa9f7c357e7b520c846fd4ae61
1 #!/bin/sh
3 # test-game: Run testcases within a single game
5 # Usage: test-game.sh FILENAME
7 # Examine a game record and run testcases for all moves described
8 # in the "game comment".
10 # Pass any extra Pachi parameters in PACHIARGS. E.g.
11 # PACHIARGS='-t =100000 -d 2 threads=2' testgame.sh ...
13 sgf="$1"
15 sed -ne '/GC\[[0-9][0-9]* .*\]/{s/.*GC\[\([^]]*\)\].*/\1/p; q;}; /GC\[/,/\]/{ s/.*GC\[//; s/\].*//; /^[0-9][0-9]* /p; }' <"$sgf" |
16 while read moven cases desc; do
17 echo "Examining move $moven"; sleep 1
18 tools/sgf2gtp.pl -g -n $((moven-1)) <"$sgf" | ./pachi -t =20000 $PACHIARGS
19 echo "Testcases: $cases ($desc)"
20 echo "Confirm and press enter..."; read xx </dev/tty
21 done