games.monopoly.main_agent¶
Fixed Main Monopoly agent that orchestrates the complete game.
- This module provides the corrected main agent implementation that:
Ensures BaseModel consistency throughout (no dict conversions)
Properly handles state schema compatibility
Fixes the validation error by maintaining BaseModel state
Classes¶
Main Monopoly agent that orchestrates the complete game. |
Module Contents¶
- class games.monopoly.main_agent.MonopolyAgent(config)¶
Bases:
haive.core.engine.agent.agent.Agent
[haive.games.monopoly.game_agent.MonopolyGameAgentConfig
]Main Monopoly agent that orchestrates the complete game.
- This agent combines:
Game rule enforcement and turn management
Player decision delegation to subgraphs
Complete game state management
Game end detection and winner determination
Initialize the monopoly agent.
- Parameters:
config (haive.games.monopoly.game_agent.MonopolyGameAgentConfig)
- get_game_summary()¶
Get a summary of the game configuration and status.
- save_game_history(filename=None)¶
Save game history to a file.
- Parameters:
filename (str | None)
- Return type:
None
- setup_workflow()¶
Set up the complete monopoly workflow.
This creates the main game workflow nodes and connects them properly.
- Return type:
None
- start_game()¶
Start a new monopoly game.
CRITICAL: Keep everything as BaseModel - no dict conversions!
- Returns:
Final game state as MonopolyState BaseModel
- Return type:
haive.games.monopoly.state.MonopolyState