From 6a92408ef0209e48c2a09ab3c7c33d0e5a8dddce Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 26 Feb 2023 21:08:37 +0300 Subject: feat: finish very basic UCI implementation --- src/grossmeister/search.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/grossmeister/search.rs') 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 = 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"), } } -- cgit v1.2.3