aboutsummaryrefslogtreecommitdiff
path: root/src/grossmeister/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grossmeister/mod.rs')
-rw-r--r--src/grossmeister/mod.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/grossmeister/mod.rs b/src/grossmeister/mod.rs
index 67b20bd..03bb828 100644
--- a/src/grossmeister/mod.rs
+++ b/src/grossmeister/mod.rs
@@ -1,17 +1,20 @@
use std::sync::{atomic::AtomicBool, Arc};
+use smallvec::{SmallVec, smallvec};
+
use crate::board::Board;
-use self::ttable::{TranspositionTable, TTABLE_SIZE};
+use self::{ttable::{TranspositionTable, TTABLE_SIZE}, move_selector::MoveSelector};
mod ttable;
mod evaluation;
mod search;
mod UCI;
+mod move_selector;
/// Grossmeister is a powerful entity that plays the game of Chess.
/// This structure represents a player, it stores his knowledge
/// and experience about the game.
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct Grossmeister {
/// GM's internal board representation
/// This is usually a copy of a real board
@@ -22,6 +25,8 @@ pub struct Grossmeister {
/// It's indexex by Zobrist hash of a position mod size
transposition_table: TranspositionTable,
+ move_selectors: SmallVec<[MoveSelector; 0]>,
+
should_halt: Arc<AtomicBool>,
debug: bool,
}
@@ -37,6 +42,7 @@ impl Grossmeister {
Self {
board,
transposition_table: vec![None; TTABLE_SIZE as usize],
+ move_selectors: smallvec![MoveSelector::default(); 256],
should_halt: Arc::new(AtomicBool::new(false)),
debug: false,
}