Expand description
Core type aliases, traits, and constants for robopoker.
This crate provides the foundational types and configuration parameters used throughout the robopoker workspace.
Re-exports§
pub use dto::*;
Modules§
- dto
- Data transfer objects for API communication.
Structs§
- ID
- Generic ID wrapper providing compile-time type safety over uuid::Uuid.
Constants§
- ASYMMETRIC_
UTILITY - Asymmetric payoff for RPS test game (rock beats scissors by 2x).
- BIAS_
FOLDS - Initial regret weight for fold actions (high = fold more often early).
- BIAS_
OTHER - Initial regret weight for call/check actions (baseline).
- BIAS_
RAISE - Initial regret weight for raise actions (low = raise less often early).
- B_BLIND
- Big blind amount.
- CFR_
BATCH_ SIZE_ NLHE - Trees sampled per NLHE iteration (parallelized across threads).
- CFR_
BATCH_ SIZE_ RIVER - Trees sampled per river-only iteration (testing/debugging).
- CFR_
BATCH_ SIZE_ RPS - Trees sampled per RPS iteration.
- CFR_
TREE_ COUNT_ NLHE - Total NLHE training budget (~268M trees for production).
- CFR_
TREE_ COUNT_ RIVER - River-only training budget (~65K trees).
- CFR_
TREE_ COUNT_ RPS - Total RPS training budget (small game converges fast).
- KMEANS_
EQTY_ CLUSTER_ COUNT - Equity histogram resolution (0%, 1%, …, 100%).
- KMEANS_
FLOP_ CLUSTER_ COUNT - Number of flop buckets (distributions over turn clusters).
- KMEANS_
FLOP_ TRAINING_ ITERATIONS - Lloyd’s algorithm iterations for flop clustering.
- KMEANS_
TURN_ CLUSTER_ COUNT - Number of turn buckets (distributions over river equity).
- KMEANS_
TURN_ TRAINING_ ITERATIONS - Lloyd’s algorithm iterations for turn clustering.
- MAX_
DEPTH_ ALLGAME - Maximum tree depth for full game abstraction.
- MAX_
DEPTH_ SUBGAME - Maximum tree depth for real-time subgame solving.
- MAX_
RAISE_ REPEATS - Maximum re-raises per betting round (limits tree width).
- N
- Number of players at the table.
- POLICY_
MIN - Minimum policy weight to prevent division by zero in normalization.
- PRUNING_
EXPLORE - Probability of sampling pruned actions anyway (prevents permanent lock-out).
- PRUNING_
THRESHOLD - Actions with regret below this are candidates for pruning (-300k ≈ 3× max pot).
- PRUNING_
WARMUP - Warm-up epochs before pruning activates (let regrets stabilize first).
- REGRET_
MIN - Floor for cumulative regret storage (prevents unbounded negative growth).
- SAMPLING_
CURIOSITY - Epsilon (ε) - minimum sampling probability floor. Ensures every action retains at least ε probability for exploration.
- SAMPLING_
SMOOTHING - Smoothing (β) - pseudocount added to numerator and denominator. Higher values pull sampling toward uniform (maximum entropy prior).
- SAMPLING_
TEMPERATURE - Temperature (T) - controls sampling entropy via policy scaling. Higher T → more uniform (exploratory); lower T → more peaked (greedy). Formula: σ’(a) = max(ε, (σ(a)/T + β) / (Σσ + β)).
- SHOWDOWN_
TIMEOUT - Timeout for voluntary card reveal at showdown (seconds).
- SINKHORN_
ITERATIONS - Maximum Sinkhorn-Knopp iterations before stopping.
- SINKHORN_
TEMPERATURE - Entropy regularization strength. Lower = closer to true EMD, higher = faster convergence.
- SINKHORN_
TOLERANCE - Early stopping threshold on marginal constraint violation.
- STACK
- Starting stack size in big blinds.
- SUBGAME_
ALTS - Alternative hands in the gadget game (Pluribus uses 4).
- SUBGAME_
ITERATIONS - CFR iterations for real-time subgame refinement.
- S_BLIND
- Small blind amount.
- TRAINING_
LOG_ INTERVAL - Interval between progress log messages during training.
Traits§
- Arbitrary
- Random instance generation for testing and Monte Carlo sampling.
- Unique
- Unique identifier trait for domain entities.
Functions§
- interrupted
- No-op interrupt check when server feature disabled.
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.