Because that's the correct meaning. Note that also the
corresponding UCI option has been renamed.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
bool loseOnTime = false;
// Extensions. Array index 0 is used at non-PV nodes, index 1 at PV nodes.
bool loseOnTime = false;
// Extensions. Array index 0 is used at non-PV nodes, index 1 at PV nodes.
- Depth CheckExtension[2], SingleReplyExtension[2], PawnPushTo7thExtension[2];
+ Depth CheckExtension[2], SingleEvasionExtension[2], PawnPushTo7thExtension[2];
Depth PassedPawnExtension[2], PawnEndgameExtension[2], MateThreatExtension[2];
// Iteration counters
Depth PassedPawnExtension[2], PawnEndgameExtension[2], MateThreatExtension[2];
// Iteration counters
bool connected_moves(const Position& pos, Move m1, Move m2);
bool value_is_mate(Value value);
bool move_is_killer(Move m, const SearchStack& ss);
bool connected_moves(const Position& pos, Move m1, Move m2);
bool value_is_mate(Value value);
bool move_is_killer(Move m, const SearchStack& ss);
- Depth extension(const Position& pos, Move m, bool pvNode, bool capture, bool check, bool singleReply, bool mateThreat, bool* dangerous);
+ Depth extension(const Position&, Move, bool, bool, bool, bool, bool, bool*);
bool ok_to_do_nullmove(const Position& pos);
bool ok_to_prune(const Position& pos, Move m, Move threat);
bool ok_to_use_TT(const TTEntry* tte, Depth depth, Value beta, int ply);
bool ok_to_do_nullmove(const Position& pos);
bool ok_to_prune(const Position& pos, Move m, Move threat);
bool ok_to_use_TT(const TTEntry* tte, Depth depth, Value beta, int ply);
CheckExtension[1] = Depth(get_option_value_int("Check Extension (PV nodes)"));
CheckExtension[0] = Depth(get_option_value_int("Check Extension (non-PV nodes)"));
CheckExtension[1] = Depth(get_option_value_int("Check Extension (PV nodes)"));
CheckExtension[0] = Depth(get_option_value_int("Check Extension (non-PV nodes)"));
- SingleReplyExtension[1] = Depth(get_option_value_int("Single Reply Extension (PV nodes)"));
- SingleReplyExtension[0] = Depth(get_option_value_int("Single Reply Extension (non-PV nodes)"));
+ SingleEvasionExtension[1] = Depth(get_option_value_int("Single Evasion Extension (PV nodes)"));
+ SingleEvasionExtension[0] = Depth(get_option_value_int("Single Evasion Extension (non-PV nodes)"));
PawnPushTo7thExtension[1] = Depth(get_option_value_int("Pawn Push to 7th Extension (PV nodes)"));
PawnPushTo7thExtension[0] = Depth(get_option_value_int("Pawn Push to 7th Extension (non-PV nodes)"));
PawnPushTo7thExtension[1] = Depth(get_option_value_int("Pawn Push to 7th Extension (PV nodes)"));
PawnPushTo7thExtension[0] = Depth(get_option_value_int("Pawn Push to 7th Extension (non-PV nodes)"));
Move ttMove, move;
Depth ext, newDepth;
Value oldAlpha, value;
Move ttMove, move;
Depth ext, newDepth;
Value oldAlpha, value;
- bool isCheck, mateThreat, singleReply, moveIsCheck, captureOrPromotion, dangerous;
+ bool isCheck, mateThreat, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
int moveCount = 0;
Value bestValue = -VALUE_INFINITE;
int moveCount = 0;
Value bestValue = -VALUE_INFINITE;
ttMove = (tte ? tte->move() : MOVE_NONE);
// Go with internal iterative deepening if we don't have a TT move
ttMove = (tte ? tte->move() : MOVE_NONE);
// Go with internal iterative deepening if we don't have a TT move
- if (UseIIDAtPVNodes && ttMove == MOVE_NONE && depth >= 5*OnePly)
+ if ( UseIIDAtPVNodes
+ && depth >= 5*OnePly
+ && ttMove == MOVE_NONE)
{
search_pv(pos, ss, alpha, beta, depth-2*OnePly, ply, threadID);
ttMove = ss[ply].pv[ply];
{
search_pv(pos, ss, alpha, beta, depth-2*OnePly, ply, threadID);
ttMove = ss[ply].pv[ply];
{
assert(move_is_ok(move));
{
assert(move_is_ok(move));
- singleReply = (isCheck && mp.number_of_evasions() == 1);
+ singleEvasion = (isCheck && mp.number_of_evasions() == 1);
moveIsCheck = pos.move_is_check(move, ci);
captureOrPromotion = pos.move_is_capture_or_promotion(move);
// Decide the new search depth
moveIsCheck = pos.move_is_check(move, ci);
captureOrPromotion = pos.move_is_capture_or_promotion(move);
// Decide the new search depth
- ext = extension(pos, move, true, captureOrPromotion, moveIsCheck, singleReply, mateThreat, &dangerous);
+ ext = extension(pos, move, true, captureOrPromotion, moveIsCheck, singleEvasion, mateThreat, &dangerous);
// Singular extension search. We extend the TT move if its value is much better than
// its siblings. To verify this we do a reduced search on all the other moves but the
// Singular extension search. We extend the TT move if its value is much better than
// its siblings. To verify this we do a reduced search on all the other moves but the
Move ttMove, move;
Depth ext, newDepth;
Value approximateEval, nullValue, value, futilityValue, futilityValueScaled;
Move ttMove, move;
Depth ext, newDepth;
Value approximateEval, nullValue, value, futilityValue, futilityValueScaled;
- bool isCheck, useFutilityPruning, singleReply, moveIsCheck, captureOrPromotion, dangerous;
+ bool isCheck, useFutilityPruning, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
bool mateThreat = false;
int moveCount = 0;
Value bestValue = -VALUE_INFINITE;
bool mateThreat = false;
int moveCount = 0;
Value bestValue = -VALUE_INFINITE;
if (move == excludedMove)
continue;
if (move == excludedMove)
continue;
- singleReply = (isCheck && mp.number_of_evasions() == 1);
+ singleEvasion = (isCheck && mp.number_of_evasions() == 1);
moveIsCheck = pos.move_is_check(move, ci);
captureOrPromotion = pos.move_is_capture_or_promotion(move);
// Decide the new search depth
moveIsCheck = pos.move_is_check(move, ci);
captureOrPromotion = pos.move_is_capture_or_promotion(move);
// Decide the new search depth
- ext = extension(pos, move, false, captureOrPromotion, moveIsCheck, singleReply, mateThreat, &dangerous);
+ ext = extension(pos, move, false, captureOrPromotion, moveIsCheck, singleEvasion, mateThreat, &dangerous);
// Singular extension search. We extend the TT move if its value is much better than
// its siblings. To verify this we do a reduced search on all the other moves but the
// Singular extension search. We extend the TT move if its value is much better than
// its siblings. To verify this we do a reduced search on all the other moves but the
// the move is marked as 'dangerous' so, at least, we avoid to prune it.
Depth extension(const Position& pos, Move m, bool pvNode, bool captureOrPromotion,
// the move is marked as 'dangerous' so, at least, we avoid to prune it.
Depth extension(const Position& pos, Move m, bool pvNode, bool captureOrPromotion,
- bool check, bool singleReply, bool mateThreat, bool* dangerous) {
+ bool moveIsCheck, bool singleEvasion, bool mateThreat, bool* dangerous) {
assert(m != MOVE_NONE);
Depth result = Depth(0);
assert(m != MOVE_NONE);
Depth result = Depth(0);
- *dangerous = check | singleReply | mateThreat;
+ *dangerous = moveIsCheck | singleEvasion | mateThreat;
result += CheckExtension[pvNode];
result += CheckExtension[pvNode];
- if (singleReply)
- result += SingleReplyExtension[pvNode];
+ if (singleEvasion)
+ result += SingleEvasionExtension[pvNode];
if (mateThreat)
result += MateThreatExtension[pvNode];
if (mateThreat)
result += MateThreatExtension[pvNode];
o["Mate Threat Bonus"] = Option(3, 0, 8);
o["Check Extension (PV nodes)"] = Option(2, 0, 2);
o["Check Extension (non-PV nodes)"] = Option(1, 0, 2);
o["Mate Threat Bonus"] = Option(3, 0, 8);
o["Check Extension (PV nodes)"] = Option(2, 0, 2);
o["Check Extension (non-PV nodes)"] = Option(1, 0, 2);
- o["Single Reply Extension (PV nodes)"] = Option(2, 0, 2);
- o["Single Reply Extension (non-PV nodes)"] = Option(2, 0, 2);
+ o["Single Evasion Extension (PV nodes)"] = Option(2, 0, 2);
+ o["Single Evasion Extension (non-PV nodes)"] = Option(2, 0, 2);
o["Mate Threat Extension (PV nodes)"] = Option(0, 0, 2);
o["Mate Threat Extension (non-PV nodes)"] = Option(0, 0, 2);
o["Pawn Push to 7th Extension (PV nodes)"] = Option(1, 0, 2);
o["Mate Threat Extension (PV nodes)"] = Option(0, 0, 2);
o["Mate Threat Extension (non-PV nodes)"] = Option(0, 0, 2);
o["Pawn Push to 7th Extension (PV nodes)"] = Option(1, 0, 2);
bool button_was_pressed(const string& buttonName) {
if (!get_option_value<bool>(buttonName))
bool button_was_pressed(const string& buttonName) {
if (!get_option_value<bool>(buttonName))
set_option_value(buttonName, "false");
return true;
set_option_value(buttonName, "false");
return true;