Inspiration
Submission for the House Edge challenge
What it does
For each query, our model predicts the probability of the next payout being 0x, 1x, 2x, 5x or 20x. It uses only spins observed before the query time.
How we built it
- Two-stage "hurdle" models. Instead of one 5-way classifier, we factor the forecast: $$P(y) = P(\text{win}) \cdot P(\text{size} \mid \text{win})$$ Two LightGBM models handle the two stages. This separates "is this machine hot right now?" from "how big are its wins?"
- Rule features. We built 343 causal features: lagged payouts, rolling win rates at several window lengths, and logits from simple fixed and trend rules fitted to each machine's history.
- Routing by condition. Machines with short history go to a model trained on artificially shortened histories. Long-history machines go to a model with recency-weighted training and 4 episode-wide "shared change" timing features.
- Seed bagging. Each route averages 5 LightGBM seeds. This improved both cross-validation folds and needed no tuning.
- Honest evaluation. We picked models with condition-stratified 2-fold episode cross-validation and only kept changes that improved both folds.
Challenges we ran into
- Overfitting to validation. With only 96 validation episodes, it's easy to fool yourself. We set acceptance gates before looking at scores. That meant rejecting ideas that looked good overall but lost on one fold, for example rotating the early-stopping holdout.
- Short-history machines. They were our weakest condition. Training on masked copies of long histories helped the most.
- A 90-minute adaptation round. The rules and timing can change between rounds, so we couldn't rerun our full model search. We scripted the refit as one command: it banks a fast 1-seed fallback in about 10 minutes, then upgrades to the 5-seed bag only if it scores better. We rehearsed it end to end beforehand.
What we learned
- A simple model whose structure matches the problem (win × size) beat bigger ensembles.
- Equal-weight seed averaging is a cheap, reliable gain.
- In a short contest, a rehearsed, reproducible pipeline matters as much as the model.