Changes

Jump to: navigation, search

Calculon

4 bytes removed, 21:57, 23 February 2020
no edit summary
=getPiece=
Calculon's ''getPiece'' routine to get a the [[Pieces#PieceTypeCoding|piece code]] of a square (the least significant one-bit of the passed bitboard pos, typically single populated)
from the six [[Bitboard Board-Definition#SixTwo|six piece bitboards]] of its [[Board Representation|board representation]] is an idiosyncratic sample in avoiding a redundant [[8x8 Board|8x8 board]] as well in [[Avoiding Branches|avoiding branches]].
Taking the [[General Setwise Operations#Union|union]] (val) of six piece-specific [[General Setwise Operations#Rotate|rotates]] (left by 1..6) of six piece disjoint [[General Setwise Operations#Intersection|intersections]]
for the absolute difference of the [[BitScan#TrailingZeroCount|trailing zero counts]] of that union and the passed square bitboard (pos) is a bit too much calculation for that purpose <ref>[https://github.com/BarrySW19/CalculonX/blob/master/src/main/java/barrysw19/calculon/engine/BitBoard.java#L418 CalculonX/BitBoard.java at master · BarrySW19/CalculonX · GitHub]</ref>.

Navigation menu