Add one killer move per ply

This commit is contained in:
stefiosif
2025-01-27 22:21:21 +02:00
parent b4f61f6504
commit ccba6451aa
6 changed files with 39 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
use crate::{
board::fen::from_fen,
movegen::r#move::{Move, MoveType},
search::{transposition_table::TranspositionTable, MAX_TT_SIZE},
search::{transposition_table::TranspositionTable, MAX_DEPTH, MAX_TT_SIZE},
};
use String as FenError;
@@ -29,6 +29,7 @@ pub struct Game {
pub mailbox: Mailbox,
pub hash: ZobristHash,
pub tt: TranspositionTable,
pub killer: [Option<Move>; MAX_DEPTH as usize],
}
impl Game {
@@ -39,6 +40,7 @@ impl Game {
mailbox: Mailbox::from_board(&Board::startpos()),
hash: zobrist_keys().calculate_hash(&Board::startpos()),
tt: TranspositionTable::new(MAX_TT_SIZE),
killer: [None; MAX_DEPTH as usize],
}
}