diff options
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index 7b40fab..cfe1e6d 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -236,14 +236,18 @@ impl Grossmeister { gradual_widening_counter += 1; beta = alpha + window_size * 0.1; alpha = search_result.0 - window_size * 2.0f32.powi(gradual_widening_counter); - println!("info score upperbound {:.0}", beta * 100.0); + if self.debug { + println!("info score upperbound {:.0}", beta * 100.0); + } continue; } if search_result.0 >= beta { // Beta-cutoff gradual_widening_counter += 1; alpha = beta - window_size * 0.1; beta = search_result.0 + window_size * 2.0f32.powi(gradual_widening_counter); - println!("info score lowerbound {:.0}", alpha * 100.0); + if self.debug { + println!("info score lowerbound {:.0}", alpha * 100.0); + } continue; } @@ -471,8 +475,7 @@ mod tests { #[test] fn stupid_knight_sac() { let fen = String::from("r3k1r1/pp3ppp/1q6/2ppPn2/6P1/1PPP1P2/P1N3KP/R2QR3 b - - 0 18"); - let mut board = Board::from_FEN(fen); - board.ply += 1; // TODO: remove me when FEN parsing includes side to move + let board = Board::from_FEN(fen); let mut gm = Grossmeister::new(board); let (_, pv) = gm.iterative_deepening(6); |