haive.games.poker.agent ======================= .. py:module:: haive.games.poker.agent .. autoapi-nested-parse:: Enhanced Texas Hold'em Poker agent implementation. This module implements a robust poker agent with improved: - Structured output handling with proper schema validation - Comprehensive logging and debugging - Error handling and retry policies for invalid moves - Enhanced prompts for LLM decisions Classes ------- .. autoapisummary:: haive.games.poker.agent.PokerAgent haive.games.poker.agent.RetryConfiguration Module Contents --------------- .. py:class:: PokerAgent(config = PokerAgentConfig()) Bases: :py:obj:`haive.core.engine.agent.agent.Agent`\ [\ :py:obj:`haive.games.poker.config.PokerAgentConfig`\ ] Enhanced agent class for managing a multi-player Texas Hold'em poker game. Key improvements: - Proper structured output handling - Comprehensive debug logging - Retry policies for failed operations - Enhanced prompts and decision handling Initialize the enhanced poker agent. .. py:method:: end_game(state) End the poker game and determine final results. .. py:method:: end_hand(state) Handle the end of a hand - determine winner(s) and update stats. .. py:method:: handle_player_decision(state) Enhanced player decision handling with improved error recovery. This method: 1. Determines the current player 2. Calculates legal actions 3. Gets decision from the player agent 4. Validates and applies the decision 5. Updates game state .. py:method:: initialize_game(state) Initialize the poker game state with enhanced logging. .. py:method:: setup_hand(state) Set up a new poker hand with enhanced error handling and debugging. .. py:method:: setup_workflow() Set up the poker game workflow graph with enhanced error handling. .. py:method:: should_continue_round(state) Determine if we should continue the current betting round. .. py:method:: should_continue_to_next_phase(state) Determine if the game should advance to the next phase. .. py:method:: should_play_another_hand(state) Determine if another hand should be played. .. py:method:: update_game_phase(state) Update the game phase and handle phase transitions. .. py:class:: RetryConfiguration Configuration for retry policies.