A shell script to run match between two Stockfish NNUE nets. Install Git Bash for windows and run it under a Gut bash terminal windowZenmastur wrote: ↑Sat Jul 25, 2020 10:04 pm I solved all those problems by making a folder named N:\eval and placing all bin files there. Then in the UCI options I set the N:\eval\binfilename.bin
It's "N:" because I don't have a drive c: on my machine. I assume on most windows machines it would be on drive c:
I haven't tried to to set it up in Cutechess-cli yet. I guess the next step for me. Anyone have a clue how to do this. i.e. an example file....
Regards,
Zenmastur
name this file run.sh and place it cutechess-cli.exe folder
and then give it permissions
chmod +755 run.sh
Code: Select all
#!/bin/bash
### Allows you to run exe's under Git Bash without the "./" preceding the exe name
export PATH=$PATH:.
## USER OPTIONS
base=6
ROUNDS=5 # total num of games will be ( num of engines * (num of engines -1) * rounds
CONCUR=50 ## reflects num of comcurrent games . THREADS * CONCUR should ALWAYS be less than # of logical CPUS
### ENGINE options
ENG2="1134"
ENGCMD1="Stockfish-XI-NN.exe"
EVFILE1="./eval/20200723-1134.bin"
ENG1="2344"
ENGCMD2="Stockfish-XI-NN.exe"
EVFILE2="./eval/20200724-2344.bin"
###TOURNAMENT OPTIONS
### common options -each
DIR="c:/cluster.mfb/Popcnt-LP"
HASH=128
SYZYGY="option.SyzygyPath=c:/syzygy"
THREADS=1
DB="-debug"
OFILE="C:/cluster.mfb/Popcnt-LP/books/NBSC_30k_5mvs.epd"
ORDER="random" # other option -> sequential
TOUR="round-robin"
pgn="c:/cluster.mfb/pgn/$DATE$ENG1$ENG2.pgn";
### hack to use floating point(fp) in bash (bc not available/working in Git basb), but it does screw up the Atom auto color, needed for calc of increment : inc= base/100 or if base is 10 seconds , 10/100=0.1 etc.
inc=$(printf %.2f "$(((10**3 * base)/100))e-3"); #echo $inc
## "$(printf %.2f "$((()/1))e-3"
TC="$base+$inc"
cutechess-cli -repeat -rounds $ROUNDS -games 2 -tournament $TOUR -tb c:/syzygy -tbpieces 6 -resign movecount=1 score=700 twosided=true -draw movenumber=40 movecount=10 score=2 -concurrency $CONCUR -openings file=$OFILE format=epd order=$ORDER plies=16 -engine name=$ENG1 cmd=$ENGCMD1 dir=$DIR option.EvalFile=$EVFILE1 -engine name=$ENG2 dir=$DIR cmd=$ENGCMD2 option.EvalFile=$EVFILE2 -each tc=$TC proto=uci option.Threads=$THREADS option.Hash=$HASH $SYZYGY -pgnout $pgn 2>/dev/null
This script works, example output with 6 sec base and 5 rounds - 10 games in total :
Code: Select all
$ ./run.sh
Indexing opening suite...
Started game 4 of 10 (1134 vs 2344)
Started game 10 of 10 (1134 vs 2344)
Started game 2 of 10 (1134 vs 2344)
Started game 3 of 10 (2344 vs 1134)
Started game 9 of 10 (2344 vs 1134)
Started game 7 of 10 (2344 vs 1134)
Started game 1 of 10 (2344 vs 1134)
Started game 6 of 10 (1134 vs 2344)
Started game 8 of 10 (1134 vs 2344)
Started game 5 of 10 (2344 vs 1134)
Finished game 1 (2344 vs 1134): 1/2-1/2 {Draw by adjudication: SyzygyTB}
Score of 2344 vs 1134: 0 - 0 - 1 [0.500] 1
Finished game 6 (1134 vs 2344): 1-0 {White wins by adjudication}
Score of 2344 vs 1134: 0 - 1 - 1 [0.250] 2
Finished game 7 (2344 vs 1134): 1/2-1/2 {Draw by adjudication}
Score of 2344 vs 1134: 0 - 1 - 2 [0.333] 3
Finished game 5 (2344 vs 1134): 1/2-1/2 {Draw by adjudication: SyzygyTB}
Score of 2344 vs 1134: 0 - 1 - 3 [0.375] 4
Finished game 9 (2344 vs 1134): 0-1 {Black wins by adjudication}
Score of 2344 vs 1134: 0 - 2 - 3 [0.300] 5
Finished game 8 (1134 vs 2344): 0-1 {Black wins by adjudication}
Score of 2344 vs 1134: 1 - 2 - 3 [0.417] 6
Finished game 2 (1134 vs 2344): 1/2-1/2 {Draw by adjudication: SyzygyTB}
Score of 2344 vs 1134: 1 - 2 - 4 [0.429] 7
Finished game 10 (1134 vs 2344): 0-1 {Black wins by adjudication}
Score of 2344 vs 1134: 2 - 2 - 4 [0.500] 8
Finished game 3 (2344 vs 1134): 1/2-1/2 {Draw by adjudication}
Score of 2344 vs 1134: 2 - 2 - 5 [0.500] 9
Finished game 4 (1134 vs 2344): 1-0 {White wins by adjudication}
Score of 2344 vs 1134: 2 - 3 - 5 [0.450] 10
... 2344 playing White: 0 - 1 - 4 [0.400] 5
... 2344 playing Black: 2 - 2 - 1 [0.500] 5
... White vs Black: 2 - 3 - 5 [0.450] 10
Elo difference: -34.9 +/- 163.5, LOS: 32.7 %, DrawRatio: 50.0 %
Finished match
http://talkchess.com/forum3/viewtopic.php?f=2&t=74566
In addition to running the match under cutechess-cli, you will get this type of reporting in a separate terminal window on periodic basis
Code: Select all
pgn file: c:/cluster.mfb/pgn/2007251425-23441134.pgn
tc/base+inc: 30+0.30
games planned: 4000
Threads: 1
Hash: 128
Current date : time (EDST)
Date: 07/25/20 : 16:35:44
Projected-> Time: 2h:8m:0s
Running -> Time: 2h:10m:11s
4000 game(s) loaded
Rank Name Rating Δ + - # Σ Σ% W L D W% =% OppR
---------------------------------------------------------------------------------------------------------
1 2344 3501 0.0 7 7 4000 2013.5 50.3 973 946 2081 24.3 52.0 3499
2 1134 3499 2.4 7 7 4000 1986.5 49.7 946 973 2081 23.6 52.0 3501
---------------------------------------------------------------------------------------------------------
Δ = delta from the next higher rated opponent
# = number of games played
Σ = total score, 1 point for win, 1/2 point for draw
LOS:
23 11
2344 74
1134 25
4000 game(s) loaded
loops/scheduled: 114/114
waiting: 64
...seconds remaining: 0
done