diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-02-26 21:08:37 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-02-26 21:08:37 +0300 |
commit | 6a92408ef0209e48c2a09ab3c7c33d0e5a8dddce (patch) | |
tree | 18f067486c30fe0251468b98f5f0d0b76c7206d8 /src/grossmeister/search.rs | |
parent | fe952d63dc26c787350c9b3259d037344241665b (diff) | |
download | chessnost-6a92408ef0209e48c2a09ab3c7c33d0e5a8dddce.tar.gz |
feat: finish very basic UCI implementation
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 9 |
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"), } } |