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
+2 -2
View File
@@ -931,7 +931,7 @@ namespace {
{
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);
@@ -943,7 +943,7 @@ namespace {
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