Prompt:
FEN: 5r1k/1p4p1/p1p4p/P2p4/1P3P2/2P2Q1P/2q3P1/3RB1K1 w - - 4 30
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: b4b5 c3c4 d1a1 d1b1 d1c1 d1d2 d1d3 d1d4 d1d5 e1d2 e1f2 e1g3 e1h4 f3d3 f3d5 f3e2 f3e3 f3e4 f3f1 f3f2 f3g3 f3g4 f3h5 f4f5 g1f1 g1h1 g1h2 g2g3 g2g4 h3h4


Prompt:
FEN: r4r2/ppp1p1kp/2n1q1pn/5P2/5P2/2NBB2P/PPP1Q3/2KR3R b - - 0 18
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: c6 black knight; e6 black queen; g6 black pawn; h6 black knight; a7 black pawn; b7 black pawn; c7 black pawn; e7 black pawn; g7 black king; h7 black pawn; a8 black rook; f8 black rook.


Prompt:
FEN: 2r4r/1b2kpbp/p3p3/3p1p2/B7/P1p5/R1R2PPP/1N3K2 b - - 3 23
What legal moves does the piece on d5 have?


Prompt:
FEN: r2k1r2/pppb2p1/4p1B1/4P3/3Q2Pq/P1B5/2P2P1P/1R2K2R w K - 1 18
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 2r2b1r/p2k1npn/2pP1p2/2N4p/8/2P3P1/PP4BP/2KRR3 b - -
List all capture moves available.


Prompt:
Given FEN: r3kbr1/pp1nq1pp/2p5/4pbN1/8/3P4/PPP2PPP/RNBQ1RK1 w q - 2 10
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: rnbq1rk1/pppp1ppp/4pn2/8/2PP4/5N2/PP1NPPPP/R2QKB1R w KQ - 1 6
Is the move h8h3 legal?


Prompt:
FEN: rnbqkbnr/ppp2ppp/8/3p4/2P1p3/4P3/PP1P1PPP/RNBQKBNR b KQkq - 1 4
List pseudo-legal moves from d5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 1kn1r2r/nppq4/1P4p1/3p1pPp/Q2P1P2/2P1B3/3N1KP1/RR6 b - - 0 22
For the piece on h5, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from h5: h5h4.
Legal: h5h4.
Rejected: none.


Prompt:
FEN: 4B3/4n1k1/pp1N1p1p/1P2p3/P7/7P/2b2PP1/6K1 b - - 0 33
For move g7f7, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: g7f7.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; king_would_be_in_check.


Prompt:
FEN: 8/pp6/3pkpp1/1P4b1/P1K3P1/8/8/B7 b - - 0 41
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: g5 black bishop; d6 black pawn; e6 black king; f6 black pawn; g6 black pawn; a7 black pawn; b7 black pawn.
Moves by piece:
g5 black bishop: g5c1 g5d2 g5e3 g5f4 g5h4 g5h6
d6 black pawn: d6d5
e6 black king: e6d7 e6e7 e6f7
f6 black pawn: f6f5
g6 black pawn: no legal moves
a7 black pawn: a7a5 a7a6
b7 black pawn: b7b6
All legal moves: a7a5 a7a6 b7b6 d6d5 e6d7 e6e7 e6f7 f6f5 g5c1 g5d2 g5e3 g5f4 g5h4 g5h6


Prompt:
FEN: r3k1nr/p2p2b1/1p2p1P1/2p1p1p1/6B1/3P4/PPP5/RN1K2nb b kq - 1 19
Walk each ray for the slider on h1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: h1 black bishop.
Ray NE: edge.
Ray SE: edge.
Ray SW: edge.
Ray NW: g2 empty; f3 empty; e4 empty; d5 empty; c6 empty; b7 empty; a8 black rook: own piece (stop, excluded).
Moves from rays: h1b7 h1c6 h1d5 h1e4 h1f3 h1g2


Prompt:
FEN: r1bqk3/1pp2p1p/2np4/p3p3/1b2P2P/2P2Q2/P2P1P2/1RB1KBN1 b q - 0 14
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a5a4 a8a6 a8a7 a8b8 b4a3 b4c3 b4c5 b7b5 b7b6 c6a7 c6b8 c6d4 c6e7 c8d7 c8e6 c8f5 c8g4 c8h3 d6d5 d8d7 d8e7 d8f6 d8g5 d8h4 e8d7 e8e7 e8f8 f7f5 f7f6 h7h5 h7h6


Prompt:
FEN: 2r3k1/5pp1/prn1p2p/3p4/3P4/2P1RNPP/1P3PK1/R7 w - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a1a2 a1a3 a1a4 a1a5 a1a6 a1b1 a1c1 a1d1 a1e1 a1f1 a1g1 a1h1 b2b3 b2b4 c3c4 e3d3 e3e1 e3e2 e3e4 e3e5 e3e6 f3d2 f3e1 f3e5 f3g1 f3g5 f3h2 f3h4 g2f1 g2g1 g2h1 g2h2 g3g4 h3h4


Prompt:
FEN: 8/6k1/8/6K1/4Q3/8/8/8 w - -
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: e4 white queen; g5 white king.


Prompt:
FEN: 5k2/2r5/4K3/8/8/8/8/8 w - -
What legal moves does the piece on e6 have?


Prompt:
FEN: r1bq1rk1/pppnppbp/3p1np1/8/2PP3B/2N2N2/PP2PPPP/R2QKB1R w KQ - 4 7
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 2kr2nr/pp1qbppp/4p3/n2pP3/b1pP3P/P1P2NP1/1P1NQPB1/R1B2RK1 w - -
List all capture moves available.


Prompt:
Given FEN: 8/5N1k/pp2NP2/2p5/3p2P1/8/PPP5/2K5 w - - 0 55
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r3k2r/pp2n3/2p4p/4n3/4B2P/2N2K2/PP6/3R4 w - - 0 28
Is the move f3g3 legal?


Prompt:
FEN: rn3rk1/1p1bbp1p/p3p1pB/3pP3/3P4/P1N4q/1P1QBP1P/2K3RR w - - 0 17
List pseudo-legal moves from c1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from c1: c1b1 c1c2 c1d1


Prompt:
FEN: 4rr2/pq5k/6Rp/2p1b1pP/5p2/3P4/PPP3K1/6R1 w - - 3 32
For the piece on g1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from g1: g1a1 g1b1 g1c1 g1d1 g1e1 g1f1 g1h1.
Legal: none.
Rejected: g1a1 does_not_resolve_check; g1b1 does_not_resolve_check; g1c1 does_not_resolve_check; g1d1 does_not_resolve_check; g1e1 does_not_resolve_check; g1f1 does_not_resolve_check; g1h1 does_not_resolve_check.


Prompt:
FEN: r2qk2r/4bppp/p1b1p3/2ppPn2/8/BP3N1P/P1P1NPP1/R2Q1RK1 b kq - 0 13
For move a6a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a6a5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: r1bqr1k1/pp2bppp/2n2n2/1Bpp4/8/2NP1N1P/PPP2PP1/R1BQR1K1 b - - 0 10
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: c5 black pawn; d5 black pawn; c6 black knight; f6 black knight; a7 black pawn; b7 black pawn; e7 black bishop; f7 black pawn; g7 black pawn; h7 black pawn; a8 black rook; c8 black bishop; d8 black queen; e8 black rook; g8 black king.
Moves by piece:
c5 black pawn: c5c4
d5 black pawn: d5d4
c6 black knight: c6a5 c6b4 c6b8 c6d4 c6e5
f6 black knight: f6d7 f6e4 f6g4 f6h5
a7 black pawn: a7a5 a7a6
b7 black pawn: b7b6
e7 black bishop: e7d6 e7f8
f7 black pawn: no legal moves
g7 black pawn: g7g5 g7g6
h7 black pawn: h7h5 h7h6
a8 black rook: a8b8
c8 black bishop: c8d7 c8e6 c8f5 c8g4 c8h3
d8 black queen: d8a5 d8b6 d8c7 d8d6 d8d7
e8 black rook: e8f8
g8 black king: g8f8 g8h8
All legal moves: a7a5 a7a6 a8b8 b7b6 c5c4 c6a5 c6b4 c6b8 c6d4 c6e5 c8d7 c8e6 c8f5 c8g4 c8h3 d5d4 d8a5 d8b6 d8c7 d8d6 d8d7 e7d6 e7f8 e8f8 f6d7 f6e4 f6g4 f6h5 g7g5 g7g6 g8f8 g8h8 h7h5 h7h6


Prompt:
FEN: rn1q1rk1/pb3ppp/1ppbpn2/3pN3/2PPP3/2N3P1/PP3PBP/R1BQ1RK1 b - -
Walk each ray for the slider on d6: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: d6 black bishop.
Ray NE: e7 empty; f8 black rook: own piece (stop, excluded).
Ray SE: e5 white knight: capture (stop, included).
Ray SW: c5 empty; b4 empty; a3 empty; edge.
Ray NW: c7 empty; b8 black knight: own piece (stop, excluded).
Moves from rays: d6a3 d6b4 d6c5 d6c7 d6e5 d6e7


Prompt:
FEN: r4N1k/2R3R1/2p2p2/5p2/2b5/p5P1/4r1KP/8 w - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: g2f1 g2f3 g2g1 g2h1 g2h3


Prompt:
FEN: rnb1kbnr/p4ppp/1p1qp3/2P5/8/2N1BN2/PP2PPPP/R2QKB1R b KQkq - 0 7
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 b6b5 b6c5 b8a6 b8c6 b8d7 c8a6 c8b7 c8d7 d6c5 d6c6 d6c7 d6d1 d6d2 d6d3 d6d4 d6d5 d6d7 d6d8 d6e5 d6e7 d6f4 d6g3 d6h2 e6e5 e8d7 e8d8 e8e7 f7f5 f7f6 f8e7 g7g5 g7g6 g8e7 g8f6 g8h6 h7h5 h7h6


Prompt:
FEN: 2r5/6kp/n4pp1/8/8/P6P/5PP1/3R2K1 w - - 1 27
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: d1 white rook; g1 white king; f2 white pawn; g2 white pawn; a3 white pawn; h3 white pawn.


Prompt:
FEN: r4rk1/6bp/1p1q2p1/pPn1p3/2P1PB2/5P1N/2Q1B1PP/R2R2K1 b - - 0 27
What legal moves does the piece on a8 have?


Prompt:
FEN: rnbqr1k1/pp3ppp/2p1p3/3n4/3P4/B1P1PN2/P3BPPP/R2QK2R w KQ - 0 10
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: Bn2k1nr/p2p1ppp/bpPb4/8/8/2B3P1/PPK2P1P/RN5R b k - 0 20
List all capture moves available.


Prompt:
Given FEN: rnbqkbnr/pp3ppp/4p3/2pP4/8/5N2/PPPPBPPP/RNBQK2R b KQkq - 0 4
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 8/1P6/2K5/2R5/8/3k4/1rp5/8 b - - 0 56
Is the move c2c1n legal?


Prompt:
FEN: 5r2/2P4p/p2K2k1/P5p1/6P1/2P5/5p1P/5R2 b - - 0 40
List pseudo-legal moves from g6.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from g6: g6f5 g6f6 g6f7 g6g7 g6h5 g6h6


Prompt:
FEN: 7r/5ppp/4kN2/4p3/1b6/1r2B3/2PK2PP/3R1R2 w - - 1 29
For the piece on d1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from d1: d1a1 d1b1 d1c1 d1e1.
Legal: none.
Rejected: d1a1 does_not_resolve_check; d1b1 does_not_resolve_check; d1c1 does_not_resolve_check; d1e1 does_not_resolve_check.


Prompt:
FEN: 1r3rk1/2qnbppp/pp1ppn2/2p5/2P2PP1/NPN1PQ2/PB1P3P/R3K2R b KQ - 0 14
For move a6a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a6a5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: rnbqkbnr/pp3ppp/3pp3/2p5/4P3/5NP1/PPPP1PBP/RNBQK2R b KQkq - 1 4
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: c5 black pawn; d6 black pawn; e6 black pawn; a7 black pawn; b7 black pawn; f7 black pawn; g7 black pawn; h7 black pawn; a8 black rook; b8 black knight; c8 black bishop; d8 black queen; e8 black king; f8 black bishop; g8 black knight; h8 black rook.
Moves by piece:
c5 black pawn: c5c4
d6 black pawn: d6d5
e6 black pawn: e6e5
a7 black pawn: a7a5 a7a6
b7 black pawn: b7b5 b7b6
f7 black pawn: f7f5 f7f6
g7 black pawn: g7g5 g7g6
h7 black pawn: h7h5 h7h6
a8 black rook: no legal moves
b8 black knight: b8a6 b8c6 b8d7
c8 black bishop: c8d7
d8 black queen: d8a5 d8b6 d8c7 d8d7 d8e7 d8f6 d8g5 d8h4
e8 black king: e8d7 e8e7
f8 black bishop: f8e7
g8 black knight: g8e7 g8f6 g8h6
h8 black rook: no legal moves
All legal moves: a7a5 a7a6 b7b5 b7b6 b8a6 b8c6 b8d7 c5c4 c8d7 d6d5 d8a5 d8b6 d8c7 d8d7 d8e7 d8f6 d8g5 d8h4 e6e5 e8d7 e8e7 f7f5 f7f6 f8e7 g7g5 g7g6 g8e7 g8f6 g8h6 h7h5 h7h6


Prompt:
FEN: r1bqkb1r/1p3ppp/p1n2n2/2pp4/P1B5/3P1N2/1PP2PPP/RNBQR1K1 b kq -
Walk each ray for the slider on a8: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a8 black rook.
Ray N: edge.
Ray E: b8 empty; c8 black bishop: own piece (stop, excluded).
Ray S: a7 empty; a6 black pawn: own piece (stop, excluded).
Ray W: edge.
Moves from rays: a8a7 a8b8


