games.poker.config¶

Configuration module for the Poker agent.

This module provides configuration classes and utilities for setting up poker game agents, including:

  • Game settings (blinds, starting chips, max hands)

  • Player configurations and names

  • LLM engine configurations

  • State management settings

  • Game history and analysis options

The module supports multiple LLM providers and allows customization of game parameters through a Pydantic-based configuration system.

Example

>>> from poker.config import PokerAgentConfig
>>>
>>> # Create default config for 6 players
>>> config = PokerAgentConfig.default_config(
...     player_names=["P1", "P2", "P3", "P4", "P5", "P6"],
...     starting_chips=2000,
...     small_blind=10,
...     big_blind=20
... )

Classes¶

PokerAgentConfig

Configuration class for the poker agent.

Module Contents¶

class games.poker.config.PokerAgentConfig¶

Bases: haive.core.engine.agent.agent.AgentConfig

Configuration class for the poker agent.

This class defines all necessary parameters and settings for running a poker game, including player setup, game rules, and LLM configurations. It inherits from the base AgentConfig class and adds poker-specific parameters.

engines¶

Mapping of agent names to their LLM configurations. Default is an empty dict.

Type:

Dict[str, AugLLMConfig]

player_names¶

List of player names in the game. Default is [ā€œAliceā€, ā€œBobā€, ā€œCharlieā€, ā€œDaveā€].

Type:

List[str]

state_schema¶

Schema class for game state. Default is PokerState.

Type:

Type[BaseModel]

state_schema_manager¶

Manager for handling state transitions. Default is PokerStateManager().

Type:

Any

starting_chips¶

Initial chip count for each player. Default is 1000.

Type:

int

small_blind¶

Small blind amount. Default is 5.

Type:

int

big_blind¶

Big blind amount. Default is 10.

Type:

int

max_hands¶

Maximum number of hands to play. Default is 10.

Type:

int

enable_detailed_analysis¶

Whether to log detailed hand analysis. Default is True.

Type:

bool

save_game_history¶

Whether to save game history to disk. Default is True.

Type:

bool

Example

>>> config = PokerAgentConfig(
...     name="high_stakes_game",
...     starting_chips=5000,
...     small_blind=25,
...     big_blind=50,
...     max_hands=20
... )
classmethod default_config(**kwargs)¶

Create a default configuration for poker agents.

This class method generates a default configuration with reasonable starting values for all parameters. Any parameter can be overridden by passing it as a keyword argument.

Parameters:

**kwargs – Override default configuration parameters. Valid keys include all attributes of PokerAgentConfig.

Returns:

A new configuration instance with default

values and any specified overrides.

Return type:

PokerAgentConfig

Example

>>> config = PokerAgentConfig.default_config(
...     player_names=["Player1", "Player2", "Player3"],
...     starting_chips=2000,
...     max_hands=15
... )