Expand description
Poker solver toolkit for game-theoretically optimal strategies.
This facade re-exports the published robopoker library crates under
convenient names. The private application and service crates (live-game
coordination, HTTP server, training orchestration, benchmarking) are not
re-exported here — depend on them directly from the workspace if you need
them.
§Crate Organization
§Core
core— Type aliases, constants, action translation, shared traitscards— Card primitives, hand evaluation, abstraction primitivestransport— Optimal transport (Sinkhorn, EMD)clustering— Generic triangle-inequality-accelerated k-meansgameplay— Poker game enginemccfr— Game-agnostic MCCFR frameworksubgame— Safe + depth-limited subgame solvingnlhe— No-Limit Hold’em solver
§Infrastructure
Re-exports§
pub use deuce as cards;pub use elkan as clustering;pub use kicker as gameplay;pub use daybook as database;pub use mccfr;pub use monge as transport;pub use nlhe;pub use pokerkit as core;pub use subgame;pub use vitals as telemetry;
Macros§
- hyperparams
- Declare a process-global singleton for a hyperparameter struct.
Structs§
- Aivat
Delta - AIVAT-adjusted aggregate: lean wire type with no embedded Summary.
- Aivat
Result - AIVAT-adjusted result for a single hand.
- Anchor
- Opaque index into a
crate::Lattice. Constructed only by the crate; callers receive these fromcrate::Lattice::bracketorTranslation::resolveand pattern-match. - Bracket
- A pair of bracketing anchors
(lo, hi)fromcrate::Lattice::bracket. - Config
- The three boolean axes that pick out one cell of the zoo.
- ID
- Generic ID wrapper providing compile-time type safety over uuid::Uuid.
- Lattice
- A non-empty, strictly ascending sequence of finite f64 anchors,
each paired with a payload
P, tagged with itsAxis. - Scalar
- A finite scalar observation tagged with its
Axis. - Summary
- Aggregate statistics over N played hands.
Enums§
- Regime
- Action abstraction regime controlling bet sizing grid and database table names.
- Translated
- Outcome of running a
Translationpolicy against acrate::Latticeand acrate::Scalar. - Translation
- Action-translation policy. Each variant names a canonical algorithm;
resolve runs that algorithm against a
Latticeand aScalarto produce aTranslated<P, F>. - Variant
- Who’s playing — picked by the user (UI), CLI (slumbot), or the hosting backend. The cube IS the identity; the label and UUID are derived from the axis triple.
- Version
- Abstraction version controlling clustering parameters and table names.
Constants§
- ASYMMETRIC_
UTILITY - Asymmetric payoff for RPS test game (rock beats scissors by 2x).
- B_BLIND
- Big blind amount.
- EPSILON
- Minimum policy weight to prevent division by zero in normalization.
- FRONTIER_
LEAVES - Number of biased continuation strategies at depth-limited frontiers. D=4: unmodified blueprint + fold-biased + call-biased + raise-biased (Pluribus).
- KMEANS_
EQTY_ CLUSTER_ COUNT - Equity histogram resolution (0%, 1%, …, 100%).
- KMEANS_
FLOP_ CLUSTER_ COUNT - Number of flop buckets (distributions over turn clusters).
- KMEANS_
MAX_ CLUSTER_ COUNT - Maximum clusters per street. Bound by Abstraction’s 8-bit index field (0..=255 = 256 distinct values).
- KMEANS_
TURN_ CLUSTER_ COUNT - Number of turn buckets (distributions over river equity).
- MAX_
IDLE_ HANDS - Maximum consecutive all-timeout hands before ending session.
- MAX_
PATH_ EDGES - Maximum edges in a packed Path (12 nibbles × 5 bits = 60 bits ≤ 64 bits).
Data-representation limit, not a solver depth knob — the subgame tree’s
effective depth is controlled by where
DepthGame::at_frontierfires (first chance node past origin), not by this constant. - MAX_
RAISE_ REPEATS - Maximum re-raises per betting round (limits tree width).
- N
- Number of players at the table.
- N_
WORLDS - Alternative opponent hand partitions in the subgame (safe subgame solving). Each world represents a partition of the opponent’s range conditioned on the observed action sequence. More worlds = finer range partitioning = more robust strategy, but higher memory and slower convergence.
- OPENS
- Preflop open sizes in BB units (depth=0 only).
- PACE_
BOT_ THINK - Simulated think time for bot actions.
- PACE_
DEAL_ BOARD - Delay after dealing community cards.
- PACE_
DEAL_ HOLE - Delay after hand start before dealing hole cards.
- PACE_
DECISION - Timeout for human player decisions.
- PACE_
RESULTS - Pause between hands (after settlement, before next deal).
- PACE_
ROOM_ STARTUP - Timeout for room startup (waiting for WebSocket connection).
- PACE_
SHOWDOWN - Window for voluntary card reveals at showdown.
- PLURIBUS_
INDICES - Action grid for the Pluribus regime. Pluribus-faithful (Brown &
Sandholm 2019) widths on first-bet rows, shrunk on subsequent raises.
No SPR axis on the menu — pot-relative sizing already self-scales
with stack depth (1× pot at SPR=1 is all-in), so the menu is keyed
only on
(street, depth). All-in remains available at every node asEdge::Shove. - RAISES
- Canonical raise pool as pot-relative (numerator, denominator) fractions. Index position = u8 encoding offset from 10. 1:1 with Odds::GRID. 0 1 2 3 4 5 6 7 8 9 25% 33% 50% 67% 75% 100% 125% 150% 200% 300%
- SLUMBOT_
INDICES - STACK
- Starting stack size in chips.
- S_BLIND
- Small blind amount.
- VARIANT_
NAMESPACE - Namespace UUID v5 for deterministic bot identity. Combined with the
bot:<label>username, gives every cube cell + fish a stable UUID independent of the build (server, slumbot, client).
Traits§
- Arbitrary
- Random instance generation for testing and Monte Carlo sampling.
- Axis
- Marker for a scalar axis. Implementors are typically zero-sized
structs like
BB,PotFraction,BidAmount. Values along the axis are assumed non-negative. - Unique
- Unique identifier trait for domain entities.
Functions§
- brb
- Register graceful interrupt handler. Type “Q” + Enter to stop after current batch. Also handles SIGTERM (sent by ECS stop-task) for graceful remote shutdown. Optionally set TRAIN_DURATION env var (e.g., “2h”, “30m”) for timed runs.
- config_
string - Compact textual fingerprint of every constant that defines the game tree
shape for this regime. Two trainers producing the same fingerprint can
safely share the same
blueprint_<regime>_<version>table; two that don’t would silently corrupt each other’s strategy data — InfoIds keyed byEdge::Raise(Size)carry the same byte representation but mean different actions when the underlyingSizelattice shifts. - erf
- Approximate standard normal CDF using the Abramowitz & Stegun formula.
- init_
regime - Sets the active regime. Must be called before any sizing or table access. Panics if called twice with different values.
- init_
translation - Sets the active translation. Must be called before any inference path queries it. Panics if called twice with different values.
- init_
version - Sets the active version. Must be called before any table access. Panics if called twice with different values.
- interrupted
- Check if graceful shutdown was requested (via stdin “Q”) or deadline reached.
- kys
- Register Ctrl+C handler for immediate (non-graceful) termination. Use when you need hard shutdown without waiting for current batch.
- ratio
- regime
- Returns the active regime. Defaults to Pluribus if
init_regimewas never called. Binaries should still require explicit--regimevia clap. - slumbot_
opponent_ username - The slumbot.com adversary identity, recorded as a fixed pseudo-bot when the slumbot crate persists hands. Not in the zoo; the slumbot binary plays our zoo bots against this external opponent.
- slumbot_
opponent_ uuid - translation
- Returns the active translation. Defaults to
Snapifinit_translationwas never called. Binaries should require explicit--translationvia clap. - version
- Returns the active version. Defaults to V3.
Type Aliases§
- Chips
- Stack sizes and bet amounts in big blinds.
- Energy
- Distance metrics, convergence thresholds, and smoothing terms.
- Entropy
- Temperature parameters and information-theoretic measures.
- Epoch
- Training iteration counter for CFR epochs.
- Position
- Seat index around the table (0 = button in heads-up).
- Probability
- Strategy weights, sampling distributions, and reach probabilities.
- Utility
- Expected values, regrets, and payoffs.