Source code for haive.games.fox_and_geese.config

"""Configuration for the Fox and Geese game agent.

This module defines the configuration for the Fox and Geese game agent, which includes
the game name, state schema, AugLLM configurations, enable_analysis, visualize, and
max_turns.

"""

from haive.core.engine.aug_llm import AugLLMConfig
from pydantic import Field

from haive.games.fox_and_geese.engines import fox_and_geese_engines
from haive.games.fox_and_geese.state import FoxAndGeeseState
from haive.games.framework.base.config import GameConfig


[docs] class FoxAndGeeseConfig(GameConfig): """Configuration for the Fox and Geese game agent. This class defines the configuration for the Fox and Geese game agent, which includes the game name, state schema, AugLLM configurations, enable_analysis, visualize, recursion_limit and max_turns. """ name: str = Field(default="fox_and_geese", description="Name of the game") input_schema: type[FoxAndGeeseState] = Field(default=FoxAndGeeseState) state_schema: type[FoxAndGeeseState] = Field(default=FoxAndGeeseState) engines: dict[str, AugLLMConfig] = Field( default=fox_and_geese_engines, description="Configs for the Fox and Geese engines", ) enable_analysis: bool = Field( default=True, description="Whether to enable position analysis" ) visualize: bool = Field(default=True, description="Whether to visualize the game") max_turns: int = Field( default=100, description="Maximum number of turns before declaring a draw" ) recursion_limit: int = Field( default=200, description="Maximum recursion depth for the game graph" )
[docs] @classmethod def default_config(cls): """Create a default configuration.""" return cls( name="fox_and_geese", state_schema=FoxAndGeeseState, engines=fox_and_geese_engines, enable_analysis=True, visualize=True, max_turns=100, recursion_limit=200, )