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:
Marco Costalba
2009-10-30 13:34:45 +01:00
parent 23de3e16f1
commit 941d923bf8
3 changed files with 24 additions and 7 deletions

View File

@@ -229,7 +229,7 @@ public:
void undo_null_move();
// Static exchange evaluation
int see(Square from, Square to) const;
int see(Square from, Square to, bool shortcut) const;
int see(Move m) const;
int see(Square to) const;
int see_sign(Move m) const;