games.hold_em.config¶

Texas Hold’em configuration module.

This module provides configuration classes for the Hold’em game, including:
  • Game agent configuration

  • Player agent configurations

  • Engine configurations

Classes¶

HoldemGameSettings

Settings for customizing Hold'em games.

Functions¶

create_cash_game_config([num_players, big_blind, ...])

Create a cash game configuration.

create_custom_holdem_config(settings)

Create a custom Hold'em configuration from settings.

create_default_holdem_config([num_players, ...])

Create a default Hold'em game configuration.

create_fallback_engines(player_name, player_style)

Create minimal fallback engines if the main engine creation fails.

create_fallback_game_engines()

Create minimal fallback game engines.

create_heads_up_config([player1_name, player2_name, ...])

Create a heads-up (2 player) configuration.

create_tournament_config([num_players, ...])

Create a tournament-style configuration with escalating blinds.

validate_config(config)

Validate a game configuration and return issues found.

validate_player_engines(engines)

Validate that player engines are properly configured.

Module Contents¶

class games.hold_em.config.HoldemGameSettings(/, **data)¶

Bases: pydantic.BaseModel

Settings for customizing Hold’em games.

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)

to_game_config()¶

Convert settings to a game configuration.

Return type:

haive.games.hold_em.game_agent.HoldemGameAgentConfig

games.hold_em.config.create_cash_game_config(num_players=6, big_blind=20, max_buy_in=2000, min_buy_in=400)¶

Create a cash game configuration.

Parameters:
  • num_players (int)

  • big_blind (int)

  • max_buy_in (int)

  • min_buy_in (int)

Return type:

haive.games.hold_em.game_agent.HoldemGameAgentConfig

games.hold_em.config.create_custom_holdem_config(settings)¶

Create a custom Hold’em configuration from settings.

Parameters:

settings (HoldemGameSettings)

Return type:

haive.games.hold_em.game_agent.HoldemGameAgentConfig

games.hold_em.config.create_default_holdem_config(num_players=4, starting_chips=1000, small_blind=10, big_blind=20)¶

Create a default Hold’em game configuration.

Parameters:
  • num_players (int)

  • starting_chips (int)

  • small_blind (int)

  • big_blind (int)

Return type:

haive.games.hold_em.game_agent.HoldemGameAgentConfig

games.hold_em.config.create_fallback_engines(player_name, player_style)¶

Create minimal fallback engines if the main engine creation fails.

Parameters:
  • player_name (str)

  • player_style (str)

Return type:

dict[str, haive.core.engine.aug_llm.AugLLMConfig]

games.hold_em.config.create_fallback_game_engines()¶

Create minimal fallback game engines.

Return type:

dict[str, haive.core.engine.aug_llm.AugLLMConfig]

games.hold_em.config.create_heads_up_config(player1_name='Alice', player2_name='Bob', starting_chips=1000, big_blind=20)¶

Create a heads-up (2 player) configuration.

Parameters:
  • player1_name (str)

  • player2_name (str)

  • starting_chips (int)

  • big_blind (int)

Return type:

haive.games.hold_em.game_agent.HoldemGameAgentConfig

games.hold_em.config.create_tournament_config(num_players=6, starting_chips=1500, blind_levels=None)¶

Create a tournament-style configuration with escalating blinds.

Parameters:
Return type:

haive.games.hold_em.game_agent.HoldemGameAgentConfig

games.hold_em.config.validate_config(config)¶

Validate a game configuration and return issues found.

Parameters:

config (haive.games.hold_em.game_agent.HoldemGameAgentConfig)

Return type:

tuple[bool, list[str]]

games.hold_em.config.validate_player_engines(engines)¶

Validate that player engines are properly configured.

Parameters:

engines (dict[str, haive.core.engine.aug_llm.AugLLMConfig])

Return type:

bool