Reduce size of eval to i16
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user