mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Add a known draw case in kpk bitbase generation
Early classify as known draws the positions where white king is trapped on the rook file. Suggested by Dan Honeycutt. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -168,6 +168,13 @@ namespace {
|
|||||||
&& file_of(psq) == FILE_A)
|
&& file_of(psq) == FILE_A)
|
||||||
return DRAW;
|
return DRAW;
|
||||||
|
|
||||||
|
// Case 6: White king trapped on the rook file
|
||||||
|
if ( file_of(wksq) == FILE_A
|
||||||
|
&& file_of(psq) == FILE_A
|
||||||
|
&& rank_of(wksq) > rank_of(psq)
|
||||||
|
&& bksq == wksq + 2)
|
||||||
|
return DRAW;
|
||||||
|
|
||||||
return UNKNOWN;
|
return UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user