Prompt:
FEN: r1bq1rk1/p1ppp1bp/1p3p2/3Pn2Q/8/6N1/PPP2PPP/2KR1BNR w - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b2b3 b2b4 c1b1 c1d2 c2c3 c2c4 d1d2 d1d3 d1d4 d1e1 d5d6 f1a6 f1b5 f1c4 f1d3 f1e2 f2f3 f2f4 g1e2 g1f3 g1h3 g3e2 g3e4 g3f5 h2h3 h2h4 h5e2 h5e5 h5e8 h5f3 h5f5 h5f7 h5g4 h5g5 h5g6 h5h3 h5h4 h5h6 h5h7


Prompt:
FEN: 2Q3nr/p2r4/k1p1p2p/q4pp1/1b6/2N3BP/P1P2PP1/6K1 b - - 1 20
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a6b6 d7b7


Prompt:
FEN: rn1qk2r/1p3pp1/p3b2p/3pP3/6n1/1PN3P1/PBP2PBP/R2QR1K1 b kq - 2 13
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: g4 black knight; d5 black pawn; a6 black pawn; e6 black bishop; h6 black pawn; b7 black pawn; f7 black pawn; g7 black pawn; a8 black rook; b8 black knight; d8 black queen; e8 black king; h8 black rook.


Prompt:
FEN: rn1qk2r/ppp2ppp/3bbn2/1B1p2B1/3P4/2N2N2/PPP2PPP/R2QK2R b KQkq - 7 7
What legal moves does the piece on a8 have?


Prompt:
FEN: rnb1kbnr/ppp3pp/8/4Pp2/4p3/2N2P2/PPP3PP/R1BqKBNR w KQkq -
Detect the game state: check, checkmate, stalemate, or none.


Prompt:
FEN: r1b2rk1/1p1n2pp/2p5/p2p1p2/3P4/1Pb2P2/PN4PP/R1BR3K b - - 2 20
List all capture moves available.


Prompt:
Given FEN: 1r5k/pb1p1B1p/2p2P2/1p6/4N2P/8/PP3P2/n1K3R1 b - - 0 25
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: rn1qkb1r/pp3pp1/2p1pn1p/3P1b2/8/3P1NP1/PP2PPBP/RNBQ1RK1 b kq -
Is the move f8d6 legal?


Prompt:
FEN: r4r1k/pppb2pp/8/4ppN1/2BnP3/3PQ2P/PPPK2P1/R4R2 w - - 0 19
List pseudo-legal moves from a1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from a1: a1b1 a1c1 a1d1 a1e1


Prompt:
FEN: r6r/pbp1k1pp/3q1n2/1p1pN1B1/3PP3/1QNP4/PP3PPP/R4RK1 b - - 6 14
For the piece on f6, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from f6: f6d7 f6e4 f6e8 f6g4 f6g8 f6h5.
Legal: none.
Rejected: f6d7 pinned_piece_exposes_king; f6e4 pinned_piece_exposes_king; f6e8 pinned_piece_exposes_king; f6g4 pinned_piece_exposes_king; f6g8 pinned_piece_exposes_king; f6h5 pinned_piece_exposes_king.


Prompt:
FEN: r1bqk2r/p2pnppp/2p5/2b1p3/2B1P3/2N5/PPP2PPP/R1BQK2R w KQkq - 4 8
For move a1b1, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a1b1.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: r3k2r/ppN5/2np4/4pbqp/2B3nR/5QP1/PPP3P1/R3K3 b Qkq - 0 19
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: g4 black knight; e5 black pawn; f5 black bishop; g5 black queen; h5 black pawn; c6 black knight; d6 black pawn; a7 black pawn; b7 black pawn; a8 black rook; e8 black king; h8 black rook.
Moves by piece:
g4 black knight: no legal moves
e5 black pawn: no legal moves
f5 black bishop: no legal moves
g5 black queen: no legal moves
h5 black pawn: no legal moves
c6 black knight: no legal moves
d6 black pawn: no legal moves
a7 black pawn: no legal moves
b7 black pawn: no legal moves
a8 black rook: no legal moves
e8 black king: e8d7 e8d8 e8e7 e8f8
h8 black rook: no legal moves
All legal moves: e8d7 e8d8 e8e7 e8f8


Prompt:
FEN: r1r3k1/3nbppp/p3q3/2p2N1b/Q1N1P3/B6P/P1R2PP1/2R3K1 b - - 4 21
Walk each ray for the slider on h5: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: h5 black bishop.
Ray NE: edge.
Ray SE: edge.
Ray SW: g4 empty; f3 empty; e2 empty; d1 empty; edge.
Ray NW: g6 empty; f7 black pawn: own piece (stop, excluded).
Moves from rays: h5d1 h5e2 h5f3 h5g4 h5g6


Prompt:
FEN: 5Q2/8/2p5/K1P5/4k1pR/8/2n5/8 b - - 7 59
For every side-to-move piece, list pseudo-legal moves, reject illegal ones with reasons, then give all legal moves.

Answer format: include "Side to move:", "Pieces:", "Filter by piece:", one line per side-to-move piece with "pseudo-legal ... | rejected ... | legal ..." fields, and "All legal moves:".

Side to move: black.
Pieces: c2 black knight; e4 black king; g4 black pawn; c6 black pawn.
Filter by piece:
c2 black knight: pseudo-legal c2a1 c2a3 c2b4 c2d4 c2e1 c2e3 | rejected none | legal c2a1 c2a3 c2b4 c2d4 c2e1 c2e3
e4 black king: pseudo-legal e4d3 e4d4 e4d5 e4e3 e4e5 e4f3 e4f4 e4f5 | rejected e4f3 king_would_be_in_check; e4f4 king_would_be_in_check; e4f5 king_would_be_in_check | legal e4d3 e4d4 e4d5 e4e3 e4e5
g4 black pawn: pseudo-legal g4g3 | rejected g4g3 pinned_piece_exposes_king | legal none
c6 black pawn: pseudo-legal none | rejected none | legal none
All legal moves: c2a1 c2a3 c2b4 c2d4 c2e1 c2e3 e4d3 e4d4 e4d5 e4e3 e4e5


Prompt:
FEN: rn3rk1/5p1p/p3pqp1/3p3P/2p2PQ1/8/PPnN1P2/1R1K2R1 w - - 0 21
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b1a1 b1c1 b2b3 b2b4 d1c1 d1c2 d1e2 d2b3 d2c4 d2e4 d2f1 d2f3 f2f3 f4f5 g1e1 g1f1 g1g2 g1g3 g1h1 g4e2 g4e6 g4f3 g4f5 g4g2 g4g3 g4g5 g4g6 g4h3 g4h4 h5g6 h5h6


Prompt:
FEN: 8/2pk2p1/1rp5/3p2P1/7P/1P6/1KPr4/R6R b - - 0 38
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: d2 black rook; d5 black pawn; b6 black rook; c6 black pawn; c7 black pawn; d7 black king; g7 black pawn.


Prompt:
FEN: r1bq1rk1/ppp1bppp/2n1pn2/8/2BP4/P1N1PN1P/1P3PP1/R1BQK2R b KQ - 2 8
What legal moves does the piece on a7 have?


Prompt:
FEN: r1bqr1k1/pppp1ppp/8/2b1n3/2P5/2N1P3/PP2BPPP/R1BQ1RK1 w - -
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 2b3k1/p5bp/1p4p1/4Pp2/P3pB2/1q4Q1/1P3PPP/4R1K1 w - - 0 27
List all capture moves available.


Prompt:
Given FEN: r1b2r2/4qpbk/2pp2pp/pp2n1P1/4PN1P/PBNP2Q1/1PP5/R4RK1 b - - 0 20
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 5bk1/pp4qp/4b1p1/2pN4/8/3P1QP1/PPP3BP/6K1 b - -
Is the move g7f7 legal?


Prompt:
FEN: r3r1k1/pbp2pbp/1p2p1p1/n3P3/2NP4/BP3N2/P6P/R3K3 w Q - 7 22
List pseudo-legal moves from a1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from a1: a1b1 a1c1 a1d1


Prompt:
FEN: 4r1k1/pp4pp/2rq1n2/3p2N1/4p3/4Q3/PP2RPPP/4R1K1 b - - 1 23
For the piece on g8, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from g8: g8f7 g8f8 g8h8.
Legal: g8f8 g8h8.
Rejected: g8f7 king_would_be_in_check.


Prompt:
FEN: 8/1p4k1/p7/4B1p1/P3b3/7P/5PP1/6K1 b - -
For move a6a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a6a5.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; does_not_resolve_check.


Prompt:
FEN: rnbqkb1r/ppp1np1p/4p1p1/3p4/2PP4/2N2N2/PP2PPPP/R1BQKB1R w KQkq - 0 5
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; c1 white bishop; d1 white queen; e1 white king; f1 white bishop; h1 white rook; a2 white pawn; b2 white pawn; e2 white pawn; f2 white pawn; g2 white pawn; h2 white pawn; c3 white knight; f3 white knight; c4 white pawn; d4 white pawn.
Moves by piece:
a1 white rook: a1b1
c1 white bishop: c1d2 c1e3 c1f4 c1g5 c1h6
d1 white queen: d1a4 d1b3 d1c2 d1d2 d1d3
e1 white king: e1d2
f1 white bishop: no legal moves
h1 white rook: h1g1
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
e2 white pawn: e2e3 e2e4
f2 white pawn: no legal moves
g2 white pawn: g2g3 g2g4
h2 white pawn: h2h3 h2h4
c3 white knight: c3a4 c3b1 c3b5 c3d5 c3e4
f3 white knight: f3d2 f3e5 f3g1 f3g5 f3h4
c4 white pawn: c4c5 c4d5
d4 white pawn: no legal moves
All legal moves: a1b1 a2a3 a2a4 b2b3 b2b4 c1d2 c1e3 c1f4 c1g5 c1h6 c3a4 c3b1 c3b5 c3d5 c3e4 c4c5 c4d5 d1a4 d1b3 d1c2 d1d2 d1d3 e1d2 e2e3 e2e4 f3d2 f3e5 f3g1 f3g5 f3h4 g2g3 g2g4 h1g1 h2h3 h2h4


Prompt:
FEN: 8/8/8/1R4K1/8/2R5/8/k7 w - -
Walk each ray for the slider on c3: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: c3 white rook.
Ray N: c4 empty; c5 empty; c6 empty; c7 empty; c8 empty; edge.
Ray E: d3 empty; e3 empty; f3 empty; g3 empty; h3 empty; edge.
Ray S: c2 empty; c1 empty; edge.
Ray W: b3 empty; a3 empty; edge.
Moves from rays: c3a3 c3b3 c3c1 c3c2 c3c4 c3c5 c3c6 c3c7 c3c8 c3d3 c3e3 c3f3 c3g3 c3h3


Prompt:
FEN: r4rk1/3qbp2/n1p3pp/1p1p1b1N/p2P4/P1N1PPQ1/1PB3PP/1R3RK1 w - - 0 24
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: b1a1 b1c1 b1d1 b1e1 b2b3 b2b4 c2a4 c2b3 c2d1 c2d3 c2e4 c2f5 c3a2 c3a4 c3b5 c3d1 c3d5 c3e2 c3e4 e3e4 f1c1 f1d1 f1e1 f1f2 f3f4 g1f2 g1h1 g3b8 g3c7 g3d6 g3e1 g3e5 g3f2 g3f4 g3g4 g3g5 g3g6 g3h3 g3h4 h2h3 h2h4 h5f4 h5f6 h5g7


Prompt:
FEN: 3k4/3rp3/1brpPp2/2pP1Pp1/1pP3Pp/pP2K2P/P7/8 b - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: b6a5 b6a7 b6c7 c6c7 c6c8 d7a7 d7b7 d7c7 d8c7 d8c8 d8e8


Prompt:
FEN: r1bqkbnr/2p2ppp/1pn1p3/p1PpP3/1P1P4/P7/5PPP/RNBQKBNR w KQkq - 0 8
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: a1 white rook; b1 white knight; c1 white bishop; d1 white queen; e1 white king; f1 white bishop; g1 white knight; h1 white rook; f2 white pawn; g2 white pawn; h2 white pawn; a3 white pawn; b4 white pawn; d4 white pawn; c5 white pawn; e5 white pawn.


Prompt:
FEN: r2q2r1/pp1bk3/4p2Q/3pPp2/8/P1N5/1PP2PPP/R4RK1 b - - 0 18
What legal moves does the piece on b7 have?


Prompt:
FEN: r3k1nr/pbppqp1p/1pn3p1/4p1N1/2B1P3/3P1Q2/PPP2PPP/RN3RK1 b kq -
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 6k1/p4rbp/1p4p1/8/4p3/2P1B1P1/P1R1P1KP/8 b - - 3 26
List all capture moves available.


Prompt:
Given FEN: r5k1/pp3ppp/2p3n1/8/6b1/P1P1r1P1/7P/2R1KB1R w K - 0 19
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r1bqkbnr/ppp3pp/2np4/5P2/2B1p3/2P2N2/PP1P1PPP/RNBQK2R w KQkq -
Is the move h2h4 legal?


Prompt:
FEN: 8/8/2K1p3/1pBpP3/1PkP2b1/8/8/8 w - - 17 58
List pseudo-legal moves from c5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from c5: c5a7 c5b6 c5d6 c5e7 c5f8


Prompt:
FEN: 6r1/1pp5/4n1k1/pP2p3/Pb1pPp2/3P1Pr1/1B3KPR/R7 w - - 5 35
For the piece on f2, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from f2: f2e1 f2e2 f2e3 f2f1 f2g1 f2g3.
Legal: f2e2 f2f1 f2g1.
Rejected: f2e1 king_would_be_in_check; f2e3 king_would_be_in_check; f2g3 king_would_be_in_check.


