Skip to content

Commit

Permalink
fix bench (#74)
Browse files Browse the repository at this point in the history
correctly use iterative deepening instead of only asp window

Bench: 2509356
  • Loading branch information
Disservin authored Jun 16, 2022
1 parent 7ec4c3b commit 94ccf08
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,18 @@ int start_bench() {
U64 totalNodes = 0;
Board board = Board();
Search searcher = Search(board);
Time t;
t.maximum = 0;
t.optimum = 0;
auto t1 = std::chrono::high_resolution_clock::now();
for (int positions = 0; positions < 50; positions++) {
searcher.board.applyFen(benchmarkfens[positions]);

int result = 0;
searcher.nodes = 0;

std::cout << "\nPosition: " << positions + 1 << "/50 " << benchmarkfens[positions] << std::endl;

searcher.t0 = std::chrono::high_resolution_clock::now();
for (int depth = 1; depth <= 7; depth++) {
result = searcher.aspiration_search(depth, result);
auto s2 = std::chrono::high_resolution_clock::now();
auto ms2 = std::chrono::duration_cast<std::chrono::milliseconds>(s2 - searcher.t0).count();
searcher.uci_output(result, depth, ms2);
}
stopped = false;
searcher.iterative_deepening(7, 0, t);
totalNodes += searcher.nodes;
}

Expand Down

0 comments on commit 94ccf08

Please sign in to comment.