Check for FRC/960 Book, and set a cutechess variant

This commit is contained in:
AndyGrant committed 2019-06-22 11:14:20 -04:00
1 parent 1745fa853b
commit b9f86691b1
1 file changed
+8
+8
View File
@@ -157,6 +157,13 @@ def getCutechessCommand(data, scalefactor):
basethreads = int(tokens[0].split('=')[1])
baseoptions = ' option.'.join(['']+tokens)
# Check for an FRC/Chess960 opening book
variant = 'standard'
if "FRC" in data['test']['book']['name'].upper():
variant = 'fischerandom'
if "960" in data['test']['book']['name'].upper():
variant = 'fischerandom'
# Finally, output the time control for the user
print ('ORIGINAL :', data['test']['timecontrol'])
print ('SCALED :', timecontrol)
@@ -167,6 +174,7 @@ def getCutechessCommand(data, scalefactor):
' -srand ' + str(int(time.time())) +
' -resign movecount=3 score=400'
' -draw movenumber=40 movecount=8 score=10'
' -variant ' + variant +
' -concurrency ' + str(int(math.floor(THREADS / max(devthreads, basethreads)))) +
' -games ' + str(GAMES_PER_TASK) +
' -recover'