Prompt:
FEN: r4rk1/p2b1ppp/3Q1n2/q1p3B1/2B1P3/8/PPP2PPP/R2R2K1 b - - 0 17
For move a5a2, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a5a2.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: r1bqkbnr/1pp1pppp/p1n5/3pP3/8/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2 4
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; b1 white knight; c1 white bishop; d1 white queen; e1 white king; f1 white bishop; h1 white rook; a2 white pawn; b2 white pawn; c2 white pawn; d2 white pawn; f2 white pawn; g2 white pawn; h2 white pawn; f3 white knight; e5 white pawn.
Moves by piece:
a1 white rook: no legal moves
b1 white knight: b1a3 b1c3
c1 white bishop: no legal moves
d1 white queen: d1e2
e1 white king: e1e2
f1 white bishop: f1a6 f1b5 f1c4 f1d3 f1e2
h1 white rook: h1g1
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
c2 white pawn: c2c3 c2c4
d2 white pawn: d2d3 d2d4
f2 white pawn: no legal moves
g2 white pawn: g2g3 g2g4
h2 white pawn: h2h3 h2h4
f3 white knight: f3d4 f3g1 f3g5 f3h4
e5 white pawn: e5e6
All legal moves: a2a3 a2a4 b1a3 b1c3 b2b3 b2b4 c2c3 c2c4 d1e2 d2d3 d2d4 e1e2 e5e6 f1a6 f1b5 f1c4 f1d3 f1e2 f3d4 f3g1 f3g5 f3h4 g2g3 g2g4 h1g1 h2h3 h2h4


Prompt:
FEN: r1bq1rk1/pppnppbp/3p1np1/6B1/3PP3/2PB1N2/PP3PPP/RN1Q1RK1 b - -
Walk each ray for the slider on g7: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: g7 black bishop.
Ray NE: h8 empty; edge.
Ray SE: h6 empty; edge.
Ray SW: f6 black knight: own piece (stop, excluded).
Ray NW: f8 black rook: own piece (stop, excluded).
Moves from rays: g7h6 g7h8


Prompt:
FEN: 8/4k3/8/8/8/3K4/1r6/R7 b - -
For every side-to-move piece, list pseudo-legal moves, reject illegal ones with reasons, then give all legal moves.

Answer format: include "Side to move:", "Pieces:", "Filter by piece:", one line per side-to-move piece with "pseudo-legal ... | rejected ... | legal ..." fields, and "All legal moves:".

Side to move: black.
Pieces: b2 black rook; e7 black king.
Filter by piece:
b2 black rook: pseudo-legal b2a2 b2b1 b2b3 b2b4 b2b5 b2b6 b2b7 b2b8 b2c2 b2d2 b2e2 b2f2 b2g2 b2h2 | rejected none | legal b2a2 b2b1 b2b3 b2b4 b2b5 b2b6 b2b7 b2b8 b2c2 b2d2 b2e2 b2f2 b2g2 b2h2
e7 black king: pseudo-legal e7d6 e7d7 e7d8 e7e6 e7e8 e7f6 e7f7 e7f8 | rejected none | legal e7d6 e7d7 e7d8 e7e6 e7e8 e7f6 e7f7 e7f8
All legal moves: b2a2 b2b1 b2b3 b2b4 b2b5 b2b6 b2b7 b2b8 b2c2 b2d2 b2e2 b2f2 b2g2 b2h2 e7d6 e7d7 e7d8 e7e6 e7e8 e7f6 e7f7 e7f8


Prompt:
FEN: r4rk1/1p2bppp/2N2n2/2p5/Pp2q3/1P6/1B1PNPPP/R2Q1RK1 b - - 0 18
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a8a4 a8a5 a8a6 a8a7 a8b8 a8c8 a8d8 a8e8 b7b5 b7b6 b7c6 c5c4 e4b1 e4c2 e4c4 e4c6 e4d3 e4d4 e4d5 e4e2 e4e3 e4e5 e4e6 e4f3 e4f4 e4f5 e4g2 e4g4 e4g6 e4h4 e7d6 e7d8 f6d5 f6d7 f6e8 f6g4 f6h5 f8b8 f8c8 f8d8 f8e8 g7g5 g7g6 g8h8 h7h5 h7h6


Prompt:
FEN: r1bqkb1r/pppn1ppp/5n2/3pN3/3P4/2NB4/PPP2PPP/R1BQK2R w KQkq -
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: a1 white rook; c1 white bishop; d1 white queen; e1 white king; h1 white rook; a2 white pawn; b2 white pawn; c2 white pawn; f2 white pawn; g2 white pawn; h2 white pawn; c3 white knight; d3 white bishop; d4 white pawn; e5 white knight.


Prompt:
FEN: rnb1kbnr/pp2pppp/8/3q4/1p6/5N2/PBPP1PPP/RN1QKB1R b KQkq -
What legal moves does the piece on d5 have?

d5a2 d5a5 d5b3 d5b5 d5c4 d5c5 d5c6 d5d2 d5d3 d5d4 d5d6 d5d7 d5d8 d5e4 d5e5 d5e6 d5f3 d5f5 d5g5 d5h5


Prompt:
FEN: 3r3k/1Q3pp1/8/2RN3p/8/8/5PPP/6K1 w - -
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 2k5/p1p3p1/6Qp/2P1K3/2qP1PP1/4r2P/8/8 w - - 7 37
List all capture moves available.


Prompt:
Given FEN: r1bqkbnr/ppp3pp/2B2p2/3pp3/8/1P2P3/PBPP1PPP/RN1QK1NR b KQkq - 0 5
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 8/1R2kppp/N2np3/p7/3p4/2p4P/5PP1/6K1 b - - 0 39
Is the move d6b7 legal?


Prompt:
FEN: 1k3b2/p1p3pp/1p6/3pr3/5n2/2N3N1/PPP1BP1P/R3K1R1 b Q - 3 20
List pseudo-legal moves from f4.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from f4: f4d3 f4e2 f4e6 f4g2 f4g6 f4h3 f4h5


Prompt:
FEN: r3k1nr/p1p2ppp/2p5/8/1b1P4/2N5/PP2qPPP/R1B1K2R w KQkq -
For the piece on a1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from a1: a1b1.
Legal: none.
Rejected: a1b1 does_not_resolve_check.


Prompt:
FEN: 2k1r2r/pp2qpb1/1npp1n1p/4p3/3PP2B/1BP2Q2/PP3PP1/RN2R1K1 b - - 4 16
For move a7a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a7a5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: 1r2r1k1/1p1bqpp1/p1np1n1p/2p1pP2/2B1P3/P2P1N2/1PPBQ1PP/R4RK1 w - - 4 14
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; f1 white rook; g1 white king; b2 white pawn; c2 white pawn; d2 white bishop; e2 white queen; g2 white pawn; h2 white pawn; a3 white pawn; d3 white pawn; f3 white knight; c4 white bishop; e4 white pawn; f5 white pawn.
Moves by piece:
a1 white rook: a1a2 a1b1 a1c1 a1d1 a1e1
f1 white rook: f1b1 f1c1 f1d1 f1e1 f1f2
g1 white king: g1f2 g1h1
b2 white pawn: b2b3 b2b4
c2 white pawn: c2c3
d2 white bishop: d2a5 d2b4 d2c1 d2c3 d2e1 d2e3 d2f4 d2g5 d2h6
e2 white queen: e2d1 e2e1 e2e3 e2f2
g2 white pawn: g2g3 g2g4
h2 white pawn: h2h3 h2h4
a3 white pawn: a3a4
d3 white pawn: d3d4
f3 white knight: f3d4 f3e1 f3e5 f3g5 f3h4
c4 white bishop: c4a2 c4a6 c4b3 c4b5 c4d5 c4e6 c4f7
e4 white pawn: no legal moves
f5 white pawn: no legal moves
All legal moves: a1a2 a1b1 a1c1 a1d1 a1e1 a3a4 b2b3 b2b4 c2c3 c4a2 c4a6 c4b3 c4b5 c4d5 c4e6 c4f7 d2a5 d2b4 d2c1 d2c3 d2e1 d2e3 d2f4 d2g5 d2h6 d3d4 e2d1 e2e1 e2e3 e2f2 f1b1 f1c1 f1d1 f1e1 f1f2 f3d4 f3e1 f3e5 f3g5 f3h4 g1f2 g1h1 g2g3 g2g4 h2h3 h2h4


Prompt:
FEN: 8/8/8/2k1K3/Q7/8/8/8 w - -
Walk each ray for the slider on a4: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a4 white queen.
Ray N: a5 empty; a6 empty; a7 empty; a8 empty; edge.
Ray NE: b5 empty; c6 empty; d7 empty; e8 empty; edge.
Ray E: b4 empty; c4 empty; d4 empty; e4 empty; f4 empty; g4 empty; h4 empty; edge.
Ray SE: b3 empty; c2 empty; d1 empty; edge.
Ray S: a3 empty; a2 empty; a1 empty; edge.
Ray SW: edge.
Ray W: edge.
Ray NW: edge.
Moves from rays: a4a1 a4a2 a4a3 a4a5 a4a6 a4a7 a4a8 a4b3 a4b4 a4b5 a4c2 a4c4 a4c6 a4d1 a4d4 a4d7 a4e4 a4e8 a4f4 a4g4 a4h4


Prompt:
FEN: rnbk3r/pp4pp/5q2/3B1n2/4R3/3P1N2/PPP1QPPP/R5K1 b - - 0 15
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 b7b5 b7b6 b8a6 b8c6 b8d7 c8d7 c8e6 d8c7 d8d7 f5d4 f5d6 f5e3 f5e7 f5g3 f5h4 f5h6 f6a6 f6b2 f6b6 f6c3 f6c6 f6d4 f6d6 f6e5 f6e6 f6e7 f6f7 f6f8 f6g5 f6g6 f6h4 f6h6 g7g5 g7g6 h7h5 h7h6 h8e8 h8f8 h8g8


Prompt:
FEN: 5r2/1Q3p1k/4P1pp/8/1R1q1P2/7P/6PK/8 b - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: d4a1 d4a7 d4b2 d4b4 d4b6 d4c3 d4c4 d4c5 d4d1 d4d2 d4d3 d4d5 d4d6 d4d7 d4d8 d4e3 d4e4 d4e5 d4f2 d4f4 d4f6 d4g1 d4g7 d4h8 f8a8 f8b8 f8c8 f8d8 f8e8 f8g8 f8h8 g6g5 h6h5 h7g7 h7g8 h7h8


Prompt:
FEN: 3q2k1/p4pp1/7p/2N1p3/P2p2Q1/1r5P/1r3PPK/R7 b - - 5 38
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: b2 black rook; b3 black rook; d4 black pawn; e5 black pawn; h6 black pawn; a7 black pawn; f7 black pawn; g7 black pawn; d8 black queen; g8 black king.


Prompt:
FEN: r3bnk1/p1q1b2p/1p2p1p1/3pP3/1P1B1Q2/P1PB4/1N4PP/5RK1 w - -
What legal moves does the piece on g2 have?


Prompt:
FEN: r2q1rk1/ppp1b1p1/3p3p/4pP2/3QP3/8/PPP3PP/R1B2RK1 w - - 0 14
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 2kr3r/1pp3pp/p2b1p2/3n4/2PpP3/P2B1P1P/1P2K2P/R6R w - - 0 16
List all capture moves available.


Prompt:
Given FEN: 6k1/p1r1bp1p/2p1n1p1/2prP3/2R1NP2/1P2B1P1/P3K2P/2R5 b - -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 8/1pp3r1/p2pk1P1/8/5K2/P7/1PP5/6R1 b - - 8 33
Is the move g1g3 legal?


Prompt:
FEN: r1bqr1k1/p3bpp1/2p2n1p/3p4/8/2N1B1P1/PP2PPBP/R2Q1RK1 w - -
List pseudo-legal moves from a1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 3R4/6kp/4b1p1/3N4/p3P3/1p6/PPP3P1/6K1 w - - 0 39
For the piece on g1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from g1: g1f1 g1f2 g1h1 g1h2.
Legal: g1f1 g1f2 g1h1 g1h2.
Rejected: none.


Prompt:
FEN: r2q1rk1/2p1bppp/2pp1nb1/p3p3/4P1PN/1P1P3P/PBPNQP2/R3K2R b KQ - 1 12
For move a5a4, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a5a4.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: rnbqkbnr/pppp3p/8/5pp1/4Pp2/5Q2/PPPP2PP/RNB1KBNR w KQkq - 0 6
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; b1 white knight; c1 white bishop; e1 white king; f1 white bishop; g1 white knight; h1 white rook; a2 white pawn; b2 white pawn; c2 white pawn; d2 white pawn; g2 white pawn; h2 white pawn; f3 white queen; e4 white pawn.
Moves by piece:
a1 white rook: no legal moves
b1 white knight: b1a3 b1c3
c1 white bishop: no legal moves
e1 white king: e1d1 e1e2 e1f2
f1 white bishop: f1a6 f1b5 f1c4 f1d3 f1e2
g1 white knight: g1e2 g1h3
h1 white rook: no legal moves
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
c2 white pawn: c2c3 c2c4
d2 white pawn: d2d3 d2d4
g2 white pawn: g2g3 g2g4
h2 white pawn: h2h3 h2h4
f3 white queen: f3a3 f3b3 f3c3 f3d1 f3d3 f3e2 f3e3 f3f2 f3f4 f3g3 f3g4 f3h3 f3h5
e4 white pawn: e4e5 e4f5
All legal moves: a2a3 a2a4 b1a3 b1c3 b2b3 b2b4 c2c3 c2c4 d2d3 d2d4 e1d1 e1e2 e1f2 e4e5 e4f5 f1a6 f1b5 f1c4 f1d3 f1e2 f3a3 f3b3 f3c3 f3d1 f3d3 f3e2 f3e3 f3f2 f3f4 f3g3 f3g4 f3h3 f3h5 g1e2 g1h3 g2g3 g2g4 h2h3 h2h4


Prompt:
FEN: r1bq1b1r/ppp2kpp/2n5/3np3/2B5/5Q2/PPPP1PPP/1NB1K2R b K -
Walk each ray for the slider on a8: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a8 black rook.
Ray N: edge.
Ray E: b8 empty; c8 black bishop: own piece (stop, excluded).
Ray S: a7 black pawn: own piece (stop, excluded).
Ray W: edge.
Moves from rays: a8b8


Prompt:
FEN: 3rr3/ppq2pkp/2n2p2/8/2P1NPb1/QR2p1P1/P3P1BP/5RK1 b - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 b7b5 b7b6 c6a5 c6b4 c6b8 c6d4 c6e5 c6e7 c7a5 c7b6 c7b8 c7c8 c7d6 c7d7 c7e5 c7e7 c7f4 d8a8 d8b8 d8c8 d8d1 d8d2 d8d3 d8d4 d8d5 d8d6 d8d7 e8e4 e8e5 e8e6 e8e7 e8f8 e8g8 e8h8 f6f5 g4c8 g4d7 g4e2 g4e6 g4f3 g4f5 g4h3 g4h5 g7g6 g7g8 g7h6 g7h8 h7h5 h7h6


