How the Roulette Strategy Tester Works
The Roulette Strategy Tester is built to be transparent. Every number on the result screen comes from the same simulation engine you can see in the source code. This page explains exactly what happens between clicking Run Test and seeing the final report.
If you want the formal mathematical write-up, see Math & Simulation Methodology.
1. Random number generation
Each spin calls Math.random() in the browser and maps it to a pocket index. For European roulette the engine generates an integer 0-36 (37 pockets). For American roulette it generates 0-37 where 37 represents the 00 pocket (38 pockets total).
This is a pseudo-random generator, suitable for educational simulation. It is not certified casino RNG and we do not claim it is.
2. Bet target resolution
Each strategy defines one or more bets per spin. A bet has a target (red, black, dozen, single number, six line, etc.) and a stake. After the spin number is drawn, every bet is resolved independently against the result.
Payouts follow the standard table: 35:1 straight up, 17:1 split, 11:1 street, 8:1 corner, 5:1 six line, 2:1 dozen and column, 1:1 even-money bets. See Roulette Payouts for the full breakdown.
3. Strategy state machine
Every strategy is implemented as a small state machine. After each resolved spin the engine asks the strategy two things: what is your next bet, and how do you update internal state based on the win/loss outcome.
For Martingale the state is just the current bet size. For Labouchere the state is the current cancellation sequence. For Oscar's Grind it is the cycle profit in units.
4. Bankroll tracking
Every spin records: total stake, win/loss outcome, profit, new bankroll, peak bankroll, lowest bankroll and current drawdown. These feed the bankroll graph and the spin history table live.
If a strategy needs a stake larger than the current bankroll, the run is marked as busted/blocked. The engine never lets bankroll go below zero.
5. Bust and stop conditions
A run ends when one of three conditions is met:
- The configured spin count is reached.
- Bankroll cannot cover the next required bet (busted/blocked).
- The user clicks Reset.
6. Result report calculation
The final modal aggregates every spin in the history: total wagered, total won (profit on winning spins), total lost (stake on losing spins), ROI, win rate, peak and lowest bankroll, max drawdown, longest streaks, busted flag and expected loss.
Expected loss is computed as total wagered times the variant's house edge (2.7027% for European, 5.263% for American). This is an educational reference, not a prediction of your specific session.
What the tester does not do
- It does not place real bets. There is no money flow anywhere on this site.
- It does not connect to casino RNGs or feeds.
- It does not save your data or send anything to a server. Everything runs in your browser.
- It does not claim that any strategy can beat the house edge.