Have server provide explicit int32 seeds
This commit is contained in:
1 parent
795f1a0528
commit
076f7af5ea
4 files changed
+9
-7
No files matched your search
+3
-2
@@ -112,19 +112,20 @@ def create_genfens_opening_book(config, binary_name, network):
|
||||
|
||||
# Format: ./engine "genfens N seed S book <None|book.epd>" "quit"
|
||||
N = genfens_required_openings_each(config)
|
||||
seed = config.workload['test']['book_index']
|
||||
seeds = config.workload['test']['genfens_seeds']
|
||||
args = genfens_command_args(config, binary_name, network)
|
||||
|
||||
start_time = time.time()
|
||||
output = multiprocessing.Queue()
|
||||
print ('\nGenerating %d Openings using %d Threads...' % (N * config.threads, config.threads))
|
||||
|
||||
|
||||
# Split the work over many threads. Ensure the seed varies by the thread,
|
||||
# number in accordance with how many openings each thread will generate
|
||||
processes = [
|
||||
multiprocessing.Process(
|
||||
target=genfens_single_threaded,
|
||||
args=(genfens_command_builder(*args, genfens_seed(config, N, ii)), output))
|
||||
args=(genfens_command_builder(*args, seeds[ii]), output))
|
||||
for ii in range(config.threads)
|
||||
]
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ from genfens import create_genfens_opening_book
|
||||
|
||||
## Basic configuration of the Client. These timeouts can be changed at will
|
||||
|
||||
CLIENT_VERSION = 31 # Client version to send to the Server
|
||||
CLIENT_VERSION = 32 # Client version to send to the Server
|
||||
TIMEOUT_HTTP = 30 # Timeout in seconds for HTTP requests
|
||||
TIMEOUT_ERROR = 10 # Timeout in seconds when any errors are thrown
|
||||
TIMEOUT_WORKLOAD = 30 # Timeout in seconds between workload requests
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"client_version" : 31,
|
||||
"client_version" : 32,
|
||||
"client_repo_url" : "https://github.com/AndyGrant/OpenBench",
|
||||
"client_repo_ref" : "master",
|
||||
|
||||
|
||||
@@ -249,10 +249,11 @@ def workload_to_dictionary(test, result, machine):
|
||||
cutechess_cnt = workload['distribution']['cutechess-count']
|
||||
pairs_per_cnt = workload['distribution']['games-per-cutechess'] // 2
|
||||
|
||||
if test.test_mode == 'DATAGEN' and not test.play_reverses:
|
||||
test.book_index += cutechess_cnt * pairs_per_cnt * 2
|
||||
else:
|
||||
if test.test_mode != 'DATAGEN':
|
||||
test.book_index += cutechess_cnt * pairs_per_cnt
|
||||
else:
|
||||
workload['test']['genfens_seeds'] = [
|
||||
random.randint(0, 2**32 - 1) for x in range(machine.info['concurrency'])]
|
||||
|
||||
test.save()
|
||||
|
||||
|
||||
Reference in new issue
Block a user