Prompt:
FEN: r2q1r1k/1pp2p1p/3bb1n1/pP1p1p2/P2Pp2P/2P1P3/1B1NBP2/RN1QK2R w KQ - 1 16
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a1a2 a1a3 b1a3 b2a3 b2c1 b5b6 c3c4 d1b3 d1c1 d1c2 d2b3 d2c4 d2e4 d2f1 d2f3 e1f1 e1g1 e2c4 e2d3 e2f1 e2f3 e2g4 e2h5 f2f3 f2f4 h1f1 h1g1 h1h2 h1h3 h4h5


Prompt:
FEN: 8/8/p1p4p/Pp1k1pp1/1P1P4/2P1K1PP/8/8 b - -
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: b5 black pawn; d5 black king; f5 black pawn; g5 black pawn; a6 black pawn; c6 black pawn; h6 black pawn.


Prompt:
FEN: 5r2/pp5k/6pp/3bq3/3N4/2PQ1p1P/PP3P2/5BK1 w - - 0 40
What legal moves does the piece on a2 have?


Prompt:
FEN: r1b1kb1r/pp1p1ppp/4p3/4q3/2PpN3/P2P2P1/1P2K2P/R2Q1B1R w kq - 0 14
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: rnbqkb1r/pp3ppp/3p1n2/2pP4/5B2/8/PP2PPPP/RN1QKBNR w KQkq -
List all capture moves available.


Prompt:
Given FEN: r5k1/pp2pp1p/2p3p1/3r4/1b6/1P2B2P/P4PP1/1N3RK1 w - - 1 18
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 6k1/4q2p/p1p5/2bpnp2/5P2/P1N5/1PP3PP/4RR1K b - -
Is the move e7e8 legal?


Prompt:
FEN: 8/p7/5k1p/3r4/1B6/P5P1/n6P/5K2 w - - 0 35
List pseudo-legal moves from f1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from f1: f1e1 f1e2 f1f2 f1g1 f1g2


Prompt:
FEN: 8/p1p5/3bk3/1p2pn2/1P4N1/2PP4/1P2KP2/R1B4r b - -
For the piece on e6, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from e6: e6d5 e6d7 e6e7 e6f6 e6f7.
Legal: e6d5 e6d7 e6e7 e6f7.
Rejected: e6f6 king_would_be_in_check.


Prompt:
FEN: r2q2k1/1pp2rp1/pb1ppnNp/4p3/4P3/2PP4/PP1Q1PPP/R1B2RK1 w - -
For move f2f3, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: f2f3.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; pinned_piece_exposes_king.


Prompt:
FEN: rnbqkb1r/pp4p1/3p1n2/2pP3p/2P2p2/1NN1pPP1/PP2P2P/R1BQKB1R w KQkq - 0 10
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; c1 white bishop; d1 white queen; e1 white king; f1 white bishop; h1 white rook; a2 white pawn; b2 white pawn; e2 white pawn; h2 white pawn; b3 white knight; c3 white knight; f3 white pawn; g3 white pawn; c4 white pawn; d5 white pawn.
Moves by piece:
a1 white rook: a1b1
c1 white bishop: c1d2 c1e3
d1 white queen: d1c2 d1d2 d1d3 d1d4
e1 white king: no legal moves
f1 white bishop: f1g2 f1h3
h1 white rook: h1g1
a2 white pawn: a2a3 a2a4
b2 white pawn: no legal moves
e2 white pawn: no legal moves
h2 white pawn: h2h3 h2h4
b3 white knight: b3a5 b3c5 b3d2 b3d4
c3 white knight: c3a4 c3b1 c3b5 c3e4
f3 white pawn: no legal moves
g3 white pawn: g3f4 g3g4
c4 white pawn: no legal moves
d5 white pawn: no legal moves
All legal moves: a1b1 a2a3 a2a4 b3a5 b3c5 b3d2 b3d4 c1d2 c1e3 c3a4 c3b1 c3b5 c3e4 d1c2 d1d2 d1d3 d1d4 f1g2 f1h3 g3f4 g3g4 h1g1 h2h3 h2h4


Prompt:
FEN: 8/5R2/B6P/1N6/8/8/P4PP1/k5K1 w - - 1 35
Walk each ray for the slider on a6: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a6 white bishop.
Ray NE: b7 empty; c8 empty; edge.
Ray SE: b5 white knight: own piece (stop, excluded).
Ray SW: edge.
Ray NW: edge.
Moves from rays: a6b7 a6c8


Prompt:
FEN: rn1qk2r/ppp1ppbp/3p1np1/8/2PP1Bb1/4PN1P/PP3PP1/RN1QKB1R b KQkq -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 b7b5 b7b6 b8a6 b8c6 b8d7 c7c5 c7c6 d6d5 d8c8 d8d7 e7e5 e7e6 e8d7 e8f8 e8g8 f6d5 f6d7 f6e4 f6g8 f6h5 g4c8 g4d7 g4e6 g4f3 g4f5 g4h3 g4h5 g6g5 g7f8 g7h6 h7h5 h7h6 h8f8 h8g8


Prompt:
FEN: 5rk1/p1p3pp/8/2p1p3/4b2P/PPP2r2/3KN2R/6R1 w - - 0 32
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a3a4 b3b4 c3c4 d2c1 d2d1 d2e1 e2c1 e2d4 e2f4 e2g3 g1a1 g1b1 g1c1 g1d1 g1e1 g1f1 g1g2 g1g3 g1g4 g1g5 g1g6 g1g7 g1h1 h2f2 h2g2 h2h1 h2h3 h4h5


Prompt:
FEN: 2kr3r/1pq2ppp/p1n2n2/3pp3/2N1P3/2P2P2/PP1Q1BPP/R3K2R w KQ - 0 19
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: a1 white rook; e1 white king; h1 white rook; a2 white pawn; b2 white pawn; d2 white queen; f2 white bishop; g2 white pawn; h2 white pawn; c3 white pawn; f3 white pawn; c4 white knight; e4 white pawn.


Prompt:
FEN: r3b1k1/1p2bpp1/2p1p2p/q3P3/2P1BBQ1/pP4P1/P4P1P/3R2K1 b - -
What legal moves does the piece on a8 have?


Prompt:
FEN: r7/1p2kppp/1B6/4P3/4PP1P/8/P2R1K2/2r3NR b - - 2 27
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 2k2r2/2p3p1/3r2q1/1Q5p/4n3/4B2P/P4PP1/2R1R1K1 w - - 0 30
List all capture moves available.


Prompt:
Given FEN: 3qkb1r/1p1n1ppp/p1rPp3/8/P7/2N1B3/1PP2PPP/R2Q1RK1 b k - 0 13
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: rnbq1rk1/pppppp1p/6pn/8/2PPP3/2N5/PP3PPP/R2QKBNR b KQ - 0 5
Is the move f6f7 legal?


Prompt:
FEN: r4rk1/1ppq1p2/p2p1nnQ/2bP2N1/3p4/P1PB3P/1P3PP1/R4RK1 b - - 1 18
List pseudo-legal moves from d4.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: r1b2rk1/pp2ppbp/2n3p1/q1p5/2BP4/B1P1PN2/P3QPPP/R4RK1 w - -
For the piece on a1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from a1: a1b1 a1c1 a1d1 a1e1.
Legal: a1b1 a1c1 a1d1 a1e1.
Rejected: none.


Prompt:
FEN: 6k1/p7/2p5/1pPn1pp1/8/P1P2BB1/2PK4/8 b - - 1 35
For move a7a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a7a5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: r1bqk2r/p1p2ppp/2pp4/3nP1b1/2P5/8/PP3PPP/RN1QK1NR w KQkq - 0 10
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; b1 white knight; d1 white queen; e1 white king; g1 white knight; h1 white rook; a2 white pawn; b2 white pawn; f2 white pawn; g2 white pawn; h2 white pawn; c4 white pawn; e5 white pawn.
Moves by piece:
a1 white rook: no legal moves
b1 white knight: b1a3 b1c3 b1d2
d1 white queen: d1a4 d1b3 d1c1 d1c2 d1d2 d1d3 d1d4 d1d5 d1e2 d1f3 d1g4 d1h5
e1 white king: e1e2 e1f1
g1 white knight: g1e2 g1f3 g1h3
h1 white rook: no legal moves
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
f2 white pawn: f2f3 f2f4
g2 white pawn: g2g3 g2g4
h2 white pawn: h2h3 h2h4
c4 white pawn: c4c5 c4d5
e5 white pawn: e5d6 e5e6
All legal moves: a2a3 a2a4 b1a3 b1c3 b1d2 b2b3 b2b4 c4c5 c4d5 d1a4 d1b3 d1c1 d1c2 d1d2 d1d3 d1d4 d1d5 d1e2 d1f3 d1g4 d1h5 e1e2 e1f1 e5d6 e5e6 f2f3 f2f4 g1e2 g1f3 g1h3 g2g3 g2g4 h2h3 h2h4


Prompt:
FEN: r2qk2r/1b1nbpp1/3ppn1p/p1p5/Pp1PP3/1PPBBN2/N3QPPP/R4RK1 w kq - 0 14
Walk each ray for the slider on a1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a1 white rook.
Ray N: a2 white knight: own piece (stop, excluded).
Ray E: b1 empty; c1 empty; d1 empty; e1 empty; f1 white rook: own piece (stop, excluded).
Ray S: edge.
Ray W: edge.
Moves from rays: a1b1 a1c1 a1d1 a1e1


Prompt:
FEN: 8/8/4P1p1/3K1r1p/6kP/8/8/8 w - - 1 81
For every side-to-move piece, list pseudo-legal moves, reject illegal ones with reasons, then give all legal moves.

Answer format: include "Side to move:", "Pieces:", "Filter by piece:", one line per side-to-move piece with "pseudo-legal ... | rejected ... | legal ..." fields, and "All legal moves:".

Side to move: white.
Pieces: h4 white pawn; d5 white king; e6 white pawn.
Filter by piece:
h4 white pawn: pseudo-legal none | rejected none | legal none
d5 white king: pseudo-legal d5c4 d5c5 d5c6 d5d4 d5d6 d5e4 d5e5 | rejected d5c5 does_not_resolve_check; d5e5 does_not_resolve_check | legal d5c4 d5c6 d5d4 d5d6 d5e4
e6 white pawn: pseudo-legal e6e7 | rejected e6e7 does_not_resolve_check | legal none
All legal moves: d5c4 d5c6 d5d4 d5d6 d5e4


Prompt:
FEN: 2kr3r/pbp1n1qp/np1b1p2/4p1p1/4P3/P1N1BP2/1PP1N1PP/2KRQB1R w - - 2 16
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a3a4 b2b3 b2b4 c1b1 c1d2 c3a2 c3a4 c3b1 c3b5 c3d5 d1d2 d1d3 d1d4 d1d5 d1d6 e1d2 e1f2 e1g3 e1h4 e2d4 e2f4 e2g1 e2g3 e3b6 e3c5 e3d2 e3d4 e3f2 e3f4 e3g1 e3g5 f3f4 g2g3 g2g4 h1g1 h2h3 h2h4


Prompt:
FEN: 1K6/1P6/4k3/8/3R4/8/r7/8 b - -
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: a2 black rook; e6 black king.


Prompt:
FEN: r2qk2r/1b3ppp/1pnbpn2/p1p5/2Pp4/PP1P1NP1/1B1NPPBP/R2Q1RK1 w kq -
What legal moves does the piece on f2 have?


Prompt:
FEN: 1r3rk1/p4p1p/1qp3p1/4Pb2/4N3/8/PPQ2PP1/1R3RK1 w - -
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: r2qk2r/pp2bppp/2np4/1N2p3/2B1P3/5b1P/PP2QPP1/R2R2K1 w kq - 0 14
List all capture moves available.


Prompt:
Given FEN: r3rbk1/1b3pp1/5n1p/p2q4/P1NNp3/1PB5/5PPP/R2QR1K1 b - -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: rnbqkb1r/p4ppp/1p2pn2/2pP4/1P3P2/P7/1B1PP1PP/RN1QKBNR b KQkq - 0 6
Is the move d5h2 legal?


Prompt:
FEN: 1k6/8/NP6/1K6/8/8/8/8 b - - 8 78
List pseudo-legal moves from b8.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from b8: b8a7 b8a8 b8b7 b8c7 b8c8


Prompt:
FEN: r1bqk1nr/p2nppbp/1ppp2p1/8/3PP3/2NB1N2/PPP2PPP/R1BQK2R w KQkq -
For the piece on a1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from a1: a1b1.
Legal: a1b1.
Rejected: none.


Prompt:
FEN: rn1qk1nr/pbp2pbp/1p1pp1p1/6B1/2PP4/5NP1/PP2PPBP/RN1Q1RK1 b kq - 1 7
For move e8e7, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: e8e7.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; king_would_be_in_check.


Prompt:
FEN: r3kbnr/1ppqpppp/p1n5/3p4/3P1B2/P1NQP3/1PP2PPP/R3K1NR b KQkq - 0 7
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: d5 black pawn; a6 black pawn; c6 black knight; b7 black pawn; c7 black pawn; d7 black queen; e7 black pawn; f7 black pawn; g7 black pawn; h7 black pawn; a8 black rook; e8 black king; f8 black bishop; g8 black knight; h8 black rook.
Moves by piece:
d5 black pawn: no legal moves
a6 black pawn: a6a5
c6 black knight: c6a5 c6a7 c6b4 c6b8 c6d4 c6d8 c6e5
b7 black pawn: b7b5 b7b6
c7 black pawn: no legal moves
d7 black queen: d7c8 d7d6 d7d8 d7e6 d7f5 d7g4 d7h3
e7 black pawn: e7e5 e7e6
f7 black pawn: f7f5 f7f6
g7 black pawn: g7g5 g7g6
h7 black pawn: h7h5 h7h6
a8 black rook: a8a7 a8b8 a8c8 a8d8
e8 black king: e8c8 e8d8
f8 black bishop: no legal moves
g8 black knight: g8f6 g8h6
h8 black rook: no legal moves
All legal moves: a6a5 a8a7 a8b8 a8c8 a8d8 b7b5 b7b6 c6a5 c6a7 c6b4 c6b8 c6d4 c6d8 c6e5 d7c8 d7d6 d7d8 d7e6 d7f5 d7g4 d7h3 e7e5 e7e6 e8c8 e8d8 f7f5 f7f6 g7g5 g7g6 g8f6 g8h6 h7h5 h7h6


