aboutsummaryrefslogtreecommitdiff
path: root/src/board
diff options
context:
space:
mode:
Diffstat (limited to 'src/board')
-rw-r--r--src/board/engine.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs
index 8809378..c4aa615 100644
--- a/src/board/engine.rs
+++ b/src/board/engine.rs
@@ -317,7 +317,6 @@ impl Board {
// Could not finish in time, return what we have so far
if Instant::now() > deadline {
- println!("Returning early!");
return (alpha, principal_variation)
}
}
@@ -387,16 +386,20 @@ impl Board {
let mut gradual_widening_counter = 0;
while depth <= max_depth {
+ println!("\nSearching depth({}) in the window {:?}", depth, (alpha, beta));
let search_result = self.negamax_search(alpha, beta, depth, deadline);
- println!("Finished depth({}) {:?} [{:?} left]", depth, search_result, deadline - Instant::now());
if search_result.0.abs() >= VALUE_WIN {
return search_result
}
if Instant::now() > deadline {
+ println!("Aborting...");
break;
}
+
+ println!("Finished depth({}) {:?} [{:?} left]", depth, search_result, deadline - Instant::now());
+
if search_result.1.len() > 0 {
depth += 1;
gradual_widening_counter = 0;