diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-02-21 03:24:17 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-02-21 03:24:17 +0300 |
commit | 02ebad55af6c76ac9e36832f9be041f547f63b7c (patch) | |
tree | b8b5a2195b434e5850287a913d3e2458b16b68b6 /src | |
parent | fa6f6c3f5f8f872a216ccdb593492775c0d265a1 (diff) | |
download | chessnost-02ebad55af6c76ac9e36832f9be041f547f63b7c.tar.gz |
perf: check depth == 0 as early as possible
Diffstat (limited to 'src')
-rw-r--r-- | src/board/engine.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs index 1516784..ad2b3b2 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -370,13 +370,13 @@ impl Board { None => {}, } - let mut moves = self.generate_pseudolegal_moves(color); - moves = self.order_moves(moves, parent_killers.to_vec()); - if depth_left == 0 { return (self.quiscence(alpha, beta), principal_variation); } + let mut moves = self.generate_pseudolegal_moves(color); + moves = self.order_moves(moves, parent_killers.to_vec()); + let mut should_pv_search = true; let mut legal_move_found = false; for mov in moves { |