Changes

Jump to: navigation, search

SISSY Bitboards

1,145 bytes added, 09:57, 14 February 2021
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 There is a more recent attempt to half the table size number of lookups by [[Martin Sedlak]] but using much larger tables <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73083&start=55 Re: Split Index Super Set Yielding (SISSY) Bitboards] by combining occupancy indices of two consecutive ranks, since their relevant bits on [[Diagonals|diagonalMartin Sedlak]] and , [[Anti-Diagonals|anti-diagonalCCC]] are always disjoint, February 14, 2021</ref>.
=Rook Attacks=
If combined with the [[First Rank Attacks#AttacksOnAllRanks|rank lookup]] to for SISSY fileAttacks only, one can dense the occupy index range to 2, considering only blockers on the same file, SISSY file attack generation looks not that competitive compared to other techniques as well, see for instance [[Kindergarten Bitboards#File-Attacks|Kindergarten file attacks]] or [[Hyperbola Quintessence]].
<pre>
U64 rss[6][264][642]; // 6K
U64 fileAttacks(U64 occ, enumSquare sq) {
occ >>= (sq & 7); // shift occupancy to A file
return
rss[0][sq][(occ >> 8) & 1][sq] & // 2nd rank rss[1][sq][(occ >> 16) & 1][sq] & rss[2][sq][(occ >> 24) & 1][sq] & rss[3][sq][(occ >> 32) & 1][sq] & rss[4][sq][(occ >> 40) & 1][sq] & rss[5][sq][(occ >> 48) & 1][sq] ; // 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[2][64][8]; // 8K
U64 fileAttacks(U64 occ, enumSquare sq) {
occ >>= (sq & 7); // shift occupancy to A file
return
rss[0][sq][((occ>>22)&4) | ((occ>>15)&2) | ((occ>> 8)&1)] & // rank 4,3,2
rss[1][sq][((occ>>46)&4) | ((occ>>39)&2) | ((occ>>32)&1)]; // rank 7,6,5
}
</pre>
One step further, to combine the occupancy to one six-bit index is already quite similar to [[Kindergarten Bitboards#FileAttacks|Kindergarten File Attacks]], in particular [[Zach Wegner|Zach Wegner's]] [[Kindergarten Bitboards#32-bit Versions|32-bit Version]] <ref>[http://www.open-aurec.com/wbforum/viewtopic.php?topic_view=threads&p=26851&t=4523 Zach's tricky 32-bit approach] by [[Zach Wegner]], [[Computer Chess Forums|Winboard Forum]], August 22, 2006</ref>
=Forum Posts=
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73063 New RookAttacks() - possibly] by [[Michael Sherwin]], [[CCC]], February 12, 2020
* [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
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73083&start=46 Re: Split Index Super Set Yielding (SISSY) Bitboards] by [[Michael Sherwin]], [[CCC]], February 13, 2021
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73083&start=55 Re: Split Index Super Set Yielding (SISSY) Bitboards] by [[Martin Sedlak]], [[CCC]], February 14, 2021
=References=

Navigation menu