mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 08:13:08 +00:00
Move depth computation out of fail low loop
In root_search() we can compute depth at the beginning once and for all. Spotted by Ralph Stoesser. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
be540b6dd7
commit
2170fa18bf
1 changed files with 1 additions and 1 deletions
|
@ -715,6 +715,7 @@ namespace {
|
|||
alpha = *alphaPtr;
|
||||
beta = *betaPtr;
|
||||
isCheck = pos.is_check();
|
||||
depth = (Iteration - 2) * OnePly + InitialDepth;
|
||||
|
||||
// Step 1. Initialize node (polling is omitted at root)
|
||||
ss->currentMove = ss->bestMove = MOVE_NONE;
|
||||
|
@ -764,7 +765,6 @@ namespace {
|
|||
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
||||
|
||||
// Step 11. Decide the new search depth
|
||||
depth = (Iteration - 2) * OnePly + InitialDepth;
|
||||
ext = extension<PV>(pos, move, captureOrPromotion, moveIsCheck, false, false, &dangerous);
|
||||
newDepth = depth + ext;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue