diff options
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index 68756d8..b7a4208 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -1,11 +1,8 @@ -use std::cmp::Ordering; use std::f32::INFINITY; -use smallvec::SmallVec; +use crate::{moves::{Move, MoveKind}, board::io::IO}; -use crate::{moves::{Move, MoveKind}, board::{io::IO, move_generation::MoveList}}; - -use super::{Grossmeister, ttable::{NodeType, TTABLE_SIZE, TranspositionTableItem}, move_selector::MoveSelector}; +use super::{Grossmeister, ttable::{NodeType, TTABLE_SIZE, TranspositionTableItem}}; const VALUE_WIN: f32 = 20_000.0; @@ -166,15 +163,13 @@ impl Grossmeister { alpha = stand_pat; } - tactical_only = true; - // If we are not in check, we can only search tactical moves - // moves.retain(|m| m.is_tactical()) + tactical_only = true; } let mut legal_move_found = false; self.cleanup_selector(); - while let Some(mov) = if tactical_only { self.next_capture() } else { self.next_move() } { + while let Some(mov) = if tactical_only { self.next_tactical() } else { self.next_move() } { let ep_target_before = self.board.ep_target; let castling_rights_before = self.board.castling_rights; let hash_before = self.board.hash; |