haive.games.poker.debug¶

Debugging utilities for the poker agent.

This module provides tools for debugging, testing and analyzing the poker agent’s performance, including: - Test harnesses for structured output validation - Decision validation and verification - Error analysis and reporting - Game state visualization

Classes¶

DecisionAnalyzer

Analyze and validate player decisions for correctness.

GameStatePrinter

Utility for visualizing poker game state during debugging.

StructuredOutputTester

Test harness for validating LLM structured output handling.

Module Contents¶

class haive.games.poker.debug.DecisionAnalyzer[source]¶

Analyze and validate player decisions for correctness.

static validate_decision(decision, player, game_state)[source]¶

Validate if a decision is legal and reasonable.

Parameters:
Return type:

dict[str, Any]

class haive.games.poker.debug.GameStatePrinter[source]¶

Utility for visualizing poker game state during debugging.

static print_game_state(state)[source]¶

Print a human-readable version of the current game state.

class haive.games.poker.debug.StructuredOutputTester(llm_runnable, input_values)[source]¶

Test harness for validating LLM structured output handling.

Initialize the tester with an LLM runnable and test inputs.

Parameters:

input_values (dict[str, Any])

print_report()[source]¶

Print a detailed report of the test results.

run_batch_test(iterations=10)[source]¶

Run multiple tests and collect statistics.

Parameters:

iterations (int)

Return type:

dict[str, Any]

run_test(retries=3)[source]¶

Run a single test of the LLM runnable with retries.

Parameters:

retries (int)

Return type:

dict[str, Any]