{"data":{"kind":"file","path":"README.md","version_id":"qagt3c6rajwku1ytw7lzasij","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2056,"modified_at":"2026-08-05T00:44:19.043000","content_hash":"8895db2d3b96999b9c7e55368beab0d22730212f5a8511c7ec50d6b89053444d"},"entries":[],"content":"# Connect Four / Tic-Tac-Toe Advanced\n\nAn advanced strategy game environment for evaluating LLM reasoning capabilities through classic board games.\n\n## Overview\n\nThis environment tests an LLM's ability to:\n\n- **Analyze board states** in Tic-Tac-Toe (3x3) and Connect Four (7x6)\n- **Plan strategic moves** including blocking, forking, and winning sequences\n- **Reason about opponent threats** and defensive positioning\n- **Follow output format** instructions precisely\n- **Play multi-turn games** against a minimax/heuristic AI opponent\n\n## Games Supported\n\n### Tic-Tac-Toe (3x3)\n- Classic game with full minimax AI opponent\n- Tests: center control, corner strategy, blocking, fork creation\n\n### Connect Four (7x6)\n- Gravity-based drop mechanics\n- Tests: vertical/horizontal/diagonal threat detection, center column control\n\n### Mixed Mode\n- Alternates between both games for diverse evaluation\n\n## Reward Functions\n\n| Function | Weight | Description |\n|----------|--------|-------------|\n| `move_validity_reward` | 0.35 | Validates the move is parseable and in bounds |\n| `strategic_reasoning_reward` | 0.30 | Rewards explanation of strategic thinking |\n| `optimal_move_reward` | 0.20 | Checks alignment with expected strategic reasoning |\n| `game_format_reward` | 0.15 | Checks output format compliance |\n\n## Configuration\n\n```python\nload_environment(\n    game_type=\"mixed\",       # \"tic_tac_toe\", \"connect_four\", \"mixed\"\n    num_games=20,            # number of game scenarios\n    difficulty=\"medium\",     # \"easy\", \"medium\", \"hard\"\n    multi_turn=False,        # True for interactive play against AI\n)\n```\n\n## Multi-Turn Mode\n\nWhen `multi_turn=True`, the environment becomes interactive:\n- Model makes a move\n- AI opponent responds with a counter-move\n- Game continues for up to 6 turns\n- Uses minimax (Tic-Tac-Toe) and heuristic (Connect Four) AI\n\n## Use Cases\n\n- Evaluating strategic reasoning in LLMs\n- Testing game-theoretic decision making\n- Benchmarking planning and lookahead capabilities\n- Multi-turn interaction and adaptation\n\n## License\n\nMIT\n","encoding":"utf-8","truncated":false,"total_bytes":2056},"status":null}