Changes

Jump to: navigation, search

SISSY Bitboards

39 bytes added, 12:20, 22 February 2020
no edit summary
a new and interesting approach to determine sliding piece attacks devised by [[Michael Sherwin]], introduced and discussed in [[CCC]] in February 2020 <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73083 Split Index Super Set Yielding (SISSY) Bitboards] by [[Michael Sherwin]], [[CCC]], February 13, 2020</ref> as an improvement of his [[Sherwin Bitboards]].
SISSY bitboards apply the occupancy lookup [[Ranks|rank]] by rank to [[General Setwise Operations#Intersection|intersect]] supersets of the attack bitboards from the same square considering blocking pieces on that particular rank only.
While using eight lookups to intersect sounds expensive on the first glance, SISSY Bitboards yields up to eight [[Direction#RayDirections|ray-directions]] of a queen in one run with cheap instructions and high [https://en.wikipedia.org/wiki/Instructions_per_cycle IPC] potential, and thus may be an alternative for [[Magic Bitboards|magic bitboards]] on architectures with slow 64-bit multiplication, in particular for the queen.
{{MappingHint}}
}
</pre>
One may half =Rook Attacks=If combined with the table size by combining occupancy indices of two consecutive ranks, since their relevant bits on [[DiagonalsFirst Rank Attacks#AttacksOnAllRanks|diagonalrank lookup]] and for SISSY fileAttacks only, one can dense the occupy index range to 2, considering only blockers on the same file.<pre>U64 rss[6][Anti-Diagonals|anti-diagonal64][2] are always disjoint.; // 6K
U64 fileAttacks(U64 occ, enumSquare sq) { occ >>=Rook Attacks=(sq & 7); // shift occupancy to A file returnIf combined with the rss[0][First Rank Attacks#AttacksOnAllRanks|sq][(occ >> 8) & 1] & // 2nd rank lookup rss[1][sq] to dense the occupy index range to [(occ >> 16) & 1] & rss[2, considering only blockers on the same file, ][sq][(occ >> 24) & 1] & rss[3][sq][(occ >> 32) & 1] & SISSY file attack generation looks not that competitive compared to other techniques as well, see for instance rss[4][Kindergarten Bitboards#File-Attacks|Kindergarten file attackssq][(occ >> 40) & 1] or & rss[5][Hyperbola Quintessencesq][(occ >> 48) & 1].; // 7th rank} </pre>One may try some more index trickery for instance considering 3 ranks each, for an upper and lower half:
<pre>
U64 rss[62][264][648]; // 6K8K
U64 fileAttacks(U64 occ, enumSquare sq) {
occ >>= (sq & 7); // shift occupancy to A file
return
rss[0][sq][((occ >> 822) & 1][sq] & // 2nd rank rss[1][4) | ((occ >> 1615) & 1][sq] & rss[2][) | ((occ >> 248) & 1][sq)] & // rank 4,3,2 rss[31][sq][((occ >> 3246) & 1][sq] & rss[4][) | ((occ >> 4039) & 1][sq] & rss[5][2) | ((occ >> 4832) & 1][sq)] ; // 7th rank7,6,5}
</pre>

Navigation menu