haive.games.chess.config ======================== .. py:module:: haive.games.chess.config .. autoapi-nested-parse:: Chess agent configuration module. from typing import Any This module provides configuration classes for chess agents, including: - Core game parameters - LLM engine settings - Analysis options - Visualization settings - State schema definition The configuration system uses Pydantic for validation and default values, making it easy to create and customize chess agent instances. Classes ------- .. autoapisummary:: haive.games.chess.config.ChessConfig Module Contents --------------- .. py:class:: ChessConfig Bases: :py:obj:`haive.games.core.config.BaseGameConfig` Configuration class for chess game agents. This class defines all configuration parameters for a chess agent, including state schema, LLM engines, game settings, and visualization options. .. attribute:: state_schema The state schema for the game. :type: Type[ChessState] .. attribute:: white_player_name Name of the white player. :type: str .. attribute:: black_player_name Name of the black player. :type: str .. attribute:: enable_analysis Whether to enable position analysis during gameplay. :type: bool .. attribute:: should_visualize_graph Whether to visualize the game workflow graph. :type: bool .. attribute:: max_moves Maximum number of moves before forcing a draw. :type: int .. attribute:: engines LLM configurations for players and analyzers. :type: Dict[str, AugLLMConfig] .. attribute:: runnable_config Runtime configuration for the agent. :type: Dict[str, Any] .. rubric:: Examples >>> # Create a basic configuration >>> config = ChessConfig() >>> >>> # Create a configuration with analysis disabled >>> config = ChessConfig(enable_analysis=False) >>> >>> # Create a configuration with custom LLM engines >>> from haive.core.engine.aug_llm import build_aug_llm >>> engines = { ... "white_player": build_aug_llm("openai", "gpt-4"), ... "black_player": build_aug_llm("anthropic", "claude-3-opus-20240229"), ... } >>> config = ChessConfig(engines=engines) .. py:class:: Config Pydantic configuration. This inner class configures Pydantic behavior for the ChessAgentConfig. .. attribute:: arbitrary_types_allowed Whether to allow arbitrary types in the model. :type: bool .. py:method:: build_legacy_engines() Build legacy hardcoded engines. .. py:method:: create_engines_from_player_configs(player_configs) Create engines from player configurations. .. py:method:: create_simple_player_configs() Create player configs from simple model strings. .. py:method:: finalize_config() Finalize configuration after engine setup. .. py:method:: get_example_configs() Define example chess configurations. .. py:method:: get_role_definitions() Define chess player roles.