qsearch: take in account enpassant in futility formula
authorMarco Costalba <mcostalba@gmail.com>
Tue, 16 Dec 2008 15:30:31 +0000 (16:30 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 16 Dec 2008 21:20:42 +0000 (22:20 +0100)
Should not change anything at ELO level but it is
the correct thing to do.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 71aea553dc0fa7c5edd67d270124d04d8b9a461f..72bf6e8191db420163a6b32b8aa4f941fd4adcd6 100644 (file)
@@ -1487,6 +1487,7 @@ namespace {
           Value futilityValue = staticValue
                               + Max(pos.midgame_value_of_piece_on(move_to(move)),
                                     pos.endgame_value_of_piece_on(move_to(move)))
+                              + (move_is_ep(move) ? PawnValueEndgame : Value(0))
                               + FutilityMargin0
                               + ei.futilityMargin;