Remove squares that do not block any moves from magic masks
authorH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 9 Jan 2026 10:59:42 +0000 (11:59 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 9 Jan 2026 10:59:42 +0000 (11:59 +0100)
commit8d83080d2a389b15140449b182d15eb80f3ee967
tree821c951bd9b92ef05dba3b9910168f600c81973e
parent96a9f2c4b676da53a33c88967c3a0b65793e6476
Remove squares that do not block any moves from magic masks

The old code was removing edge squares from the Magic masks, but that is
only sufficient for sliders. Pieces like Nightriders can already fall off
the board when they are two files / ranks away from the edge. The proper
procedure is to remove the fore-last square of any ride from the mask.
The routine sliding_attack has been adapted to do that, when an additional
argument asks it to do so.
  As a result, the attacks table for Nightriders can now be much smaller:
it shrinks from more than 7MB to only 840KB.
src/bitboard.cpp