haive.games.monopoly.player_agent ================================= .. py:module:: haive.games.monopoly.player_agent .. autoapi-nested-parse:: Monopoly player agent implementation. This module provides the player agent (subgraph) for making individual player decisions in Monopoly, including: - Property purchase decisions - Jail decisions - Building decisions - Trade negotiations Classes ------- .. autoapisummary:: haive.games.monopoly.player_agent.MonopolyGameAgentConfig haive.games.monopoly.player_agent.MonopolyPlayerAgent haive.games.monopoly.player_agent.MonopolyPlayerAgentConfig haive.games.monopoly.player_agent.PlayerDecisionState Module Contents --------------- .. py:class:: MonopolyGameAgentConfig Bases: :py:obj:`haive.core.engine.agent.config.AgentConfig` Configuration class for monopoly game agents. This class defines the configuration parameters for monopoly agents, including: - Game settings (players, turn limits) - Player decision configurations - Board and game state initialization .. attribute:: state_schema The state schema for the game :type: type .. attribute:: player_names Names of players in the game :type: List[str] .. attribute:: max_turns Maximum turns before ending game :type: int .. attribute:: enable_trading Whether to enable trade negotiations :type: bool .. attribute:: enable_building Whether to enable house/hotel building :type: bool .. py:class:: Config Pydantic configuration class. .. py:method:: create_initial_state() Create the initial game state with all required fields and proper. validation. .. py:method:: create_player_agent() Create the player decision agent. .. py:method:: setup_player_agent_engines() Set up the engines for the player agent if not already configured. .. py:class:: MonopolyPlayerAgent(config) Bases: :py:obj:`haive.core.engine.agent.agent.Agent`\ [\ :py:obj:`MonopolyPlayerAgentConfig`\ ] Player agent for making individual decisions in Monopoly. Initialize the player agent. .. py:method:: get_decision_route(state) Get the route for the decision. .. py:method:: make_building_decision(state) Make a building decision. .. py:method:: make_jail_decision(state) Make a jail-related decision. .. py:method:: make_property_decision(state) Make a property purchase decision. .. py:method:: make_trade_decision(state) Make a trade decision. .. py:method:: route_decision(state) Route to appropriate decision node based on decision type. .. py:method:: setup_workflow() Set up the player decision workflow. .. py:class:: MonopolyPlayerAgentConfig Bases: :py:obj:`haive.core.engine.agent.config.AgentConfig` Configuration for monopoly player decision agent. .. py:class:: PlayerDecisionState(/, **data) Bases: :py:obj:`haive.core.schema.prebuilt.messages_state.MessagesState` State for player decision subgraph. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:property:: decision :type: haive.games.monopoly.models.PropertyDecision | haive.games.monopoly.models.JailDecision | haive.games.monopoly.models.BuildingDecision | haive.games.monopoly.models.TradeResponse | str | Any Get the decision.