Closed ratosh closed 6 years ago
Screwed pieces are indeed skewed pieces ;)
The reason it does not detect pieces that are not behind the king is that I would need to calculate all possible moves/x-rays when giving a safe check. At the moment this is not necessary. (I only calculate sliding moves from king position and check if king is in between a sliding piece and a screwed pieces).
It does not detect screwed pieces that are defended by the king if the king needs to make 2 moves. This would require a new KING_2_MOVES lookup table. I implemented this but the eval error result was only marginally better so I am leaving this out.
If i understood screwed detection serves to detect pieces that you can capture when giving a safe check. It does not detect screwed pieces that are not behind the king:
3k4/8/8/8/7r/2B5/8/K7 w - -
It may be detecting screwed pieces that could be defended by the king:
1r1k4/7R/8/8/8/8/8/K7 w - -