Skip to content

Commit

Permalink
remove time-to-move adjustment during aspiration windows
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocodutra committed Dec 29, 2024
1 parent 3a1e27d commit a9046ed
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/search/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ impl Engine {
let mut pv = Pv::new(Score::lower(), []);

'id: for depth in Depth::iter() {
let mut overtime = time.end - time.start;
let mut draft = depth;
let mut delta = 5i16;

Expand All @@ -399,7 +398,7 @@ impl Engine {

'aw: loop {
delta = delta.saturating_mul(2);
if ctrl.timer().remaining() < Some(overtime) {
if ctrl.timer().remaining() < Some(time.end - time.start) {
break 'id;
}

Expand All @@ -409,14 +408,12 @@ impl Engine {

match partial.score() {
score if (-lower..Score::upper()).contains(&-score) => {
overtime /= 2;
draft = depth;
upper = lower / 2 + upper / 2;
lower = score - delta;
}

score if (upper..Score::upper()).contains(&score) => {
overtime = time.end - time.start;
draft = draft - 1;
upper = score + delta;
pv = partial;
Expand Down

0 comments on commit a9046ed

Please sign in to comment.