From 12e7170d17925e86bece71375a3581c945b470d4 Mon Sep 17 00:00:00 2001 From: doruk Date: Thu, 31 Mar 2022 11:51:30 +0300 Subject: [PATCH] Fix PV calculation --- src/bm/bm_search/search.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bm/bm_search/search.rs b/src/bm/bm_search/search.rs index 9d258f88..0c08185b 100644 --- a/src/bm/bm_search/search.rs +++ b/src/bm/bm_search/search.rs @@ -285,6 +285,8 @@ pub fn search( if Some(make_move) == skip_move { continue; } + local_context.search_stack_mut()[ply as usize + 1].pv_len = 0; + move_exists = true; let is_capture = pos .board() @@ -776,4 +778,4 @@ fn piece_pts(piece: Piece) -> i16 { Piece::Queen => 900, Piece::King => 20000, } -} \ No newline at end of file +}