-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
featImplementation of a new featureImplementation of a new featuremove-generationChess moves generation (legal, pseudo-legal).Chess moves generation (legal, pseudo-legal).testingAdding, updating or removing any kind of tests.Adding, updating or removing any kind of tests.
Description
🎯 Goal
Validate the entire pipeline.
🧠 Key Idea
Perft never lies.
🛠️ Tasks
- Integrate generate_legal_moves:
void generate_legal_moves(MoveList& moves, const Board& board, Color us) {
Square king_sq = board.king_square(us);
Bitboard checkers = attackers_to(king_sq, board, opposite(us));
Bitboard check_mask = compute_check_mask(king_sq, checkers);
Bitboard pinned;
Bitboard pin_ray[64] = {0};
compute_pins(king_sq, board, us, pinned, pin_ray);
generate_legal_king_moves(moves, board, us, check_mask);
if (popcount(checkers) > 1)
return;
generate_legal_knight_moves(moves, board, us, check_mask, pinned, pin_ray);
generate_legal_bishop_moves(moves, board, us, check_mask, pinned, pin_ray);
generate_legal_rook_moves(moves, board, us, check_mask, pinned, pin_ray);
generate_legal_queen_moves(moves, board, us, check_mask, pinned, pin_ray);
generate_legal_pawn_moves(moves, board, us, check_mask, pinned, pin_ray);
generate_legal_castling_moves(moves, board, us, checkers);
}- Run perft (depth 1 -> 5)
- Compare against known references
✅ Acceptance Criteria
- Exact perft numbers
- No illegal moves generated
Metadata
Metadata
Assignees
Labels
featImplementation of a new featureImplementation of a new featuremove-generationChess moves generation (legal, pseudo-legal).Chess moves generation (legal, pseudo-legal).testingAdding, updating or removing any kind of tests.Adding, updating or removing any kind of tests.