Inspiration
Standard machine learning models fail on slot machines because complex algorithms end up memorizing random noise. Instead of betting everything on a single speculative model, we used a "bread spread" approach: test multiple simple theories at once, measure how much history we actually have, and route each spin to the smartest prediction based on our confidence.
What it does
House Edge forecasts the exact chances of winning on the next spin (0×,1×,2×,5×,20×). It spots whether a machine is in a hot or cold mode, falls back to safe statistical baselines when data is thin, cuts prediction error by up to 46% over benchmark, and runs completely offline in 2.8 seconds.
How we built it
Physical Reel Invariants: We reverse-engineered the simulator and proved payouts above 1× follow fixed mechanical ratios (like 200:49:1 on Steady machines) that never change. Mode Detection: We discovered machines switch between two distinct payout modes and built a classifier tracking rolling win rates to estimate the current state. Confidence Routing: When data is scarce (64 spins), we pull predictions safely toward the mean. When data is deep (192+ spins), we unleash gradient-boosted trees capturing multi-tick rhythms.
Challenges we ran into
The 57-Point Trap: Early textbook math suggested simple frequency averages would score 57 points, but in reality they scored worse than baseline. Real machines drift over time, so naive historical averaging blinds you to current state. Round 2 Rule Mutation: In Round 2, the simulator's old 7-spin rhythm vanished, replaced by 2-spin and 5-spin echoes. Because our code was modular, we quickly diagnosed the shift, updated our lag features, and adapted within minutes.
Accomplishments that we're proud of
Reverse-engineering the simulator's exact reel fractions to machine precision (𝜎≤10−16σ≤10−16). Delivering a 46% error reduction in Round 1 and 29% in Round 2. Building a self-contained 4.5 MB package that runs in 2.8 seconds on a standard laptop CPU with zero internet access.
What we learned
Locking down real mechanical rules beats endlessly tuning tree hyperparameters. Knowing when to trust a complex model and when to fall back on simple statistical averages is the secret to surviving noisy data without overfitting.
What's next for House Edge
Connecting our probability forecasts to fractional Kelly betting to calculate optimal wager sizing in real time, and adding online changepoint detection to catch the exact spin a cold machine turns hot.
Built With
- antigravity
- codex
- databricks
- learning
- machine
- numpy
- pandas
- probability
- python
- scikit-learn
- series
- statistics
- time