Skip to content

Commit

Permalink
Better bench script and reset seldepth
Browse files Browse the repository at this point in the history
Bench: 3091908
  • Loading branch information
SzilBalazs committed Aug 6, 2023
1 parent a484998 commit 492bbde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def task():
output = subprocess.check_output(["./WhiteCore", 'bench']).decode("utf8")
output = subprocess.check_output(["./WhiteCore-v0-2", 'bench']).decode("utf8")
return output


Expand All @@ -35,16 +35,19 @@ def parse_nps(output):

def main(thread_count):
executor = ThreadPoolExecutor(max_workers=thread_count)
futures = [executor.submit(task) for _ in range(thread_count)]
futures = [executor.submit(task) for _ in range(thread_count * 10)]

nps_values = []

for future in concurrent.futures.as_completed(futures):
output = future.result()
nps = parse_nps(output)
nps_values.append(nps)

average_nps = sum(nps_values) / len(nps_values)
average_nps = sum(nps_values) / len(nps_values)
print(f"Average NPS: {int(average_nps)}\r", end="")
total_nps = sum(nps_values)
average_nps = total_nps / len(nps_values)
print(f"Total NPS: {total_nps / 10}")
print(f"Average NPS: {int(average_nps)}")


Expand Down
2 changes: 2 additions & 0 deletions src/search/search_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ namespace search {
beta = prev_score + delta;
}

max_ply = 0;

SearchStack stack[MAX_PLY + 10];
SearchStack *ss = stack + 7;
for (Ply i = -7; i <= MAX_PLY + 2; i++) {
Expand Down

0 comments on commit 492bbde

Please sign in to comment.