Home * Board Representation * Bitboards * Sliding Piece Attacks * Shifted Bitboards

Shifted Bitboards were introduced by Neels Groenewald as implemented in his engine NagaSkaki [1]. It works ray-wise and uses pre-calculated ray-attacks for each of the eight ray-directions for all origin squares, and intersects one of them with the occupancy to determine the blockers on the attacking ray in question, quite similar to the Classical Approach.

While the Classical Approach performs a bitscan, either forward or reverse to determine the first blocker (if any) for the covered ray-attack exclusion by a ray-square lookup, Shifted Bitboards performs a fill-like union of all six direction shifts of the blocker(s) from one to six (the maximum amount of covered squares behind a blocker), which were then excluded from the initial empty board ray-wise attack set.

The idea is original and does not need huge tables. It also may have some advantages in independent execution of the six union fill shifts and does not apply parallel prefix shifts. However, with the proposed 56 64-bit operations for either rook and bishop its Space-Time Tradeoff seems not that advantageous with respect to time, which looks more in the range of set-wise fill algorithms for multiple sliders, like dumb7fill or its parallel prefix Kogge-Stone pendant.

References

  1. ^ How NagaSkaki plays chess - Move generation

What links here?


Up one Level