Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
fix: fixed bad calculation in time remaining. now uses 5% remaining +…
Browse files Browse the repository at this point in the history
… 50% inc
  • Loading branch information
dannyhammer committed Aug 19, 2024
1 parent fdabadc commit 05750e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brogle/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ impl UciEngine for Engine {

let (time, inc) = (time.unwrap_or(Duration::MAX), inc.unwrap_or(Duration::ZERO));

// 5% of time remaining + time increment
time / 20 + inc
// 5% of time remaining + 50% time increment
time / 20 + inc / 2
};

// eprintln!("Starting search for {timeout:?}");
Expand Down

0 comments on commit 05750e0

Please sign in to comment.