1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Refine "few moves" in "last minute surprise"

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>
This commit is contained in:
Marco Costalba 2008-10-27 09:28:14 +01:00
parent 74f1efee26
commit 74fd57220e
2 changed files with 3 additions and 7 deletions

View file

@ -7,11 +7,7 @@
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (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, Stockfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -54,7 +50,7 @@ public:
PH_TT_MOVE, // Transposition table move PH_TT_MOVE, // Transposition table move
PH_MATE_KILLER, // Mate killer from the current ply PH_MATE_KILLER, // Mate killer from the current ply
PH_GOOD_CAPTURES, // Queen promotions and captures with SEE values >= 0 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_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_KILLER_2, // Killer move 2 from the current ply (not used yet).
PH_NONCAPTURES, // Non-captures and underpromotions PH_NONCAPTURES, // Non-captures and underpromotions

View file

@ -931,7 +931,7 @@ namespace {
{ {
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 singleReply = (pos.is_check() && mp.number_of_moves() == 1);
bool moveIsCheck = pos.move_is_check(move, dcCandidates); bool moveIsCheck = pos.move_is_check(move, dcCandidates);
bool moveIsCapture = pos.move_is_capture(move); bool moveIsCapture = pos.move_is_capture(move);
@ -943,7 +943,7 @@ namespace {
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move)); PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
// Decide the new search depth // 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; Depth newDepth = depth - OnePly + ext;
// Make and search the move // Make and search the move