aboutsummaryrefslogtreecommitdiff
path: root/src/grossmeister/search.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-02-26 21:08:37 +0300
committereug-vs <eugene@eug-vs.xyz>2023-02-26 21:08:37 +0300
commit6a92408ef0209e48c2a09ab3c7c33d0e5a8dddce (patch)
tree18f067486c30fe0251468b98f5f0d0b76c7206d8 /src/grossmeister/search.rs
parentfe952d63dc26c787350c9b3259d037344241665b (diff)
downloadchessnost-6a92408ef0209e48c2a09ab3c7c33d0e5a8dddce.tar.gz
feat: finish very basic UCI implementation
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r--src/grossmeister/search.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs
index 2c2a296..def4305 100644
--- a/src/grossmeister/search.rs
+++ b/src/grossmeister/search.rs
@@ -199,8 +199,8 @@ impl Grossmeister {
let mut gradual_widening_counter = 0;
let mut root_killers: Vec<Move> = Vec::new();
- println!("info depth 1");
while depth <= max_depth {
+ println!("info depth {}", depth);
if self.debug {
println!("info string window {:?}", (alpha, beta));
}
@@ -245,7 +245,6 @@ impl Grossmeister {
print!("{} ", mov);
}
println!();
- println!("info depth {}", depth);
}
result = Some(search_result);
@@ -254,8 +253,12 @@ impl Grossmeister {
}
}
+
match result {
- Some(r) => r,
+ Some(r) => {
+ println!("bestmove {}", r.1[0]);
+ r
+ }
None => panic!("Could not find a move in time"),
}
}