On the Chess Programming Wiki website, there is pseudo code implementation of a SEE algorithm whit x-rays.
Can someone explain why the x-ray attacks are only considered when the piece removed from the board may-x-ray? To me it seems that it's the piece behind the removed piece that is important. No?
On the Chess Programming Wiki website, there is pseudo code implementation of a SEE algorithm whit x-rays.
Can someone explain why the x-ray attacks are only considered when the piece removed from the board may-x-ray? To me it seems that it's the piece behind the removed piece that is important. No?
if ( fromSet & mayXray )
attadef |= considerXrays(occ, ..);
The pieces P, B, R, Q in mayXray are the only ones that could capture
the target coming from one of the 8 xrays. If a knight had captured there
could be no slider coming from that strange direction. If a king had
captured there should be no opponent checking slider behind it and
you are not interested in own additional attacking sliders after your
king was captured.