Skip to main content

Crate rbp_core

Crate rbp_core 

Source
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.