(no)GUI timings

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Post Reply
User avatar
hgm
Posts: 22206
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Contact:

(no)GUI timings

Post by hgm » Fri Feb 17, 2012 7:34 pm

I did some timing measurements on Linux, for the time elapsed between one engine sending its move, and the opponent receiving it ('delay'), and the time stolen by the interface while the engine was searching ('usage'). I tried this for XBoard and cutechess-cli, each with two WB engines or two UCI engines, where XBoard used either Polyglot or UCI2WB to connect to the UCI engines.

Conditions: 40 moves in 10 sec, 1.3GHz Celeron-M, ponder off.
The results were:

Code: Select all

                          delay    usage (both in msec)
cutechess-cli + WB        1.0       6
cutechess-cli + UCI       1.25      7
XBoard + WB               0.9       7
XBoard + UCI2WB + UCI     1.25      7
XBoard + Polyglot + UCI   2.0       9
My conclusion was that, speed-wise, it seems pointless to let XBoard support UCI natively. Polyglot seems a tiny bit slower than UCI2WB.

The raw timing histograms:

Code: Select all

hgm@hgm-laptop:~/cutechess-cli$ xboard -mg 1 -debug -fcp "./UCI2WB ./fruitT" -scp "./UCI2WB ./fruitT" -tc 0:10 -noGUI -xponder
StartChildProcess (dir=".") ./UCI2WB ./fruitT
StartChildProcess (dir=".") ./UCI2WB ./fruitT
StartChildProcess (dir=".") ./UCI2WB ./fruitT
xboard: Match Fruit 2.1 (UCI2WB) vs. Fruit 2.1 (UCI2WB): final score 0-1-0
hgm@hgm-laptop&#58;~/cutechess-cli$ ../fboard/copy/tcount<xboard.debug
delay
  1.     91
  2.     38
usage &#40;avg = 7&#41;
  0.     11
  2.     20
  4.     29
  6.     19
  8.     20
 10.     15
 12.      4
 14.      3
 16.      4
 18.      3
 38.      1
 60.      1
hgm@hgm-laptop&#58;~/cutechess-cli$ ./cutechess-cli.sh -engine name=fruit -engine name=fruit -each cmd=./fruitT proto=uci tc=40/10 -debug>qt.debug
hgm@hgm-laptop&#58;~/cutechess-cli$ ../fboard/copy/tcount<qt.debug
delay
  0.      7
  1.     88
  2.     31
usage &#40;avg = 7&#41;
  0.      8
  2.     12
  4.     25
  6.     29
  8.     18
 10.     13
 12.      6
 14.      6
 16.      3
 18.      2
 20.      2
 46.      1
hgm@hgm-laptop&#58;~/cutechess-cli$ xboard -mg 1 -debug -fcp ./fruitT -fUCI -scp ./fruitT -sUCI -tc 0&#58;10 -noGUI -xponder
StartChildProcess &#40;dir="") polyglot -noini -ec "./fruitT" -ed "." -uci NalimovCache=4
StartChildProcess &#40;dir="") polyglot -noini -ec "./fruitT" -ed "." -uci NalimovCache=4
xboard&#58; Match Fruit 2.1 vs. Fruit 2.1&#58; final score 1-0-0
hgm@hgm-laptop&#58;~/cutechess-cli$ ../fboard/copy/tcount<xboard.debug
delay
  1.     14
  2.    113
  3.      5
  4.      1
  5.      1
usage &#40;avg = 9&#41;
  0.      4
  2.     16
  4.     13
  6.     29
  8.     28
 10.     22
 12.      8
 14.      3
 16.      4
 18.      2
 20.      2
 30.      1
 34.      1
 64.      1
hgm@hgm-laptop&#58;~/cutechess-cli$ xboard -mg 1 -debug -fcp fairymax -scp fairymax -tc 0&#58;10 -noGUI -xponder
StartChildProcess &#40;dir=".") fairymax
StartChildProcess &#40;dir=".") fairymax
xboard&#58; Match Fairy-Max 4.8R vs. Fairy-Max 4.8R&#58; final score 0-0-1
hgm@hgm-laptop&#58;~/cutechess-cli$ ../fboard/copy/tcount<xboard.debug
delay
  0.     30
  1.    102
  2.     16
  3.      3
  4.      2
  5.      1
usage &#40;avg = 7&#41;
  0.     14
  2.     20
  4.     20
  6.     23
  8.     24
 10.     15
 12.      7
 14.      2
 16.      3
 18.      4
 20.      1
 22.      2
 26.      2
 44.      1
 52.      1
hgm@hgm-laptop&#58;~/cutechess-cli$ ./cutechess-cli.sh -engine name=fairymax -engine name=fairymax -each cmd=fairymax proto=xboard tc=40/10 -debug>qt.debug
hgm@hgm-laptop&#58;~/cutechess-cli$ ../fboard/copy/tcount<qt.debug
delay
  0.     14
  1.     43
  2.     16
  3.      4
  5.      2
  6.      1
  7.      1
  8.      1
 17.      1
 22.      1
usage &#40;avg = 6&#41;
  0.      4
  2.     18
  4.     11
  6.     11
  8.      7
 10.      7
 12.      5
 14.      3
 16.      3
 18.      2
 20.      1
 24.      1
hgm@hgm-laptop&#58;~/cutechess-cli$ 

User avatar
hgm
Posts: 22206
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Contact:

Re: (no)GUI timings

Post by hgm » Sun Feb 19, 2012 4:42 pm

Thanks to Jim Ablett's special Fruit compile with sub-ms timing, now also some timings on Windows for running UCI engines:

Code: Select all

                      delay  usage
cutechess-cli          1.45   3.1
WinBoard + UCI2WB      2.1    4.1
WinBoard + Polyglot    3.2    3.6

Post Reply