It seems that "few moves" works because we extend the good
captures at the last ply of PV, so code it directly.
This version seems defenitly stronger then previous one.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-<<<<<<< HEAD:src/movepick.h
-=======
-
->>>>>>> d3600c39a745179ed6b094b305d0645e83a1ee86:src/movepick.h
Stockfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Stockfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
PH_TT_MOVE, // Transposition table move
PH_MATE_KILLER, // Mate killer from the current ply
PH_GOOD_CAPTURES, // Queen promotions and captures with SEE values >= 0
PH_TT_MOVE, // Transposition table move
PH_MATE_KILLER, // Mate killer from the current ply
PH_GOOD_CAPTURES, // Queen promotions and captures with SEE values >= 0
- PH_BAD_CAPTURES, // Queen promotions and captures with SEE valuse <= 0
+ PH_BAD_CAPTURES, // Queen promotions and captures with SEE values < 0
PH_KILLER_1, // Killer move 1 from the current ply (not used yet).
PH_KILLER_2, // Killer move 2 from the current ply (not used yet).
PH_NONCAPTURES, // Non-captures and underpromotions
PH_KILLER_1, // Killer move 1 from the current ply (not used yet).
PH_KILLER_2, // Killer move 2 from the current ply (not used yet).
PH_NONCAPTURES, // Non-captures and underpromotions
{
assert(move_is_ok(move));
{
assert(move_is_ok(move));
- bool fewMoves = (depth <= OnePly && mp.number_of_moves() < 4);
+ bool lastMinuteSurprise = (depth <= OnePly && mp.current_move_type() == MovePicker::PH_GOOD_CAPTURES);
bool singleReply = (pos.is_check() && mp.number_of_moves() == 1);
bool moveIsCheck = pos.move_is_check(move, dcCandidates);
bool moveIsCapture = pos.move_is_capture(move);
bool singleReply = (pos.is_check() && mp.number_of_moves() == 1);
bool moveIsCheck = pos.move_is_check(move, dcCandidates);
bool moveIsCapture = pos.move_is_capture(move);
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
// Decide the new search depth
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
// Decide the new search depth
- Depth ext = extension(pos, move, true, moveIsCheck, singleReply || fewMoves, mateThreat);
+ Depth ext = extension(pos, move, true, moveIsCheck, singleReply || lastMinuteSurprise, mateThreat);
Depth newDepth = depth - OnePly + ext;
// Make and search the move
Depth newDepth = depth - OnePly + ext;
// Make and search the move