Reduce size of eval to i16

This commit is contained in:
stefiosif
2025-02-04 20:02:29 +02:00
parent 55056537f3
commit 908a87bd26
7 changed files with 21 additions and 19 deletions

View File

@@ -14,14 +14,14 @@ use super::{
pub fn negamax(
game: &mut Game,
mut alpha: i32,
beta: i32,
mut alpha: i16,
beta: i16,
mut depth: u8,
plies: u8,
time: &TimeInfo,
nodes: &mut u64,
do_nmp: bool,
) -> Result<i32> {
) -> Result<i16> {
if time.exceed_hard_limit() {
bail!("Hard limit exceeded in negamax");
}
@@ -137,7 +137,7 @@ pub fn negamax(
if legal_moves == 0 {
if in_check {
return Ok(-MATE_SCORE + plies as i32);
return Ok(-MATE_SCORE + plies as i16);
}
return Ok(0);
}