mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Move singleEvasion assignment out of move's loop
We don't need to recheck after every move. Spotted by Ralph Stoesser. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
b24a2dfc72
commit
971c591be7
1 changed files with 7 additions and 7 deletions
|
@ -1061,7 +1061,7 @@ namespace {
|
||||||
Depth ext, newDepth;
|
Depth ext, newDepth;
|
||||||
Value bestValue, value, oldAlpha;
|
Value bestValue, value, oldAlpha;
|
||||||
Value refinedValue, nullValue, futilityValueScaled; // Non-PV specific
|
Value refinedValue, nullValue, futilityValueScaled; // Non-PV specific
|
||||||
bool isCheck, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
|
bool isCheck, singleEvasion, singularExtensionNode, moveIsCheck, captureOrPromotion, dangerous;
|
||||||
bool mateThreat = false;
|
bool mateThreat = false;
|
||||||
int moveCount = 0;
|
int moveCount = 0;
|
||||||
int threadID = pos.thread();
|
int threadID = pos.thread();
|
||||||
|
@ -1257,11 +1257,12 @@ namespace {
|
||||||
// Initialize a MovePicker object for the current position
|
// Initialize a MovePicker object for the current position
|
||||||
MovePicker mp = MovePicker(pos, ttMove, depth, H, ss, (PvNode ? -VALUE_INFINITE : beta));
|
MovePicker mp = MovePicker(pos, ttMove, depth, H, ss, (PvNode ? -VALUE_INFINITE : beta));
|
||||||
CheckInfo ci(pos);
|
CheckInfo ci(pos);
|
||||||
bool singularExtensionNode = depth >= SingularExtensionDepth[PvNode]
|
singleEvasion = isCheck && mp.number_of_evasions() == 1;
|
||||||
&& tte && tte->move()
|
singularExtensionNode = depth >= SingularExtensionDepth[PvNode]
|
||||||
&& !excludedMove // Do not allow recursive singular extension search
|
&& tte && tte->move()
|
||||||
&& is_lower_bound(tte->type())
|
&& !excludedMove // Do not allow recursive singular extension search
|
||||||
&& tte->depth() >= depth - 3 * OnePly;
|
&& is_lower_bound(tte->type())
|
||||||
|
&& tte->depth() >= depth - 3 * OnePly;
|
||||||
|
|
||||||
// Step 10. Loop through moves
|
// Step 10. Loop through moves
|
||||||
// Loop through all legal moves until no moves remain or a beta cutoff occurs
|
// Loop through all legal moves until no moves remain or a beta cutoff occurs
|
||||||
|
@ -1274,7 +1275,6 @@ namespace {
|
||||||
if (move == excludedMove)
|
if (move == excludedMove)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
singleEvasion = (isCheck && mp.number_of_evasions() == 1);
|
|
||||||
moveIsCheck = pos.move_is_check(move, ci);
|
moveIsCheck = pos.move_is_check(move, ci);
|
||||||
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue