Skip to content

Commit 5dda7b5

Browse files
committed
t-play: update
added efficient testing notes. single-threaded testing much easier thanks to previous commit (no need to set OMP_NUM_THREAD by hand anymore to control number of dcnn threads) runpachi takes path instead of dir
1 parent 6123ca4 commit 5dda7b5

File tree

3 files changed

+65
-42
lines changed

3 files changed

+65
-42
lines changed
File renamed without changes.

t-play/autotest/bin/runpachi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
# Simple wrapper that runs pachi from its directory
33

44
die() { echo "$@"; exit 1; }
5-
usage() { die "Usage: runpachi <pachi_dir> <pachi_opts>"; }
5+
usage() { die "Usage: runpachi <pachi_path> <pachi_opts>"; }
66

7-
dir=`eval echo "$1"` # make '~' work
7+
path=`eval echo "$1"` # make '~' work
88
shift
99

10+
dir=`dirname $path`
11+
pachi=`basename $path`
12+
1013
[ -d "$dir" ] || usage
11-
cd $dir
12-
exec ./pachi $@
14+
cd $dir || die "cd $dir failed"
15+
16+
exec ./$pachi $@

t-play/autotest/rc

Lines changed: 57 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,70 @@
66
# to perform. autotest clients will repeatedly pick a random pairing
77
# from the defined ones, play a game and record the result.
88

9-
### General parameters:
9+
########################################################################################
10+
# General parameters
1011

1112
# twogtp path
1213
# We need the gogui twogtp variant (the one that takes -black, not --black as parameter).
13-
# If you want handicap support, you will need a custom patch from:
14-
# http://pasky.or.cz/dev/pachi/gogui-handicap.diff
15-
# Or download patched release from https://github.com/lemonsqueeze/gogui/releases
16-
twogtp_path="/home/go/gogui-1.4.9/bin/gogui-twogtp"
14+
# If you want handicap support you need gogui-1.4.10:
15+
# https://github.com/lemonsqueeze/gogui/releases
16+
# (or patch gogui: http://pasky.or.cz/dev/pachi/gogui-handicap.diff)
17+
twogtp_path="/path/to/gogui-1.4.10/bin/gogui-twogtp"
1718

1819

19-
### Players:
20+
########################################################################################
21+
# Players
22+
2023
# The player specification is later eval'd during the pairing. You can use
2124
# $1, $2, ... placeholders within the specification to substitute various
2225
# parameters at the pairing time. The number parameter after player command
2326
# specification specifies how many parameters the specification takes.
2427

28+
# Note: Can't use special characters like: '.' '-' ',' ':' in player names:
29+
# Trying to do so will give an error like:
30+
# Loading rc file...
31+
# bin/autotest-worker: line 19: <bad player name>_spec=<bad player command>: No such file or directory
32+
# *** WORKER FAILED ***
33+
# Use '_' instead.
34+
2535
# Warning! If you change player definition, you WILL NOT be able to determine
2636
# what definition your historical results used. Once you define a player of
2737
# some id, it's bad idea to tweak the definition in any way.
2838

29-
# This is the reference player we use for our tests.
30-
# Hiratuka 10_36I (19x19, 13x13 or 9x9). Link no longer available, here's my copy:
31-
# https://www.dropbox.com/s/aotkraae8sg08aw/Hira_10_36I_en.zip?dl=0
32-
# 10_37B is good too. Official link: (or search 平塚の囲碁 on www.vector.co.jp)
33-
# https://www.vector.co.jp/soft/winnt/game/se513389.html
34-
# These are nice for testing (cpu only), later versions uses gpu so ymmv.
35-
player hira_3d "hira -po 15000" 0
36-
player hira_2d "hira -po 6000" 0
37-
player hira_1d "hira -po 3000" 0
38-
player hira_1k "hira -po 1500" 0
39-
4039

40+
########################################################################################
4141
# GnuGo player, level 10
42-
# Probably best to avoid if possible: it doesn't resign lost games so wastes lots
43-
# of resources. The games also tend to be very noisy so have to play thousands of
44-
# them to get a good estimate. Better play a few games with a strong opponent which
45-
# is good at punishing Pachi's mistakes.
42+
43+
# Probably best avoided if possible: doesn't resign lost games (wastes lots
44+
# of resources). Also games tend to be very noisy, have to play thousands of
45+
# them to get a good estimate. Better play a few games with a strong opponent.
4646
#player gnugo10 "/usr/games/gnugo --mode gtp --chinese-rules --capture-all-dead --level 10" 0
4747

4848

49-
# Pachi player being tested. (5k sims, multithreaded, no dcnn)
50-
# Make native build for wanted boardsize to speed things up.
51-
# To test pachi build in ~/src/pachi use:
52-
player pachi5k_nodcnn "runpachi ~/src/pachi --nodcnn -t =5000 max_tree_size=40,pondering=0" 0
49+
########################################################################################
50+
# Pachi players
51+
52+
# To speed up testing:
53+
# - Test on 15x15 instead of 19x19
54+
# - Resign early (resign_threshold=0.29, below 30% is almost sure loss)
55+
# - Make custom build for target boardsize
56+
# - Run multiple single threaded games rather than one multi-threaded game
57+
# on multi-core machines.
58+
59+
# Our reference player:
60+
# Pachi 12.80 (dcnn, 10k playouts, multithreaded)
61+
player pachi1280 "runpachi ~/build/12.80/pachi -t =10000" 0
62+
5363

54-
# Pachi (90k sims, multithreaded, no dcnn)
55-
player pachi90k_nodcnn "runpachi ~/src/pachi --nodcnn -t =90000 max_tree_size=200,pondering=0" 0
64+
# Version we want to test: Pachi build in ~/build/master.
65+
# Pachi (dcnn, 10k playouts, multithreaded)
66+
player pachi "runpachi ~/build/master/pachi -t =10000" 0
67+
68+
# Pachi (nodcnn, 10k playouts, multithreaded)
69+
player pachi_nodcnn "runpachi ~/build/master/pachi --nodcnn -t =10000" 0
70+
71+
# Pachi (nodcnn, 10k playouts, single-threaded)
72+
#player pachi_nodcnn "runpachi ~/build/master/pachi --nodcnn -t =10000 threads=1" 0
5673

5774
# Can also test different pachi versions from current directory:
5875
# We substitute particular revision and specific parameters in the pairings.
@@ -61,10 +78,12 @@ player pachi90k_nodcnn "runpachi ~/src/pachi --nodcnn -t =90000 max_tree_s
6178
#player zamafmoggy5k './pachi-$1 -t =5000 pass_all_alive,policy=ucb1amaf,playout=moggy${2:+,$2}' 2
6279

6380

64-
### Pairings:
65-
# The pairing call looks somewhat elaborate:
66-
#
67-
# pairing BOARDSIZE KOMI BLACK PLAYER1 PLAYER1ARGS PLAYER2 PLAYER2ARGS
81+
########################################################################################
82+
# Pairings
83+
84+
# Pairing syntax:
85+
# pairing BOARDSIZE KOMI BLACK PLAYER1 PLAYER1ARGS PLAYER2 PLAYER2ARGS
86+
#
6887
# BOARDSIZE: 9, 19, or whatever flavor you fancy...
6988
# KOMI: 7.5, 0.5, ... OR h2, h6, ... (handicap amount, komi is forced to 0.5)
7089
# BLACK: 'a' - black is chosen randomly, useful only if komi is 7.5
@@ -73,22 +92,22 @@ player pachi90k_nodcnn "runpachi ~/src/pachi --nodcnn -t =90000 max_tree_s
7392
# PLAYERARGS: Parameters for the player, substituted for $1, $2, ...
7493
# Parameters must not contain whitespace.
7594
#
76-
# Win rates are always stored from PLAYER2 perspective, no matter
95+
# Winrates are always stored from PLAYER2 perspective, no matter
7796
# what the player colors are - we assume that PLAYER1 is your reference
7897
# player while PLAYER2 varies based on the particular configuration you
7998
# want to test.
80-
99+
#
81100
# You will be editing this all the time. :)
82101

83102

84-
# hira vs pachi, 13x13 H2 (pachi is black)
85-
#pairing 13 h2 2 hira_1k pachi5k_nodcnn
103+
# self-play: 19x19 even game (second player is black)
104+
#pairing 19 7.5 2 pachi1280 pachi
86105

87106

88-
# hira vs pachi, 19x19 even game
89-
#pairing 19 7.5 2 hira_1k pachi90k_nodcnn
107+
# dcnn vs nodcnn: 15x15 H4
108+
#pairing 15 h4 2 pachi1280 pachi_nodcnn
90109

91110

92111
# gnugo vs pachi, 15x15 reverse komi (pachi is white)
93-
#pairing 15 -7.5 1 gnugo10 pachi5k_nodcnn
112+
#pairing 15 -7.5 1 gnugo10 pachi_nodcnn
94113

0 commit comments

Comments
 (0)