{"data":{"kind":"file","path":"README.md","version_id":"ujvkvo38p9sz69yfqxfczw4x","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":1847,"modified_at":"2026-08-09T04:55:50.653000","content_hash":"30c6cd1165faa98384e8f3af17c14124fe56c736f4b6a45ec6f57b1cad338d8e"},"entries":[],"content":"# Lights Out Puzzle Agent\n\nA multi-turn environment where an AI agent solves **Lights Out** puzzles by toggling grid cells to turn all lights off.\n\n## What is Lights Out?\n\nLights Out is a classic logic puzzle played on an N×N grid. Each cell is either ON or OFF. When you toggle a cell, it flips that cell AND its four orthogonal neighbors (up, down, left, right). The goal is to turn ALL cells OFF.\n\n## Environment Design\n\n- **Multi-turn**: Agent makes one move per turn, environment responds with updated board\n- **Grid sizes**: 3×3, 4×4, or 5×5 (configurable)\n- **All puzzles are solvable** (generated by applying random moves to a blank grid)\n- **Max turns**: 20 (configurable)\n\n## Reward Functions\n\n| Function | Weight | Description |\n|----------|--------|-------------|\n| `check_solved` | 0.60 | Did the agent turn all lights off? |\n| `check_move_quality` | 0.25 | Move efficiency (fewer moves = higher score) |\n| `check_reasoning` | 0.15 | Quality of step-by-step reasoning |\n\n## Configuration\n\n```python\nimport verifiers as vf\n\nenv = vf.load_environment(\"OWNER/lights-out-puzzle-agent\", num_examples=20, max_turns=20)\n```\n\n### Parameters\n\n- `num_examples` (int, default=20): Number of puzzles in dataset\n- `max_turns` (int, default=20): Maximum turns per puzzle\n- `min_size` (int, default=3): Minimum grid size\n- `max_size` (int, default=5): Maximum grid size\n\n## Example Interaction\n\n```\nAgent: I see the grid has 5 lights on. Let me analyze...\n       Toggling (1,1) will flip the center and its neighbors.\n       1 1\n\nEnv:   You toggled (1,1). (3 lights remaining)\n       ...\n       Type your next move as: row col\n\nAgent: Now I'll toggle (0,2) to clear the top-right.\n       0 2\n\nEnv:   You toggled (0,2).\n       ...\n       ALL LIGHTS ARE OFF! Puzzle solved!\n```\n\n## Tags\n\n`puzzle` `reasoning` `multi-turn` `planning` `grid-puzzle`\n","encoding":"utf-8","truncated":false,"total_bytes":1847},"status":null}