Spaces:
Configuration error
Configuration error
| # π€ AI Agent Architecture | |
| **Date:** December 23, 2025 | |
| **Status:** π In Planning | |
| ## π― Goal | |
| Build an LLM-based AI agent that can play Settlers of Catan autonomously and intelligently. | |
| ## ποΈ Overall Architecture | |
| ``` | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| β GameManager β | |
| β (Game coordination & decisions) β | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ | |
| β β’ game_loop() - Main game loop β | |
| β β’ handle_turn_rules() - Turn management β | |
| β β’ coordinate_interactions() - Player coordination β | |
| ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ | |
| β | |
| ββββββββββββββΌβββββββββββββ | |
| β β β | |
| βΌ βΌ βΌ | |
| βββββββββββ βββββββββββ βββββββββββ | |
| β Game β β Users β β Viz β | |
| β (Core) β β(Players)β β(Display)β | |
| βββββββββββ ββββββ¬βββββ βββββββββββ | |
| β | |
| ββββββββ΄βββββββ | |
| β β | |
| βΌ βΌ | |
| ββββββββββββ ββββββββββββ | |
| β Human β β AI Agent β β NEW! | |
| β User β β (LLM) β | |
| ββββββββββββ ββββββββββββ | |
| β π§ | |
| ``` | |
| ## π¦ Existing Components | |
| ### 1οΈβ£ Core - The Game (game.py) | |
| **What exists:** | |
| - Complete and tested game rules | |
| - Board, player, and resource management | |
| - Action validation | |
| **Status:** β Ready and stable | |
| ### 2οΈβ£ GameManager - Game Manager (management/game_manager.py) | |
| **What exists:** | |
| - Turn and phase management | |
| - Player coordination | |
| - Rule enforcement | |
| **Status:** β Ready and stable | |
| ### 3οΈβ£ Actions - Action System (management/actions.py) | |
| **What exists:** | |
| - Definition of all possible game actions | |
| - Unified data structure for each action | |
| - Validation and permissions | |
| **Example:** | |
| ```python | |
| class Action: | |
| def __init__(self, action_type, player_num, **kwargs): | |
| self.action_type = action_type # BUILD_SETTLEMENT, BUILD_ROAD, etc. | |
| self.player_num = player_num | |
| self.details = kwargs # point, edge, resources, etc. | |
| ``` | |
| **Status:** β Ready and stable | |
| ### 4οΈβ£ HumanUser - Human User (players/human_user.py) | |
| **What exists:** | |
| - CLI interaction | |
| - Getting decisions from user | |
| - Executing actions through GameManager | |
| **Status:** β Ready and tested | |