bsamseth / Goldfish

Goldfish - Stockfish's very distant and not so bright cousin - a UCI chess engine
MIT License
7 stars 2 forks source link

Bitboard rewrite #30

Closed bsamseth closed 3 months ago

bsamseth commented 5 years ago

The essential change of this PR is the change in how squares are represented. The existing implementation uses 0x88 because this is how it was set up in fluxroot/pulse (which GF was based on initially).

Now, squares are numbers in [0, 63] corresponding to the respective bit in a bitboard.

This enables the use of magic bitboards, a much faster way of generating attacks. After this PR is complete, a significant speedup is anticipated.

The downside is that moves need to change, and move generation must be completely re-implemented to support this. So this PR will be massive.