Objective
Implement non-capturing move generation using the bitboard position
representation.
The bitboard implementation must produce the same quiet moves as the current
readable reference engine.
This issue covers:
- ordinary-piece quiet moves;
- flying-Dama quiet moves;
- promotion information;
- board-edge and blocker handling;
- equivalence validation.
Dependencies
This issue depends on:
Implementation should begin after the interfaces introduced by Issues #4 and
#5 are stable.
Required work
1. Ordinary-piece quiet moves
For every ordinary piece:
- generate forward-left moves;
- generate forward-right moves;
- use the correct direction for each player;
- reject destinations outside the board;
- reject non-playable destinations;
- reject occupied destinations;
- prevent board-edge wraparound;
- record promotion when the destination reaches the promotion row.
Appropriate edge masks or precomputed destination tables should be used.
2. Flying-Dama quiet moves
For each Dama and each diagonal direction:
- follow the diagonal ray;
- add every empty destination;
- stop at the board edge;
- stop at the first occupied square;
- do not pass through friendly pieces;
- do not pass through opposing pieces.
A Dama may have several quiet destinations on the same open diagonal.
Precomputed diagonal-ray tables may be used.
3. Separate raw quiet moves from complete legal moves
The bitboard quiet generator should generate non-capturing moves only.
It must not claim to be a complete legal-move generator because capture
generation is outside this issue.
The architecture should clearly distinguish:
Raw bitboard quiet moves
versus
Complete legal moves after mandatory-capture rules
Objective
Implement non-capturing move generation using the bitboard position
representation.
The bitboard implementation must produce the same quiet moves as the current
readable reference engine.
This issue covers:
Dependencies
This issue depends on:
Implementation should begin after the interfaces introduced by Issues #4 and
#5 are stable.
Required work
1. Ordinary-piece quiet moves
For every ordinary piece:
Appropriate edge masks or precomputed destination tables should be used.
2. Flying-Dama quiet moves
For each Dama and each diagonal direction:
A Dama may have several quiet destinations on the same open diagonal.
Precomputed diagonal-ray tables may be used.
3. Separate raw quiet moves from complete legal moves
The bitboard quiet generator should generate non-capturing moves only.
It must not claim to be a complete legal-move generator because capture
generation is outside this issue.
The architecture should clearly distinguish: