mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Shortcut see_sign() when SEE is known negative
This patch cuts 30% of SEE calculations, as a drawback a returned negative value is no more always correct if a shortcut is found. This could impact move order when based on negative see score as example bad captures and evasions. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1171,8 +1171,8 @@ namespace {
|
||||
Square b8 = relative_square(us, (square_file(s) == FILE_A) ? SQ_B8 : SQ_G8);
|
||||
|
||||
if ( pos.piece_on(b6) == piece_of_color_and_type(opposite_color(us), PAWN)
|
||||
&& pos.see(s, b6) < 0
|
||||
&& pos.see(s, b8) < 0)
|
||||
&& pos.see(s, b6, false) < 0
|
||||
&& pos.see(s, b8, false) < 0)
|
||||
{
|
||||
ei.mgValue -= Sign[us] * TrappedBishopA7H7Penalty;
|
||||
ei.egValue -= Sign[us] * TrappedBishopA7H7Penalty;
|
||||
|
||||
Reference in New Issue
Block a user