File size: 6,095 Bytes
21848dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7283f49
21848dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
"""PersistentPoker-Bench public package."""

from persistentpoker_bench.budget import BudgetCaps, BudgetExceededError, BudgetTracker
from persistentpoker_bench.cards import Card, Suit, cards_to_notation, parse_cards, standard_deck
from persistentpoker_bench.game_state import (
    Action,
    ActionType,
    HandState,
    PlayerState,
    Street,
    TableConfig,
    create_hand_state,
)
from persistentpoker_bench.hand_evaluator import EvaluatedHand, evaluate_hand, evaluate_notation
from persistentpoker_bench.hand_runner import (
    DecisionEnvelope,
    HandObserver,
    HandRunResult,
    HandRunnerConfig,
    StaticDecisionAgent,
    run_seeded_hand,
)
from persistentpoker_bench.interactive import (
    HumanCommand,
    HumanDecisionAgent,
    PassiveBotAgent,
    PlaySeatKind,
    PlaySeatSpec,
    PlaySessionConfig,
    TerminalHandObserver,
    parse_play_session_config,
    parse_human_command,
    play_terminal_match,
    run_play_session,
)
from persistentpoker_bench.leaderboard import LeaderboardRow, build_leaderboard_rows, export_leaderboard_csv
from persistentpoker_bench.live_play import LiveMatchController
from persistentpoker_bench.memory_check import MemoryCheckResult, evaluate_memory
from persistentpoker_bench.match_runner import MatchRunResult, MatchRunnerConfig, flatten_match_transcript, run_seeded_match
from persistentpoker_bench.metrics import AggregateMetrics, compute_match_metrics
from persistentpoker_bench.model_registry import (
    DEFAULT_MODEL_REGISTRY,
    EFFICIENCY_MODELS,
    FRONTIER_MODELS,
    LeaderboardTrack,
    RegisteredModel,
    find_registered_model,
    models_for_track,
)
from persistentpoker_bench.models import DEFAULT_MODEL_PRIORITY, ModelTarget
from persistentpoker_bench.parsing import ParsedDecision, parse_llm_decision
from persistentpoker_bench.pool import PersistentPool
from persistentpoker_bench.prompting import PromptBundle, build_decision_prompt
from persistentpoker_bench.replay import (
    build_match_replay,
    export_match_replay_json,
    render_replay_hand_markdown,
    render_replay_summary_markdown,
    serialize_hand_replay,
)
from persistentpoker_bench.retries import RetryPolicy
from persistentpoker_bench.runtime_agents import LiteLLMRuntimeAgent, RuntimeDecisionEnvelope, runtime_envelope_to_dict
from persistentpoker_bench.schemas import (
    LLMDecision,
    WinnerPoolDecision,
    decision_example_payload,
    decision_json_schema,
    normalize_decision_payload,
)
from persistentpoker_bench.serialization import serialize_hand_state, serialize_legal_actions
from persistentpoker_bench.showdown import PotAllocation, ShowdownResult, resolve_showdown
from persistentpoker_bench.spec import (
    DEFAULT_BIG_BLIND,
    DEFAULT_DETERMINISTIC_SEED,
    DEFAULT_PLAYER_COUNT,
    DEFAULT_SMALL_BLIND,
    DEFAULT_STARTING_STACK,
    MAX_PLAYER_COUNT,
    MIN_PLAYER_COUNT,
    HandCategory,
    ProjectSpec,
    get_project_spec,
)
from persistentpoker_bench.tiebreak import D6TieBreaker, DiceTieBreakResult, serialize_tiebreak_result
from persistentpoker_bench.tournament import (
    MatchRecord,
    TournamentEntrant,
    TournamentLineup,
    TournamentResult,
    TournamentRunnerConfig,
    export_decision_traces_jsonl,
    export_match_results_jsonl,
    export_match_summaries_jsonl,
    flatten_tournament_match_transcript,
    run_tournament,
    serialize_match_record,
)
from persistentpoker_bench.web_ui import build_web_app

__all__ = [
    "Action",
    "ActionType",
    "BudgetCaps",
    "BudgetExceededError",
    "BudgetTracker",
    "Card",
    "DEFAULT_BIG_BLIND",
    "DEFAULT_DETERMINISTIC_SEED",
    "DEFAULT_MODEL_REGISTRY",
    "DEFAULT_MODEL_PRIORITY",
    "DEFAULT_PLAYER_COUNT",
    "DEFAULT_SMALL_BLIND",
    "DEFAULT_STARTING_STACK",
    "DecisionEnvelope",
    "D6TieBreaker",
    "DiceTieBreakResult",
    "EFFICIENCY_MODELS",
    "EvaluatedHand",
    "FRONTIER_MODELS",
    "HandObserver",
    "LiteLLMRuntimeAgent",
    "LeaderboardRow",
    "MatchRunResult",
    "MatchRunnerConfig",
    "MatchRecord",
    "HandRunResult",
    "HandRunnerConfig",
    "HandState",
    "HandCategory",
    "HumanCommand",
    "HumanDecisionAgent",
    "LLMDecision",
    "LeaderboardTrack",
    "LiveMatchController",
    "MAX_PLAYER_COUNT",
    "MemoryCheckResult",
    "MIN_PLAYER_COUNT",
    "ModelTarget",
    "ParsedDecision",
    "PlayerState",
    "PotAllocation",
    "PersistentPool",
    "PassiveBotAgent",
    "PlaySeatKind",
    "PlaySeatSpec",
    "PlaySessionConfig",
    "PromptBundle",
    "ProjectSpec",
    "RegisteredModel",
    "RetryPolicy",
    "RuntimeDecisionEnvelope",
    "ShowdownResult",
    "StaticDecisionAgent",
    "Street",
    "Suit",
    "TableConfig",
    "TerminalHandObserver",
    "TournamentEntrant",
    "TournamentLineup",
    "TournamentResult",
    "TournamentRunnerConfig",
    "WinnerPoolDecision",
    "build_decision_prompt",
    "build_leaderboard_rows",
    "cards_to_notation",
    "create_hand_state",
    "decision_example_payload",
    "decision_json_schema",
    "evaluate_hand",
    "evaluate_memory",
    "evaluate_notation",
    "export_match_replay_json",
    "export_decision_traces_jsonl",
    "export_leaderboard_csv",
    "export_match_results_jsonl",
    "export_match_summaries_jsonl",
    "find_registered_model",
    "flatten_match_transcript",
    "flatten_tournament_match_transcript",
    "get_project_spec",
    "models_for_track",
    "normalize_decision_payload",
    "parse_llm_decision",
    "parse_cards",
    "parse_play_session_config",
    "parse_human_command",
    "compute_match_metrics",
    "resolve_showdown",
    "run_seeded_hand",
    "run_seeded_match",
    "run_tournament",
    "runtime_envelope_to_dict",
    "run_play_session",
    "serialize_tiebreak_result",
    "serialize_match_record",
    "serialize_hand_state",
    "serialize_legal_actions",
    "serialize_hand_replay",
    "render_replay_hand_markdown",
    "render_replay_summary_markdown",
    "build_match_replay",
    "build_web_app",
    "play_terminal_match",
    "standard_deck",
    "AggregateMetrics",
]