haive.games.monopoly.player_agent¶
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¶
Configuration class for monopoly game agents. |
|
Player agent for making individual decisions in Monopoly. |
|
Configuration for monopoly player decision agent. |
|
State for player decision subgraph. |
Module Contents¶
- class haive.games.monopoly.player_agent.MonopolyGameAgentConfig[source]¶
Bases:
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
- class haive.games.monopoly.player_agent.MonopolyPlayerAgent(config)[source]¶
Bases:
haive.core.engine.agent.agent.Agent
[MonopolyPlayerAgentConfig
]Player agent for making individual decisions in Monopoly.
Initialize the player agent.
- Parameters:
config (MonopolyPlayerAgentConfig)
- get_decision_route(state)[source]¶
Get the route for the decision.
- Parameters:
state (pydantic.BaseModel)
- Return type:
- make_building_decision(state)[source]¶
Make a building decision.
- Parameters:
state (pydantic.BaseModel)
- Return type:
langgraph.types.Command
- make_jail_decision(state)[source]¶
Make a jail-related decision.
- Parameters:
state (pydantic.BaseModel)
- Return type:
langgraph.types.Command
- make_property_decision(state)[source]¶
Make a property purchase decision.
- Parameters:
state (pydantic.BaseModel)
- Return type:
langgraph.types.Command
- make_trade_decision(state)[source]¶
Make a trade decision.
- Parameters:
state (pydantic.BaseModel)
- Return type:
langgraph.types.Command
- class haive.games.monopoly.player_agent.MonopolyPlayerAgentConfig[source]¶
Bases:
haive.core.engine.agent.config.AgentConfig
Configuration for monopoly player decision agent.
- class haive.games.monopoly.player_agent.PlayerDecisionState(/, **data)[source]¶
Bases:
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.
- Parameters:
data (Any)
- property decision: 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.
- Return type:
haive.games.monopoly.models.PropertyDecision | haive.games.monopoly.models.JailDecision | haive.games.monopoly.models.BuildingDecision | haive.games.monopoly.models.TradeResponse | str | Any