diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/grossmeister/search.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index 45d2330..4d990f6 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -146,7 +146,7 @@ impl Grossmeister { } // Could not finish in time, return what we have so far - if self.should_halt.load(std::sync::atomic::Ordering::SeqCst) { + if root_distance > 0 && self.should_halt.load(std::sync::atomic::Ordering::SeqCst) { break; } } @@ -287,7 +287,7 @@ impl Grossmeister { while depth <= max_depth { let score = self.negamax_search(-INFINITY, INFINITY, depth, 0); - if self.should_halt.load(std::sync::atomic::Ordering::SeqCst) { + if depth > 1 && self.should_halt.load(std::sync::atomic::Ordering::SeqCst) { println!("info string halting search"); break; } |