Prompt:
FEN: rn2k2r/p3n3/b2Np3/2p1Pp2/2p2B2/5N2/PPP3PP/R4RK1 b kq - 3 18
Walk each ray for the slider on a6: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a6 black bishop.
Ray NE: b7 empty; c8 empty; edge.
Ray SE: b5 empty; c4 black pawn: own piece (stop, excluded).
Ray SW: edge.
Ray NW: edge.
Moves from rays: a6b5 a6b7 a6c8


Prompt:
FEN: 4r1k1/2q2ppp/1rp5/7b/1bQ5/1N2PNnP/PP2B1P1/R1R3K1 b - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: b4a3 b4a5 b4c3 b4c5 b4d2 b4d6 b4e1 b4e7 b4f8 b6a6 b6b5 b6b7 b6b8 c6c5 c7a7 c7b7 c7b8 c7c8 c7d6 c7d7 c7d8 c7e5 c7e7 c7f4 e8a8 e8b8 e8c8 e8d8 e8e3 e8e4 e8e5 e8e6 e8e7 e8f8 g3e2 g3e4 g3f1 g3f5 g3h1 g7g5 g7g6 g8f8 g8h8 h5f3 h5g4 h5g6 h7h6


Prompt:
FEN: rnbqkb1r/ppp1pppp/8/3p4/3PnP2/4PN2/PPP3PP/RNBQKB1R w KQkq -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b1a3 b1c3 b1d2 b2b3 b2b4 c1d2 c2c3 c2c4 d1d2 d1d3 d1e2 e1e2 f1a6 f1b5 f1c4 f1d3 f1e2 f3d2 f3e5 f3g1 f3g5 f3h4 f4f5 g2g3 g2g4 h1g1 h2h3 h2h4


Prompt:
FEN: r2q1rk1/pppn1ppp/3p1nb1/6B1/1PP3P1/PQP4P/4Pp2/2KR1BNR w - - 0 14
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: c1 white king; d1 white rook; f1 white bishop; g1 white knight; h1 white rook; e2 white pawn; a3 white pawn; b3 white queen; c3 white pawn; h3 white pawn; b4 white pawn; c4 white pawn; g4 white pawn; g5 white bishop.


Prompt:
FEN: 8/3r4/8/5P2/2P3P1/pP3K2/P3R3/2k5 b - - 0 50
What legal moves does the piece on c1 have?


Prompt:
FEN: 4k1r1/p1p5/3p4/p2PN2p/4Pb1P/2P5/P5P1/1BQ3K1 b - - 0 24
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: rnbqk1nr/ppp2ppp/3p1b2/8/2BNP3/8/PPP2PPP/RNBQK2R b KQkq - 2 6
List all capture moves available.


Prompt:
Given FEN: Q4qk1/5pp1/7p/4p3/P7/1b1BP3/1r3PPP/2R3K1 w - -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r2r2k1/2q3pp/1p3p2/p1p2P1Q/P4p1P/2R5/1PP2PP1/4R1K1 w - -
Is the move e1f1 legal?


Prompt:
FEN: r1bqk1nr/ppppbppp/8/n3N3/2BPP3/2P5/P4PPP/RNBQK2R b KQkq -
List pseudo-legal moves from a5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from a5: a5b3 a5c4 a5c6


Prompt:
FEN: 8/8/1R4pk/r6p/7P/6PK/8/8 b - -
For the piece on g6, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from g6: g6g5.
Legal: none.
Rejected: g6g5 pinned_piece_exposes_king.


Prompt:
FEN: 4n2R/3k2p1/1p6/8/1B1KP1P1/2p2r2/8/8 b - - 1 38
For move d7d6, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: d7d6.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; king_would_be_in_check.


Prompt:
FEN: r1b1k2r/p1p1b1pp/2ppq3/4p3/2P1P3/3Q1N2/PP3PPP/RN3RK1 b kq - 2 11
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: e5 black pawn; c6 black pawn; d6 black pawn; e6 black queen; a7 black pawn; c7 black pawn; e7 black bishop; g7 black pawn; h7 black pawn; a8 black rook; c8 black bishop; e8 black king; h8 black rook.
Moves by piece:
e5 black pawn: no legal moves
c6 black pawn: c6c5
d6 black pawn: d6d5
e6 black queen: e6c4 e6d5 e6d7 e6f5 e6f6 e6f7 e6g4 e6g6 e6g8 e6h3 e6h6
a7 black pawn: a7a5 a7a6
c7 black pawn: no legal moves
e7 black bishop: e7d8 e7f6 e7f8 e7g5 e7h4
g7 black pawn: g7g5 g7g6
h7 black pawn: h7h5 h7h6
a8 black rook: a8b8
c8 black bishop: c8a6 c8b7 c8d7
e8 black king: e8d7 e8d8 e8f7 e8f8 e8g8
h8 black rook: h8f8 h8g8
All legal moves: a7a5 a7a6 a8b8 c6c5 c8a6 c8b7 c8d7 d6d5 e6c4 e6d5 e6d7 e6f5 e6f6 e6f7 e6g4 e6g6 e6g8 e6h3 e6h6 e7d8 e7f6 e7f8 e7g5 e7h4 e8d7 e8d8 e8f7 e8f8 e8g8 g7g5 g7g6 h7h5 h7h6 h8f8 h8g8


Prompt:
FEN: r4rk1/pp3ppp/3b1n2/q1p1p3/2Pn4/BPNP3N/P2QBRPP/R3K3 b Q - 3 16
Walk each ray for the slider on a5: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a5 black queen.
Ray N: a6 empty; a7 black pawn: own piece (stop, excluded).
Ray NE: b6 empty; c7 empty; d8 empty; edge.
Ray E: b5 empty; c5 black pawn: own piece (stop, excluded).
Ray SE: b4 empty; c3 white knight: capture (stop, included).
Ray S: a4 empty; a3 white bishop: capture (stop, included).
Ray SW: edge.
Ray W: edge.
Ray NW: edge.
Moves from rays: a5a3 a5a4 a5a6 a5b4 a5b5 a5b6 a5c3 a5c7 a5d8


Prompt:
FEN: r5k1/pp2bq1p/2p3p1/8/2PP2P1/1P2RB1P/P4P2/4R1K1 w - - 2 31
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b3b4 c4c5 d4d5 e1a1 e1b1 e1c1 e1d1 e1e2 e1f1 e3c3 e3d3 e3e2 e3e4 e3e5 e3e6 e3e7 f3c6 f3d1 f3d5 f3e2 f3e4 f3g2 f3h1 g1f1 g1g2 g1h1 g1h2 g4g5 h3h4


Prompt:
FEN: 2k4r/ppp5/8/4r1Pp/P4K1P/8/8/7n w - - 0 31
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a4a5 f4e5 f4f3 g5g6


Prompt:
FEN: r2q2k1/1p1b2pp/p2N4/3p1p2/3p1Q2/5P2/PPP4P/4R1K1 w - -
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: e1 white rook; g1 white king; a2 white pawn; b2 white pawn; c2 white pawn; h2 white pawn; f3 white pawn; f4 white queen; d6 white knight.


Prompt:
FEN: r1b1kb1r/p2n1ppp/1qp1p3/3pP1B1/3Q4/2N2N2/PPP2PPP/R3K2R w KQkq -
What legal moves does the piece on f2 have?


Prompt:
FEN: 8/8/8/p7/1k1bNp2/5P2/1p1K4/r7 b - - 1 54
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: r4rk1/ppqn2pp/2pb1n2/3pp3/3P4/3B3P/PPP1NPP1/R1BQ1R1K w - - 0 13
List all capture moves available.


Prompt:
Given FEN: 3rkbnr/p4Np1/b1q1p2p/2p1P3/3p4/1P3N2/P1PQ1PPP/R1B1K2R b KQk - 0 14
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r6k/ppnq2bp/3p2b1/3Pp3/1P2N2P/P1N2Q2/3B2P1/5RK1 b - -
Is the move a8b8 legal?


Prompt:
FEN: 2kr1bnr/p1pn1ppp/1p2p3/8/5B2/2NP1N2/PPP2PPP/R3K2R b KQ - 1 10
List pseudo-legal moves from b6.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 1rbq1rk1/5ppp/pn1b1n2/Bp1pN3/2pP4/1PN1P3/P1B2PPP/R2QK2R b KQ - 6 14
For the piece on c4, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from c4: c4b3.
Legal: c4b3.
Rejected: none.


Prompt:
FEN: r7/pbqkn2Q/1p2p3/2ppP3/3P2P1/2P5/PP1NB2P/R4K2 w - - 3 22
For move a1b1, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a1b1.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: 8/8/7k/3B1K1P/1p2PPP1/1Pr5/8/8 b - -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: c3 black rook; b4 black pawn; h6 black king.
Moves by piece:
c3 black rook: c3b3 c3c1 c3c2 c3c4 c3c5 c3c6 c3c7 c3c8 c3d3 c3e3 c3f3 c3g3 c3h3
b4 black pawn: no legal moves
h6 black king: h6g7 h6h7
All legal moves: c3b3 c3c1 c3c2 c3c4 c3c5 c3c6 c3c7 c3c8 c3d3 c3e3 c3f3 c3g3 c3h3 h6g7 h6h7


Prompt:
FEN: 8/4r1pR/2p2k2/3q1b2/1P1P3Q/6P1/5P1P/6K1 b - - 3 47
Walk each ray for the slider on d5: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: d5 black queen.
Ray N: d6 empty; d7 empty; d8 empty; edge.
Ray NE: e6 empty; f7 empty; g8 empty; edge.
Ray E: e5 empty; f5 black bishop: own piece (stop, excluded).
Ray SE: e4 empty; f3 empty; g2 empty; h1 empty; edge.
Ray S: d4 white pawn: capture (stop, included).
Ray SW: c4 empty; b3 empty; a2 empty; edge.
Ray W: c5 empty; b5 empty; a5 empty; edge.
Ray NW: c6 black pawn: own piece (stop, excluded).
Moves from rays: d5a2 d5a5 d5b3 d5b5 d5c4 d5c5 d5d4 d5d6 d5d7 d5d8 d5e4 d5e5 d5e6 d5f3 d5f7 d5g2 d5g8 d5h1


Prompt:
FEN: 2Q5/k7/8/3R1N2/8/8/8/6K1 w - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: c8a6 c8a8 c8b7 c8b8 c8c1 c8c2 c8c3 c8c4 c8c5 c8c6 c8c7 c8d7 c8d8 c8e6 c8e8 c8f8 c8g8 c8h8 d5a5 d5b5 d5c5 d5d1 d5d2 d5d3 d5d4 d5d6 d5d7 d5d8 d5e5 f5d4 f5d6 f5e3 f5e7 f5g3 f5g7 f5h4 f5h6 g1f1 g1f2 g1g2 g1h1 g1h2


Prompt:
FEN: 4K3/3P4/8/1q6/8/8/8/2k5 w - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: e8d8 e8e7 e8f7 e8f8


Prompt:
FEN: rnbq1rk1/p1p1bppp/1p2pn2/2Pp4/1P1P4/2N1PN2/P4PPP/R1BQKB1R b KQ - 0 7
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: d5 black pawn; b6 black pawn; e6 black pawn; f6 black knight; a7 black pawn; c7 black pawn; e7 black bishop; f7 black pawn; g7 black pawn; h7 black pawn; a8 black rook; b8 black knight; c8 black bishop; d8 black queen; f8 black rook; g8 black king.


Prompt:
FEN: rn1qkbnr/ppp3pp/3pp3/8/4P3/2N4P/PP3PP1/R1BQK1NR b KQkq - 0 7
What legal moves does the piece on g7 have?


Prompt:
FEN: 8/4kp1p/1P1qp1pn/8/1nQp2P1/5P2/r1P4P/3RK2R w K - 0 25
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: r1bqkbnr/3n1pp1/p1p1p2p/1p6/3P1B2/2NB1N2/PPP2PPP/R2QR1K1 w kq - 0 10
List all capture moves available.


Prompt:
Given FEN: r1bqkb1r/pp2pp1p/2np1np1/8/2PpP3/2N2N1P/PP3PP1/R1BQKB1R w KQkq - 0 7
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r3kb1r/ppp1ppp1/5n2/8/3P2P1/2N1B2b/PPPKB2q/R2Q3R b kq - 2 19
Is the move f6e4 legal?


Prompt:
FEN: 7r/pppR2pp/1k2p3/2b5/5P2/2P3P1/PP4KP/3R4 b - - 4 27
List pseudo-legal moves from c5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from c5: c5a3 c5b4 c5d4 c5d6 c5e3 c5e7 c5f2 c5f8 c5g1


Prompt:
FEN: 6k1/1p2r1pp/p1p1r3/P1Pp1p1P/6PR/2P1P3/4K1PB/5B2 b - -
For the piece on d5, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from d5: d5d4.
Legal: d5d4.
Rejected: none.


