diff --git a/Client/Client.py b/Client/Client.py index c2ce48a..faa9fe2 100644 --- a/Client/Client.py +++ b/Client/Client.py @@ -392,7 +392,7 @@ class Cutechess: ## and a small number of secondary arguments that are not housed in the Configuration @staticmethod - def basic_settings(config, seed): + def basic_settings(config): # Assume Fischer if FRC, 960, or FISCHER appears in the Opening Book book_name = config.workload['test']['book']['name'].upper() @@ -400,7 +400,7 @@ class Cutechess: variant = ['standard', 'fischerandom'][is_frc] # Always include -repeat and -recover - return '-repeat -recover -srand %d -variant %s' % (seed, variant) + return '-repeat -recover -variant %s' % (variant) @staticmethod def concurrency_settings(config): @@ -435,12 +435,18 @@ class Cutechess: return '%s %s %s' % (win_flags, draw_flags, syzygy_flags) @staticmethod - def book_settings(config): + def book_settings(config, cutechess_idx): # Can handle EPD and PGN Books, which must be specified book_name = config.workload['test']['book']['name'] book_suffix = book_name.split('.')[-1] - return '-openings file=Books/%s format=%s order=random plies=16' % (book_name, book_suffix) + + # Start position is determined partially by cutechess index + pairs = config.workload['distribution']['games-per-cutechess'] // 2 + start = config.workload['test']['book_index'] + cutechess_idx * pairs + + return '-openings file=Books/%s format=%s order=random start=%d -srand %d' % ( + book_name, book_suffix, start, config.workload['test']['book_seed']) @staticmethod def engine_settings(config, command, branch, scale_factor, cutechess_idx): @@ -478,12 +484,13 @@ class Cutechess: return '-engine dir=Engines/ cmd=./%s proto=uci %s%s name=%s-%s' % (command, control, options, name, branch) @staticmethod - def pgnout_settings(config, seed): + def pgnout_settings(config, timestamp, cutechess_idx): test_id = int(config.workload['test']['id']) result_id = int(config.workload['result']['id']) - return '-pgnout PGNs/%d.%d.%d.pgn' % (test_id, result_id, seed) + # Format: --