CLOP + cutechess cli

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

CLOP + cutechess cli

Post by Engin »

it seems for me that there is something wrong with the new script of cutechess_cli.py sending the results outcome to CLOP:

# Convert Cutechess-cli's result into W/L/D
# Note that only one game should be played
result = -1
for line in output.splitlines():
if line.startswith('Finished game'):
if line.find(": 1-0") != -1:
result = clop_seed % 2
elif line.find(": 0-1") != -1:
result = (clop_seed % 2) ^ 1
elif line.find(": 1/2-1/2") != -1:
result = 2
break

if result == 0:
print 'W'
elif result == 1:
print 'L'
elif result == 2:
print 'D'

if i right understand is the tuning engine that win/lose/draw against opponents, but when i looked the pgn file there is outcome if my engine is WIN then its send L , if its losed its send a W, so that is complete wrong and the tuning values wrong too.

wich side is WIN or LOSE please ?

should that not be like this

if line.startswith('Finished game'):
if line.find(": 0-1") != -1:
result = clop_seed % 2
elif line.find(": 1-0") != -1:
result = (clop_seed % 2) ^ 1
elif line.find(": 1/2-1/2") != -1:
result = 2
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: CLOP + cutechess cli

Post by Engin »

...and i did not understand how CLOP change the values for tune the engine, i guess its should change the values if the engine is losed and let stay the other values if the engine is win or draw, because the values are good.

nothing understand the Eigenvectors or Hessian, and what i change after playing thausend of games now ??

wich values or how much games are enough to using the values in my source ?
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: CLOP + cutechess cli

Post by ilari »

Oh, this is a bad one. There's just some syntax wrong with the script, but otherwise it's fine. However, you just found a serious bug in Cutechess-cli 0.5.0. Because the "-fcp" and "-scp" options were replaced with "-engine" and because the options are stored in a multimap structure, there's no guarantee that the first "-engine" is actually going to play the first game as white. I was very unlucky not to catch this bug in my testing. This isn't a problem in normal engine-engine matches, but for optimization with CLOP it's a disaster.

Stay tuned while I work on a fix, and thanks for reporting the bug...
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: CLOP + cutechess cli

Post by Engin »

thx too for quick answered me. i will see later how is the new script now work.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: CLOP + cutechess cli

Post by ilari »

Engin wrote:thx too for quick answered me. i will see later how is the new script now work.
Thank you for reporting the bug. The script should work fine if you use the new Cutechess-cli 0.5.1: http://talkchess.com/forum/viewtopic.php?t=41829