Prompt:
FEN: r5k1/5ppp/4p3/3nB3/Bb1P4/1P2P3/3N1PPP/5K2 w - - 1 25
For move a4b5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a4b5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: rnb1k2r/pp2n1pp/2p1pp2/q2p4/2PP3B/2P2N2/P1Q1PPPP/R3KB1R w KQkq - 4 9
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; e1 white king; f1 white bishop; h1 white rook; a2 white pawn; c2 white queen; e2 white pawn; f2 white pawn; g2 white pawn; h2 white pawn; c3 white pawn; f3 white knight; c4 white pawn; d4 white pawn; h4 white bishop.
Moves by piece:
a1 white rook: a1b1 a1c1 a1d1
e1 white king: e1c1 e1d1 e1d2
f1 white bishop: no legal moves
h1 white rook: h1g1
a2 white pawn: a2a3 a2a4
c2 white queen: c2a4 c2b1 c2b2 c2b3 c2c1 c2d1 c2d2 c2d3 c2e4 c2f5 c2g6 c2h7
e2 white pawn: e2e3 e2e4
f2 white pawn: no legal moves
g2 white pawn: g2g3 g2g4
h2 white pawn: h2h3
c3 white pawn: no legal moves
f3 white knight: f3d2 f3e5 f3g1 f3g5
c4 white pawn: c4c5 c4d5
d4 white pawn: no legal moves
h4 white bishop: h4f6 h4g3 h4g5
All legal moves: a1b1 a1c1 a1d1 a2a3 a2a4 c2a4 c2b1 c2b2 c2b3 c2c1 c2d1 c2d2 c2d3 c2e4 c2f5 c2g6 c2h7 c4c5 c4d5 e1c1 e1d1 e1d2 e2e3 e2e4 f3d2 f3e5 f3g1 f3g5 g2g3 g2g4 h1g1 h2h3 h4f6 h4g3 h4g5


Prompt:
FEN: r2q1rk1/1pp1bppp/1nn1b3/4p3/p7/P1NPBNP1/1P2PPBP/2RQ1RK1 w - -
Walk each ray for the slider on c1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: c1 white rook.
Ray N: c2 empty; c3 white knight: own piece (stop, excluded).
Ray E: d1 white queen: own piece (stop, excluded).
Ray S: edge.
Ray W: b1 empty; a1 empty; edge.
Moves from rays: c1a1 c1b1 c1c2


Prompt:
FEN: r3k1nr/1pp1b1q1/p1n5/4p2p/2NPP1b1/1PP1BN2/P2Q2PP/R4RK1 b - - 2 21
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a6a5 a8a7 a8b8 a8c8 a8d8 b7b5 b7b6 c6a5 c6a7 c6b4 c6b8 c6d4 c6d8 e5d4 e7a3 e7b4 e7c5 e7d6 e7d8 e7f6 e7f8 e7g5 e7h4 e8d7 e8d8 e8f7 e8f8 g4c8 g4d7 g4e6 g4f3 g4f5 g4h3 g7f6 g7f7 g7f8 g7g5 g7g6 g7h6 g7h7 g8f6 g8h6 h5h4 h8h6 h8h7


Prompt:
FEN: 2r3k1/p5pp/p4b2/4N3/1P5P/P5P1/2r2PK1/R3R3 b - - 0 30
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a6a5 c2a2 c2b2 c2c1 c2c3 c2c4 c2c5 c2c6 c2c7 c2d2 c2e2 c2f2 c8a8 c8b8 c8c3 c8c4 c8c5 c8c6 c8c7 c8d8 c8e8 c8f8 f6d8 f6e5 f6e7 f6g5 f6h4 g7g5 g7g6 g8f8 g8h8 h7h5 h7h6


Prompt:
FEN: 4k2r/1p6/2b1p2p/2N1P2p/5P1Q/pPp5/Pn4PK/4R3 w - -
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: e1 white rook; a2 white pawn; g2 white pawn; h2 white king; b3 white pawn; f4 white pawn; h4 white queen; c5 white knight; e5 white pawn.


Prompt:
FEN: r1b2rk1/pp1p1pp1/1q3b1p/1N1Bp3/4P3/1Q1P4/Pp3PPP/R4RK1 w - - 0 14
What legal moves does the piece on g2 have?


Prompt:
FEN: r1b1kbnr/ppp1pppp/2n3q1/3P4/Q3P3/2N2N2/PP3PPP/R1B1KB1R w KQkq - 3 9
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 3r4/2R2pb1/4pk1p/6p1/4Q3/3P3P/Pr1q2P1/R6K w - -
List all capture moves available.


Prompt:
Given FEN: rnbqkbnr/ppp2ppp/8/3p4/3p4/P6P/1PP1PPP1/RNBQKBNR w KQkq -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 8/8/8/8/5K1R/3k4/8/8 b - -
Is the move d3g4 legal?

No, illegal. Reason: illegal piece movement or blocked path.


Prompt:
FEN: 1r1q1rk1/p3npBp/1pb1p1p1/3p4/4PP2/2N3P1/PPP3BP/R2Q1RK1 b - - 0 14
List pseudo-legal moves from d5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 2k2b1r/pp4p1/1q1p4/3Qn2p/4N3/8/PPP2PPP/R3R1K1 w - - 2 17
For the piece on f2, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from f2: f2f3 f2f4.
Legal: none.
Rejected: f2f3 pinned_piece_exposes_king; f2f4 pinned_piece_exposes_king.


Prompt:
FEN: 8/6k1/4p3/P2b1q2/8/5P2/5KPP/8 w - - 2 52
For move a5a6, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a5a6.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: 2r2b1r/p1Nbkpp1/4pnq1/2n3Bp/7P/2P5/PP2QPB1/RN2K2R w KQ -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; b1 white knight; e1 white king; h1 white rook; a2 white pawn; b2 white pawn; e2 white queen; f2 white pawn; g2 white bishop; c3 white pawn; h4 white pawn; g5 white bishop; c7 white knight.
Moves by piece:
a1 white rook: no legal moves
b1 white knight: b1a3 b1d2
e1 white king: e1d1 e1d2 e1f1 e1g1
h1 white rook: h1f1 h1g1 h1h2 h1h3
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
e2 white queen: e2a6 e2b5 e2c2 e2c4 e2d1 e2d2 e2d3 e2e3 e2e4 e2e5 e2e6 e2f1 e2f3 e2g4 e2h5
f2 white pawn: f2f3 f2f4
g2 white bishop: g2a8 g2b7 g2c6 g2d5 g2e4 g2f1 g2f3 g2h3
c3 white pawn: c3c4
h4 white pawn: no legal moves
g5 white bishop: g5c1 g5d2 g5e3 g5f4 g5f6 g5h6
c7 white knight: c7a6 c7a8 c7b5 c7d5 c7e6 c7e8
All legal moves: a2a3 a2a4 b1a3 b1d2 b2b3 b2b4 c3c4 c7a6 c7a8 c7b5 c7d5 c7e6 c7e8 e1d1 e1d2 e1f1 e1g1 e2a6 e2b5 e2c2 e2c4 e2d1 e2d2 e2d3 e2e3 e2e4 e2e5 e2e6 e2f1 e2f3 e2g4 e2h5 f2f3 f2f4 g2a8 g2b7 g2c6 g2d5 g2e4 g2f1 g2f3 g2h3 g5c1 g5d2 g5e3 g5f4 g5f6 g5h6 h1f1 h1g1 h1h2 h1h3


Prompt:
FEN: rnbqk1nr/ppp1ppbp/3p2p1/8/3PPB2/8/PPP2PPP/RN1QKBNR w KQkq - 2 4
Walk each ray for the slider on a1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a1 white rook.
Ray N: a2 white pawn: own piece (stop, excluded).
Ray E: b1 white knight: own piece (stop, excluded).
Ray S: edge.
Ray W: edge.
Moves from rays: none


Prompt:
FEN: r5r1/p2b3k/2np3p/4pp2/1P1P2pq/2PB1P1P/P2Q4/2KR2NR b - - 0 23
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 a8b8 a8c8 a8d8 a8e8 a8f8 c6a5 c6b4 c6b8 c6d4 c6d8 c6e7 d6d5 d7c8 d7e6 d7e8 e5d4 e5e4 g4f3 g4g3 g4h3 g8b8 g8c8 g8d8 g8e8 g8f8 g8g5 g8g6 g8g7 g8h8 h4d8 h4e1 h4e7 h4f2 h4f6 h4g3 h4g5 h4h3 h4h5 h6h5 h7g6 h7g7 h7h8


Prompt:
FEN: r4rk1/5pp1/1p2p2n/p1p1R3/2Pp1Pq1/3P3Q/PP5P/5K2 w - - 0 32
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b2b3 b2b4 e5c5 e5d5 e5e1 e5e2 e5e3 e5e4 e5e6 e5f5 e5g5 e5h5 f1e1 f1f2 f4f5 h3e3 h3f3 h3g2 h3g3 h3g4 h3h4 h3h5 h3h6


Prompt:
FEN: r1bqk2r/ppppn2p/6p1/3Bb2Q/3p4/8/PPP2PPP/RN2R1K1 w kq -
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: a1 white rook; b1 white knight; e1 white rook; g1 white king; a2 white pawn; b2 white pawn; c2 white pawn; f2 white pawn; g2 white pawn; h2 white pawn; d5 white bishop; h5 white queen.


Prompt:
FEN: 6k1/3b2b1/4p2p/1p1P4/p2B2Q1/6P1/PPB2N1K/8 b - -
What legal moves does the piece on d7 have?


Prompt:
FEN: r4rk1/pp1n1pp1/1q1b1np1/2pp2B1/3P2P1/2PB3P/PP2NP2/R2Q1RK1 b - -
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: rnbqkb1r/pp3ppp/3p1n2/4p1B1/4P3/2N2N2/PPP2PPP/R2QKB1R b KQkq - 1 7
List all capture moves available.


Prompt:
Given FEN: 4kb1r/1pp2ppp/2q1p3/1p1r4/6Q1/6B1/PPP2PPP/3R1RK1 w k -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r1bq1rk1/ppp2ppp/1bnp1n2/4p3/1P2P3/P1N2N2/2PPBPPP/R1BQ1RK1 w - - 1 8
Is the move b4c1 legal?

No, illegal. Reason: own piece destination.


Prompt:
FEN: rnbq2k1/pp1pnrbp/2p1p1p1/4PpB1/2PP4/2NB1N2/PP3PPP/R2QK2R w KQ - 2 9
List pseudo-legal moves from a1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: rnbq1rk1/ppp1bppp/3p1n2/8/3QPB2/2N2N2/PPP2PPP/R3KB1R w KQ -
For the piece on a1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from a1: a1b1 a1c1 a1d1.
Legal: a1b1 a1c1 a1d1.
Rejected: none.


Prompt:
FEN: 8/2p3pk/8/1R1Rp3/2p5/2P2qP1/1P6/3K4 w - - 2 40
For move b2b3, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: b2b3.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; does_not_resolve_check.


Prompt:
FEN: r1b2rk1/pp3pbp/2p3p1/3pP3/5P2/2P3P1/PP1N2BP/R1B3qK w - -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; c1 white bishop; h1 white king; a2 white pawn; b2 white pawn; d2 white knight; g2 white bishop; h2 white pawn; c3 white pawn; g3 white pawn; f4 white pawn; e5 white pawn.
Moves by piece:
a1 white rook: no legal moves
c1 white bishop: no legal moves
h1 white king: h1g1
a2 white pawn: no legal moves
b2 white pawn: no legal moves
d2 white knight: no legal moves
g2 white bishop: no legal moves
h2 white pawn: no legal moves
c3 white pawn: no legal moves
g3 white pawn: no legal moves
f4 white pawn: no legal moves
e5 white pawn: no legal moves
All legal moves: h1g1


Prompt:
FEN: r7/8/5k2/6Pp/p3K1p1/R7/8/8 b - - 0 55
Walk each ray for the slider on a8: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a8 black rook.
Ray N: edge.
Ray E: b8 empty; c8 empty; d8 empty; e8 empty; f8 empty; g8 empty; h8 empty; edge.
Ray S: a7 empty; a6 empty; a5 empty; a4 black pawn: own piece (stop, excluded).
Ray W: edge.
Moves from rays: a8a5 a8a6 a8a7 a8b8 a8c8 a8d8 a8e8 a8f8 a8g8 a8h8


Prompt:
FEN: 2kr3r/ppqn1ppp/2pb1nb1/3p2B1/3P2P1/2N2N1P/PPPQBP2/2KR3R w - - 3 13
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b2b3 b2b4 c1b1 c3a4 c3b1 c3b5 c3d5 c3e4 d1e1 d1f1 d1g1 d2d3 d2e1 d2e3 d2f4 e2a6 e2b5 e2c4 e2d3 e2f1 f3e1 f3e5 f3g1 f3h2 f3h4 g5e3 g5f4 g5f6 g5h4 g5h6 h1e1 h1f1 h1g1 h1h2 h3h4


Prompt:
FEN: 8/8/8/2Q5/1K6/6p1/4qk2/8 b - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: e2e3 f2e1 f2f1 f2f3 f2g2


Prompt:
FEN: r4r2/pb1P1k1p/8/1pp1p3/4P3/6PB/PP3P1P/2KR3R w - - 1 21
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: c1 white king; d1 white rook; h1 white rook; a2 white pawn; b2 white pawn; f2 white pawn; h2 white pawn; g3 white pawn; h3 white bishop; e4 white pawn; d7 white pawn.


Prompt:
FEN: r1b1k1nr/ppp2ppp/2n5/3q4/3P4/5N2/PP1Q1PPP/RN2KB1R w KQkq -
What legal moves does the piece on f3 have?


Prompt:
FEN: 2kr1b1r/ppp1qppp/2n1p3/3n4/3PN1b1/2P2NP1/PP3PBP/R1B1QRK1 b - - 6 11
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 1k6/6R1/4r1p1/P6p/5P1P/4K1P1/8/8 w - -
List all capture moves available.


Prompt:
Given FEN: 8/6k1/5R2/1pK1Pn2/1P3P1P/8/8/8 w - - 4 53
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 5rnk/2p3bp/p1Pp4/3P1bBq/1P2pN1N/6RP/3Q1P2/4K3 b - -
Is the move h5h7 legal?

No, illegal. Reason: own piece destination.


Prompt:
FEN: r1bqkb1r/pp3p1p/1n3p2/2pPp3/8/P3PQ2/1B1P1PPP/RN2KB1R b KQkq - 0 11
List pseudo-legal moves from c5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: r3k2r/1b1n2p1/p1p1pp2/1p5p/8/P1p5/P3BPPP/R1B2RK1 w kq - 0 17
For the piece on a1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from a1: a1b1.
Legal: a1b1.
Rejected: none.


Prompt:
FEN: r1k5/p1p2p2/2pp3p/4q1r1/4Pp1P/1RP2Q2/P1P2PP1/1R4K1 b - -
For move c8b7, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: c8b7.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; king_would_be_in_check.


