Skip to content

Commit

Permalink
Take 3
Browse files Browse the repository at this point in the history
Bench: 9023566
  • Loading branch information
SzilBalazs committed Sep 2, 2023
1 parent cd47d12 commit cd8bdd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/search/history.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace search {
Score get_history(chess::Move move, SearchStack *ss) const {
Score value = butterfly[move.get_from()][move.get_to()];
if ((ss - 1)->move.is_ok()) {
value += 3 * conthist[(ss - 1)->pt][(ss - 1)->move.get_to()][move.get_from()][move.get_to()];
value += 2 * conthist[(ss - 1)->pt][(ss - 1)->move.get_to()][move.get_from()][move.get_to()];
}
return value;
}
Expand Down
2 changes: 1 addition & 1 deletion src/search/move_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace search {
} else if (move == history.counter_moves[last_move.get_from()][last_move.get_to()]) {
return MOVE_SCORE_COUNTER;
} else {
return history.get_history(move, ss);
return history.butterfly[move.get_from()][move.get_to()];
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/search/search_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ namespace search {

R -= pv_node;
R += !improving;
R -= std::clamp(history.butterfly[move.get_from()][move.get_to()] / 4096, -2, 2);
R -= std::clamp(history.get_history(move, ss) / 4096, -2, 2);

Depth D = std::clamp(new_depth - R, 1, depth - 1);
score = -search<NON_PV_NODE>(D, -alpha - 1, -alpha, ss + 1);
Expand Down

0 comments on commit cd8bdd0

Please sign in to comment.