This PR documents switching to BitBoards. BitBoards are essentially, at the lowest level, uint64s. StockNemo provides a high-level interface for BitBoards to allow seamless conversion back and forth with other types like tuples and IEnumerable for easy looping. Moreover, BitBoards have significantly improved performance across the table and reduced memory usage. With BitBoards, move generation is now using bit-shifts, lookup tables, and even black magic bitboards.
The performance difference is:
Without BitBoards: 1.2M nps.
With BitBoards: 22.8M nps.
BitBoards
This PR documents switching to BitBoards. BitBoards are essentially, at the lowest level,
uint64
s. StockNemo provides a high-level interface for BitBoards to allow seamless conversion back and forth with other types like tuples and IEnumerable for easy looping. Moreover, BitBoards have significantly improved performance across the table and reduced memory usage. With BitBoards, move generation is now using bit-shifts, lookup tables, and even black magic bitboards.The performance difference is: Without BitBoards:
1.2M nps
. With BitBoards:22.8M nps
.