Prompt:
FEN: 3q1r1k/rp1nbppp/p3p3/3pP2n/3P4/2NB1P2/PPQB1P1P/2KR3R w - -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: c1 white king; d1 white rook; h1 white rook; a2 white pawn; b2 white pawn; c2 white queen; d2 white bishop; f2 white pawn; h2 white pawn; c3 white knight; d3 white bishop; f3 white pawn; d4 white pawn; e5 white pawn.
Moves by piece:
c1 white king: c1b1
d1 white rook: d1e1 d1f1 d1g1
h1 white rook: h1e1 h1f1 h1g1
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
c2 white queen: c2a4 c2b1 c2b3
d2 white bishop: d2e1 d2e3 d2f4 d2g5 d2h6
f2 white pawn: no legal moves
h2 white pawn: h2h3 h2h4
c3 white knight: c3a4 c3b1 c3b5 c3d5 c3e2 c3e4
d3 white bishop: d3a6 d3b5 d3c4 d3e2 d3e4 d3f1 d3f5 d3g6 d3h7
f3 white pawn: f3f4
d4 white pawn: no legal moves
e5 white pawn: no legal moves
All legal moves: a2a3 a2a4 b2b3 b2b4 c1b1 c2a4 c2b1 c2b3 c3a4 c3b1 c3b5 c3d5 c3e2 c3e4 d1e1 d1f1 d1g1 d2e1 d2e3 d2f4 d2g5 d2h6 d3a6 d3b5 d3c4 d3e2 d3e4 d3f1 d3f5 d3g6 d3h7 f3f4 h1e1 h1f1 h1g1 h2h3 h2h4


Prompt:
FEN: 8/8/8/3R4/3k3p/4N2P/4bPPK/1r1q4 b - -
Walk each ray for the slider on b1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: b1 black rook.
Ray N: b2 empty; b3 empty; b4 empty; b5 empty; b6 empty; b7 empty; b8 empty; edge.
Ray E: c1 empty; d1 black queen: own piece (stop, excluded).
Ray S: edge.
Ray W: a1 empty; edge.
Moves from rays: b1a1 b1b2 b1b3 b1b4 b1b5 b1b6 b1b7 b1b8 b1c1


Prompt:
FEN: rnbq1rk1/pppp1pb1/7p/3pP1p1/8/3P1N1Q/PPP2PPP/RNB1K2R w KQ - 0 12
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b1a3 b1c3 b1d2 b2b3 b2b4 c1d2 c1e3 c1f4 c1g5 c2c3 c2c4 d3d4 e1d1 e1d2 e1e2 e1f1 e1g1 e5e6 f3d2 f3d4 f3g1 f3g5 f3h4 g2g3 g2g4 h1f1 h1g1 h3d7 h3e6 h3f5 h3g3 h3g4 h3h4 h3h5 h3h6


Prompt:
FEN: r1b4r/ppp3k1/3p4/4qp2/6p1/P5pP/4N1P1/5K2 b - - 1 30
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 a8b8 b7b5 b7b6 c7c5 c7c6 c8d7 c8e6 d6d5 e5a1 e5a5 e5b2 e5b5 e5c3 e5c5 e5d4 e5d5 e5e2 e5e3 e5e4 e5e6 e5e7 e5e8 e5f4 e5f6 f5f4 g4h3 g7f6 g7f7 g7f8 g7g6 g7g8 g7h6 g7h7 h8d8 h8e8 h8f8 h8g8 h8h3 h8h4 h8h5 h8h6 h8h7


Prompt:
FEN: 5qk1/p1pn3p/6pb/4p2n/3pP3/PP1P2Pb/1BPNN3/R2Q2K1 w - - 2 18
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: a1 white rook; d1 white queen; g1 white king; b2 white bishop; c2 white pawn; d2 white knight; e2 white knight; a3 white pawn; b3 white pawn; d3 white pawn; g3 white pawn; e4 white pawn.


Prompt:
FEN: rnbqk2r/pp3ppp/3b1n2/3p4/3Pp3/6PN/PP2PPBP/RNBQ1RK1 w kq -
What legal moves does the piece on g1 have?


Prompt:
FEN: 1r5k/pr3p1p/6pb/3Nnp2/3P4/4P2P/P4PP1/2R2RK1 b - - 5 21
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: B4rk1/p1q1bppp/1p2p3/4P3/Q7/8/PP3PPP/R4RK1 b - - 0 17
List all capture moves available.


Prompt:
Given FEN: 4q3/ppk3pp/1n6/5p2/3p4/5n1P/PPP5/1K1R3Q w - - 0 34
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 2r1qrk1/p1pp3p/1p3b2/3P2p1/3pP3/1P4PP/P4PB1/2RQ1RK1 w - -
Is the move d4b1 legal?


Prompt:
FEN: 1n1qk3/N1p2p2/7b/4p3/4Q1pp/7P/PPP2PPB/1K6 b - - 1 26
List pseudo-legal moves from g4.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 5r1k/pp5p/2n3p1/2P4n/4Q3/1NP3qP/PP2P1B1/R6K b - -
For the piece on g3, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from g3: g3b8 g3c3 g3c7 g3d3 g3d6 g3e1 g3e3 g3e5 g3f2 g3f3 g3f4 g3g2 g3g4 g3g5 g3h2 g3h3 g3h4.
Legal: g3b8 g3c3 g3c7 g3d3 g3d6 g3e1 g3e3 g3e5 g3f2 g3f3 g3f4 g3g2 g3g4 g3g5 g3h2 g3h3 g3h4.
Rejected: none.


Prompt:
FEN: 1R5R/4qp2/p3p1pk/8/3p4/5P2/5K2/8 b - - 1 50
For move a6a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a6a5.
Pseudo-legal: yes.
King safe after move: no.
Final: illegal; does_not_resolve_check.


Prompt:
FEN: r2qk2r/pp3pp1/1np1pbp1/8/3P1P1P/3QN1P1/PPP1B3/R3K2R w KQkq - 3 17
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: a1 white rook; e1 white king; h1 white rook; a2 white pawn; b2 white pawn; c2 white pawn; e2 white bishop; d3 white queen; e3 white knight; g3 white pawn; d4 white pawn; f4 white pawn; h4 white pawn.
Moves by piece:
a1 white rook: a1b1 a1c1 a1d1
e1 white king: e1c1 e1d1 e1d2 e1f1 e1f2 e1g1
h1 white rook: h1f1 h1g1 h1h2 h1h3
a2 white pawn: a2a3 a2a4
b2 white pawn: b2b3 b2b4
c2 white pawn: c2c3 c2c4
e2 white bishop: e2d1 e2f1 e2f3 e2g4 e2h5
d3 white queen: d3a3 d3a6 d3b3 d3b5 d3c3 d3c4 d3d1 d3d2 d3e4 d3f5 d3g6
e3 white knight: e3c4 e3d1 e3d5 e3f1 e3f5 e3g2 e3g4
g3 white pawn: g3g4
d4 white pawn: d4d5
f4 white pawn: f4f5
h4 white pawn: h4h5
All legal moves: a1b1 a1c1 a1d1 a2a3 a2a4 b2b3 b2b4 c2c3 c2c4 d3a3 d3a6 d3b3 d3b5 d3c3 d3c4 d3d1 d3d2 d3e4 d3f5 d3g6 d4d5 e1c1 e1d1 e1d2 e1f1 e1f2 e1g1 e2d1 e2f1 e2f3 e2g4 e2h5 e3c4 e3d1 e3d5 e3f1 e3f5 e3g2 e3g4 f4f5 g3g4 h1f1 h1g1 h1h2 h1h3 h4h5


Prompt:
FEN: r4rk1/pp1bqpp1/7p/3pp3/3P4/2P1P2P/P1PQB1P1/R4RK1 w - -
Walk each ray for the slider on a1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a1 white rook.
Ray N: a2 white pawn: own piece (stop, excluded).
Ray E: b1 empty; c1 empty; d1 empty; e1 empty; f1 white rook: own piece (stop, excluded).
Ray S: edge.
Ray W: edge.
Moves from rays: a1b1 a1c1 a1d1 a1e1


Prompt:
FEN: r4rk1/2p1qppp/p1p1bn2/8/3P4/2B2N2/PPP2PPP/R2QR1K1 b - - 1 12
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a6a5 a8a7 a8b8 a8c8 a8d8 a8e8 c6c5 e6a2 e6b3 e6c4 e6c8 e6d5 e6d7 e6f5 e6g4 e6h3 e7a3 e7b4 e7c5 e7d6 e7d7 e7d8 e7e8 f6d5 f6d7 f6e4 f6e8 f6g4 f6h5 f8b8 f8c8 f8d8 f8e8 g7g5 g7g6 g8h8 h7h5 h7h6


Prompt:
FEN: r1bqr1k1/pp1nbppp/2pp1n2/3Pp3/2P1P3/2N1BN2/PP2BPPP/R2Q1RK1 b - -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 a8b8 b7b5 b7b6 c6c5 c6d5 d7b6 d7b8 d7c5 d7f8 d8a5 d8b6 d8c7 e7f8 e8f8 f6d5 f6e4 f6g4 f6h5 g7g5 g7g6 g8f8 g8h8 h7h5 h7h6


Prompt:
FEN: r1b1k2r/ppp1qpb1/2n3p1/2np3p/1P1P4/P3PN1P/1B2BPP1/R2QK2R w KQkq - 0 14
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: a1 white rook; d1 white queen; e1 white king; h1 white rook; b2 white bishop; e2 white bishop; f2 white pawn; g2 white pawn; a3 white pawn; e3 white pawn; f3 white knight; h3 white pawn; b4 white pawn; d4 white pawn.


Prompt:
FEN: 2b5/2p3pk/3NNnqp/1p1Pp3/4r3/1P1QB1PP/6K1/5R2 b - -
What legal moves does the piece on g6 have?


Prompt:
FEN: r1bqkbnr/1p1ppppp/p1n5/2p5/B3P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 1 4
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: r1bqk2r/pp3ppp/2nbpn2/2pP4/8/1P2PN2/PB1PBPPP/RN1QK2R b KQkq -
List all capture moves available.


Prompt:
Given FEN: 8/8/8/8/5K2/4N2k/4B3/8 b - -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r6r/3n3p/3P1p1P/p3k3/P1p1p1P1/1p2P3/1PB2P2/R4RK1 w - - 0 27
Is the move g1h2 legal?


Prompt:
FEN: r1b1k1nr/pppp1ppp/1bn2q2/4p3/1PB1P3/P4N2/2PP1PPP/RNBQK2R w KQkq - 1 6
List pseudo-legal moves from a1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: r3k2r/pppb1p1p/1q1p3B/1N1P4/3pP3/7P/PP3PP1/R2QKB1R w KQkq - 1 13
For the piece on a1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from a1: a1b1 a1c1.
Legal: a1b1 a1c1.
Rejected: none.


Prompt:
FEN: rn1q1rk1/pp2bpp1/2p1bn1p/3p4/3P3B/2NBP3/PPQ2PPP/R3K1NR w KQ -
For move a1b1, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a1b1.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: 1r1q3r/pRNnkpbp/8/2p2Qp1/8/3PP1P1/P1PB2BP/6K1 w - -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: g1 white king; a2 white pawn; c2 white pawn; d2 white bishop; g2 white bishop; h2 white pawn; d3 white pawn; e3 white pawn; g3 white pawn; f5 white queen; b7 white rook; c7 white knight.
Moves by piece:
g1 white king: g1f1 g1f2 g1h1
a2 white pawn: a2a3 a2a4
c2 white pawn: c2c3 c2c4
d2 white bishop: d2a5 d2b4 d2c1 d2c3 d2e1
g2 white bishop: g2c6 g2d5 g2e4 g2f1 g2f3 g2h1 g2h3
h2 white pawn: h2h3 h2h4
d3 white pawn: d3d4
e3 white pawn: e3e4
g3 white pawn: g3g4
f5 white queen: f5c5 f5d5 f5d7 f5e4 f5e5 f5e6 f5f1 f5f2 f5f3 f5f4 f5f6 f5f7 f5g4 f5g5 f5g6 f5h3 f5h7
b7 white rook: b7a7 b7b1 b7b2 b7b3 b7b4 b7b5 b7b6 b7b8
c7 white knight: c7a6 c7a8 c7b5 c7d5 c7e6 c7e8
All legal moves: a2a3 a2a4 b7a7 b7b1 b7b2 b7b3 b7b4 b7b5 b7b6 b7b8 c2c3 c2c4 c7a6 c7a8 c7b5 c7d5 c7e6 c7e8 d2a5 d2b4 d2c1 d2c3 d2e1 d3d4 e3e4 f5c5 f5d5 f5d7 f5e4 f5e5 f5e6 f5f1 f5f2 f5f3 f5f4 f5f6 f5f7 f5g4 f5g5 f5g6 f5h3 f5h7 g1f1 g1f2 g1h1 g2c6 g2d5 g2e4 g2f1 g2f3 g2h1 g2h3 g3g4 h2h3 h2h4


Prompt:
FEN: 3r1rk1/p3bpp1/2p1q2p/2n5/4P3/2N2RB1/PPP1Q1PP/5RK1 w - - 7 21
Walk each ray for the slider on f1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: f1 white rook.
Ray N: f2 empty; f3 white rook: own piece (stop, excluded).
Ray E: g1 white king: own piece (stop, excluded).
Ray S: edge.
Ray W: e1 empty; d1 empty; c1 empty; b1 empty; a1 empty; edge.
Moves from rays: f1a1 f1b1 f1c1 f1d1 f1e1 f1f2


Prompt:
FEN: rn1qkb1r/ppp1pppp/7n/8/2P1P3/8/PP1Pb1PP/RNBQK1NR w KQkq - 0 6
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: a2a3 a2a4 b1a3 b1c3 b2b3 b2b4 c4c5 d1a4 d1b3 d1c2 d1e2 d2d3 d2d4 e1e2 e1f2 e4e5 g1e2 g1f3 g1h3 g2g3 g2g4 h2h3 h2h4


