Commit graph

4 commits

Author SHA1 Message Date
Bruno BELANYI a667e6b7f2 Move RNG code to its own module 2024-04-06 17:59:14 +01:00
Bruno BELANYI d74605ba5c Use 'NUM_VARIANTS' where appropriate 2024-04-03 21:26:18 +01:00
Bruno BELANYI 52772167a6 Pre-generate the magic bitboard seeds
My naive RNG implementation takes about ~40 seconds to generate the
magic bitboards for both bishops and rooks (or ~1 second in release
mode).

If we pre-generate the seeds, we can instead make it ~instantaneous.

The self-modifying code is inspired by matklad [1].

[1]: https://matklad.github.io/2022/03/26/self-modifying-code.html
2024-04-01 22:20:39 +01:00
Bruno BELANYI 06087358de Add bitboard-based move generation 2024-04-01 22:20:39 +01:00