Tool to find factors for Magic bitboards.
When looking for magic factors m with shift w it is sufficient to look
in the range 2^{64 - w - lsb(r_max)} <= m < 2^{64 - lsb(r_max)} where
r_max is the maximum relevant occupancy for the square [1].
- Avoid zero filling table (like Stockfish).
- Dynamically reorder relevant occupancies to fail earlier on average.
Performance based on search of improved rook magics for f8.
Verifies a magic candidate.
Select BISHOP or ROOK, SQUARE and EASY_SHIFT in v1/Makefile,
make and run ./magics <CHUNK>. Tests all candidates in the specified range.
Select BISHOP or ROOK, SQUARE and SHIFT in v2/Makefile,
make and run ./daq. Counts all magics with the specified settings.
Select square, piece type and shift in generate.py.
make and run ./test to find magic factors with the specified
shift or disprove their existence. Works best for bishop squares (with small
shifts and small table sizes).
