Add repetition detection
This commit is contained in:
@@ -24,6 +24,10 @@ pub fn negamax(
|
||||
bail!("Time is up! In Negamax");
|
||||
}
|
||||
|
||||
if plies != 0 && game.in_repetition() {
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
if depth == 0 {
|
||||
let q_score = quiescence(game, alpha, beta, time_info).map_err(|e| anyhow!("{e}"))?;
|
||||
return Ok(q_score);
|
||||
|
||||
Reference in New Issue
Block a user