|
Download chess/chess-0084.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/chess/chess-0084.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm/chess/chess-0084.jsonl
-
curl -L -o chess-0084.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/chess/chess-0084.jsonl
1.48 kB
| {"type": "session", "harness": "opencode", "id": "chess-0084", "name": "Chess Move Generation"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert chess programmer."}} | |
| {"type": "message", "message": {"role": "user", "content": "Explain chess move generation algorithms"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Move generation produces all legal moves from a position. Must be 100% correct.\n\nPseudo-legal generation: generate all moves that follow piece movement rules, then filter illegal ones (leaving king in check).\n\nPiece moves:\n- Pawn: single push, double push from rank 2/7, captures diagonally, en passant, promotion.\n- Knight: 8 possible squares from lookup table.\n- Bishop: sliding along diagonals (ray attacks).\n- Rook: sliding along ranks/files.\n- Queen: bishop + rook.\n- King: 8 adjacent squares, castling.\n\nBitboard approach: precompute attack tables for each piece type on each square. Knight attacks[sq] = precomputed bitmask. Sliding attacks: use magic bitboards for occupancy-dependent lookups.\n\nMagic bitboards: for sliding pieces, hash occupancy pattern to get attacks in O(1). Precompute 2^N entries for each relevant occupancy subset.\n\nLegality filtering: after generating pseudo-legal moves, make the move, check if own king is attacked. If yes, illegal.\n\nMove ordering: generate captures first (MVV-LVA), then killers, then history heuristic. Critical for alpha-beta performance."}} | |