A king move can never have negative SEE
authorMarco Costalba <mcostalba@gmail.com>
Sun, 19 Sep 2010 12:52:01 +0000 (13:52 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 19 Sep 2010 12:56:50 +0000 (13:56 +0100)
So there is no need to explicitly check for king moves
when detecting prunable evasions.

Perhaps teoretically a very bit slower (I didn't test),
but it is more clear now what evasions we consider prunable.

No functional change.

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

index fa483fbcd839682d761951c586c1c966c1dcc48b..e1245085cdc880608a21af043de6dcf695d35a73 100644 (file)
@@ -1502,7 +1502,6 @@ namespace {
       evasionPrunable =   isCheck
                        && bestValue > value_mated_in(PLY_MAX)
                        && !pos.move_is_capture(move)
-                       && pos.type_of_piece_on(move_from(move)) != KING
                        && !pos.can_castle(pos.side_to_move());
 
       // Don't search moves with negative SEE values