Skip to content

Commit 0220f74

Browse files
fix: don't search drawn positions (#168)
Elo | 28.62 +- 10.58 (95%) SPRT | 8.0+0.08s Threads=1 Hash=16MB LLR | 3.00 (-2.94, 2.94) [-5.00, 0.00] Games | N: 1472 W: 349 L: 228 D: 895 Penta | [19, 120, 346, 223, 28] https://openbench.nocturn9x.space/test/4812/ bench: 1119492
1 parent 45c74da commit 0220f74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

engine/src/search.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,11 @@ impl<'a, Log: LogLevel> Search<'a, Log> {
425425
return score;
426426
}
427427

428+
// don't bother searching if the board is in a draw state
429+
if board.is_draw() {
430+
return Score::DRAW;
431+
}
432+
428433
// get all legal moves
429434
let mut move_list = MoveList::new();
430435
let mut order_list = ArrayVec::<MoveOrder, MAX_MOVE_LIST_SIZE>::new();

0 commit comments

Comments
 (0)