Prompt:
FEN: rnbqkb1r/pppp2p1/5n1p/5p2/2PPp2P/2N4N/PP2PPP1/R1BQKB1R b KQkq -
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 b7b5 b7b6 b8a6 b8c6 c7c5 c7c6 d7d5 d7d6 d8e7 e4e3 e8e7 e8f7 f5f4 f6d5 f6g4 f6g8 f6h5 f6h7 f8a3 f8b4 f8c5 f8d6 f8e7 g7g5 g7g6 h6h5 h8g8 h8h7


Prompt:
FEN: 6k1/2r2pp1/5q1p/1p6/2N5/1P2Q3/4bPPR/2q3K1 w - -
List the side-to-move pieces and their squares.

Side to move: white.
Pieces: g1 white king; f2 white pawn; g2 white pawn; h2 white rook; b3 white pawn; e3 white queen; c4 white knight.


Prompt:
FEN: 8/2p2k1p/5pp1/1p1P1P2/7P/p1P5/7r/1K6 w - - 0 44
What legal moves does the piece on h4 have?


Prompt:
FEN: 1r2k1nr/p1pp1p2/1p2p1p1/n3P3/3P2P1/2b5/P3N2q/RNBQKR2 w k - 0 16
Detect the game state: check, checkmate, stalemate, or none.


Prompt:
FEN: 8/k7/3Q4/8/8/8/8/7K w - -
List all capture moves available.


Prompt:
Given FEN: 3R4/2p1k1pp/p4p2/1p6/n3P3/P1P1N2P/1r3PPK/8 w - -
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: 3b4/p2P4/P1K5/8/8/8/6k1/8 w - - 4 66
Is the move c6b5 legal?


Prompt:
FEN: rn1q1rk1/pp1b2pp/2p1p3/3p1p2/3P1P1b/1PPBP2P/PBQN4/R1K3Nn w - - 0 16
List pseudo-legal moves from a1.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 8/2B5/8/8/6k1/3B4/3K4/8 w - -
For the piece on d2, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from d2: d2c1 d2c2 d2c3 d2d1 d2e1 d2e2 d2e3.
Legal: d2c1 d2c2 d2c3 d2d1 d2e1 d2e2 d2e3.
Rejected: none.


Prompt:
FEN: r2q1rk1/1b2bppp/p3pn2/8/1p1N4/2BBP3/PPQ2PPP/R4RK1 w - -
For move a1b1, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a1b1.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: 8/4k3/8/1N1K4/8/8/8/1B6 b - -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: e7 black king.
Moves by piece:
e7 black king: e7d7 e7d8 e7e8 e7f6 e7f7 e7f8
All legal moves: e7d7 e7d8 e7e8 e7f6 e7f7 e7f8


Prompt:
FEN: r2r2k1/p2b2pp/4p2q/1p1pPp2/5P2/Q1P1P3/P4PBP/3R2RK w - -
Walk each ray for the slider on d1: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: d1 white rook.
Ray N: d2 empty; d3 empty; d4 empty; d5 black pawn: capture (stop, included).
Ray E: e1 empty; f1 empty; g1 white rook: own piece (stop, excluded).
Ray S: edge.
Ray W: c1 empty; b1 empty; a1 empty; edge.
Moves from rays: d1a1 d1b1 d1c1 d1d2 d1d3 d1d4 d1d5 d1e1 d1f1


Prompt:
FEN: 5rk1/1p4pp/2pp4/5p2/3p4/2BP1Q1P/5PPK/2q5 b - - 1 23
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: b7b5 b7b6 c1a1 c1a3 c1b1 c1b2 c1c2 c1c3 c1d1 c1d2 c1e1 c1e3 c1f1 c1f4 c1g1 c1g5 c1h1 c1h6 c6c5 d4c3 d6d5 f5f4 f8a8 f8b8 f8c8 f8d8 f8e8 f8f6 f8f7 g7g5 g7g6 g8f7 g8h8 h7h5 h7h6


Prompt:
FEN: 1r4k1/5pp1/4p2p/3pP3/1p1P4/r5P1/2K1NP1P/1R6 w - - 0 35
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: white.
Legal moves: b1a1 b1b2 b1b3 b1b4 b1c1 b1d1 b1e1 b1f1 b1g1 b1h1 c2b2 c2c1 c2d1 c2d2 e2c1 e2c3 e2f4 e2g1 f2f3 f2f4 g3g4 h2h3 h2h4


Prompt:
FEN: 1rbqk2r/1p1p1p1p/p3pb2/4np2/2PN4/1PN1P2P/P3BPP1/R2QK2R b KQk - 0 13
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: e5 black knight; f5 black pawn; a6 black pawn; e6 black pawn; f6 black bishop; b7 black pawn; d7 black pawn; f7 black pawn; h7 black pawn; b8 black rook; c8 black bishop; d8 black queen; e8 black king; h8 black rook.


Prompt:
FEN: r1bq1rk1/pp2bpp1/2np1n1p/2p1p3/2P1P3/2NP1NBP/PP3PP1/R2QKB1R b KQ - 2 9
What legal moves does the piece on f6 have?


Prompt:
FEN: rn1q1rk1/ppp1bppp/4bn2/3p2B1/3P4/2N2N2/PPP1QPPP/2KR1B1R b - - 9 8
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 6B1/8/2k5/5p2/pK3P2/P4bP1/1P6/8 w - -
List all capture moves available.


Prompt:
Given FEN: 6k1/6p1/6p1/p7/7Q/2q2R1P/P5P1/6K1 b - - 3 39
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: r1bqkbnr/pp1n1ppp/2p5/3pN3/3PP3/2N5/PPP2PPP/R1BQKB1R b KQkq - 0 6
Is the move h4a3 legal?


Prompt:
FEN: rnb1k1r1/pp2np1Q/4p3/3pq3/7P/P1p5/2P1NPP1/1RB1KB1R b Kq -
List pseudo-legal moves from d5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".


Prompt:
FEN: 1k2K3/1P6/2q1P3/3p4/3P4/8/8/8 w - - 0 67
For the piece on e6, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from e6: e6e7.
Legal: none.
Rejected: e6e7 does_not_resolve_check.


Prompt:
FEN: r4rk1/pp2Rpbp/6p1/8/Q4B2/3q3P/P4PP1/4R1K1 b - -
For move a7a5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: a7a5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: 8/8/8/3k4/6R1/4K2R/8/8 w - -
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: white.
Pieces: e3 white king; h3 white rook; g4 white rook.
Moves by piece:
e3 white king: e3d2 e3d3 e3e2 e3f2 e3f3 e3f4
h3 white rook: h3f3 h3g3 h3h1 h3h2 h3h4 h3h5 h3h6 h3h7 h3h8
g4 white rook: g4a4 g4b4 g4c4 g4d4 g4e4 g4f4 g4g1 g4g2 g4g3 g4g5 g4g6 g4g7 g4g8 g4h4
All legal moves: e3d2 e3d3 e3e2 e3f2 e3f3 e3f4 g4a4 g4b4 g4c4 g4d4 g4e4 g4f4 g4g1 g4g2 g4g3 g4g5 g4g6 g4g7 g4g8 g4h4 h3f3 h3g3 h3h1 h3h2 h3h4 h3h5 h3h6 h3h7 h3h8


Prompt:
FEN: 2r5/4k1pp/b2bpn2/pBp5/8/2N5/PPP2PPP/R1B1R1K1 b - - 3 18
Walk each ray for the slider on a6: list every square until a blocker, capture, or the board edge, then list the resulting moves.

Answer format: return a "Piece:" line, one "Ray <direction>:" line per ray in the listed order, and a final "Moves from rays:" line with space-separated UCI moves or "none".

Piece: a6 black bishop.
Ray NE: b7 empty; c8 black rook: own piece (stop, excluded).
Ray SE: b5 white bishop: capture (stop, included).
Ray SW: edge.
Ray NW: edge.
Moves from rays: a6b5 a6b7


Prompt:
FEN: 8/7p/p5pk/1p6/1r3P2/6PK/P4P2/8 w - - 0 39
For every side-to-move piece, list pseudo-legal moves, reject illegal ones with reasons, then give all legal moves.

Answer format: include "Side to move:", "Pieces:", "Filter by piece:", one line per side-to-move piece with "pseudo-legal ... | rejected ... | legal ..." fields, and "All legal moves:".

Side to move: white.
Pieces: a2 white pawn; f2 white pawn; g3 white pawn; h3 white king; f4 white pawn.
Filter by piece:
a2 white pawn: pseudo-legal a2a3 a2a4 | rejected none | legal a2a3 a2a4
f2 white pawn: pseudo-legal f2f3 | rejected none | legal f2f3
g3 white pawn: pseudo-legal g3g4 | rejected none | legal g3g4
h3 white king: pseudo-legal h3g2 h3g4 h3h2 h3h4 | rejected none | legal h3g2 h3g4 h3h2 h3h4
f4 white pawn: pseudo-legal f4f5 | rejected none | legal f4f5
All legal moves: a2a3 a2a4 f2f3 f4f5 g3g4 h3g2 h3g4 h3h2 h3h4


Prompt:
FEN: 2kr1b1r/ppp1q1pp/3p1n2/4p3/4P3/PnNP4/1PP2PPP/R1BQ1RK1 b - - 0 11
List all legal moves.

Answer format: return exactly two lines: "Side to move: <white|black>." then "Legal moves: <space-separated UCI moves>".

Side to move: black.
Legal moves: a7a5 a7a6 b3a1 b3a5 b3c1 b3c5 b3d2 b3d4 b7b5 b7b6 c7c5 c7c6 c8b8 c8d7 d6d5 d8d7 d8e8 e7d7 e7e6 e7e8 e7f7 f6d5 f6d7 f6e4 f6e8 f6g4 f6g8 f6h5 g7g5 g7g6 h7h5 h7h6 h8g8


Prompt:
FEN: r1b2rk1/1pb1nppp/p2p4/Pq2p3/3PP3/1P2NN2/3B1PPP/R2QR1K1 b - -
List the side-to-move pieces and their squares.

Side to move: black.
Pieces: b5 black queen; e5 black pawn; a6 black pawn; d6 black pawn; b7 black pawn; c7 black bishop; e7 black knight; f7 black pawn; g7 black pawn; h7 black pawn; a8 black rook; c8 black bishop; f8 black rook; g8 black king.


Prompt:
FEN: r1bqr1k1/1p1nbpp1/p4n1p/2pp4/1P1P3B/P1NBPN2/5PPP/R2Q1RK1 b - - 0 12
What legal moves does the piece on f6 have?


Prompt:
FEN: 2rq1rk1/5ppp/Q4b2/1p3P2/3p4/1B6/P1P2PPP/1R2R1K1 b - -
Detect the game state: check, checkmate, stalemate, or none.

Normal position -- no check, checkmate, or stalemate.


Prompt:
FEN: 5n2/1b3k1p/p2p2p1/3Pp1B1/B1P3P1/6PP/8/6K1 w - -
List all capture moves available.


Prompt:
Given FEN: 8/7p/4q3/6k1/8/6K1/8/8 b - - 8 62
List any special moves available (castling, en passant, promotion).


Prompt:
FEN: rnb2rk1/1p2bppp/2pp1n2/p7/P3PP2/2NBBN2/1qP1Q1PP/R3K2R w KQ -
Is the move c8b6 legal?


Prompt:
FEN: r2qkb1r/ppp1pp1p/2n1b1p1/3n2B1/3P4/P3PN2/1P3PPP/RN1QKB1R b KQkq - 0 7
List pseudo-legal moves from d5.

Answer format: return exactly "Pseudo-legal moves from <square>: <space-separated UCI moves>".

Pseudo-legal moves from d5: d5b4 d5b6 d5c3 d5e3 d5f4 d5f6


Prompt:
FEN: r1bqk2r/pppp2pp/2n5/1Bb1pp2/8/3P1N2/PPP2KPP/RNBQR3 w kq - 1 8
For the piece on b1, split pseudo-legal moves into legal and rejected moves with rejection reasons.

Answer format: return exactly three lines starting "Pseudo-legal from", "Legal:", and "Rejected:". Rejected entries must be "<uci> <reason_label>" separated by semicolons, or "none" when no moves are rejected.

Pseudo-legal from b1: b1a3 b1c3 b1d2.
Legal: none.
Rejected: b1a3 does_not_resolve_check; b1c3 does_not_resolve_check; b1d2 does_not_resolve_check.


Prompt:
FEN: 8/8/2K5/8/8/5k2/8/4R3 w - -
For move c6b5, decide whether king safety allows it.

Answer format: return exactly four lines starting "Move:", "Pseudo-legal:", "King safe after move:", and "Final:".

Move: c6b5.
Pseudo-legal: yes.
King safe after move: yes.
Final: legal; legal.


Prompt:
FEN: rnq1k2r/p5pp/2p1pnb1/5p2/B1Q1pP2/B1P3N1/P1P3PP/R3K2R b KQkq - 3 15
Group all legal moves by side-to-move piece.

Answer format: include "Side to move:", "Pieces:", "Moves by piece:", one line per side-to-move piece, and "All legal moves:".

Side to move: black.
Pieces: e4 black pawn; f5 black pawn; c6 black pawn; e6 black pawn; f6 black knight; g6 black bishop; a7 black pawn; g7 black pawn; h7 black pawn; a8 black rook; b8 black knight; c8 black queen; e8 black king; h8 black rook.
Moves by piece:
e4 black pawn: e4e3
f5 black pawn: no legal moves
c6 black pawn: no legal moves
e6 black pawn: e6e5
f6 black knight: f6d5 f6d7 f6g4 f6g8 f6h5
g6 black bishop: g6f7 g6h5
a7 black pawn: a7a5 a7a6
g7 black pawn: no legal moves
h7 black pawn: h7h5 h7h6
a8 black rook: no legal moves
b8 black knight: b8a6 b8d7
c8 black queen: c8a6 c8b7 c8c7 c8d7 c8d8
e8 black king: e8d7 e8d8 e8f7
h8 black rook: h8f8 h8g8
All legal moves: a7a5 a7a6 b8a6 b8d7 c8a6 c8b7 c8c7 c8d7 c8d8 e4e3 e6e5 e8d7 e8d8 e8f7 f6d5 f6d7 f6g4 f6g8 f6h5 g6f7 g6h5 h7h5 h7h6 h8f8 h8g8