Roulette betting simulations

×

Overview

module url N/A
git repository https://bitbucket.org/arrizza-public/game-roulette
git command git clone git@bitbucket.org:arrizza-public/game-roulette.git
verification report https://arrizza.com/web-ver/game-roulette-report.html
version info
OS Language #Runs Last Run Cov%
Ubuntu 24.04 noble Python 3.12 443 2025-09-12 57%

Summary

This is a set of simulations of playing roulette at a casino. Do any of them consistently win?

Check-Odds

This option is used to ensure the odds of these simulations match the odds of a real roulette wheel

In check_odds.py, use these to change which wheel to use

base.num_slots = 38  # use American roulette wheel
# base.num_slots = 37  # use European roulette wheel

To run:

./doit --check-odds

Typical output:

     betting on: red
     <snip>
     red       :    4736243     18.0/38    47.36%
     black     :    4738346     18.0/38    47.38%
     green     :     262517      1.0/38     2.63%
     dbl-green :     262894      1.0/38     2.63%
     total     : 10000000 should match: 10000000
     expected  :
        red    :                            47.37%  (should match above)
        black  :                            47.37%  (should match above)
        green  :                             2.63%
     
     wins      :    4736243                47.36%
     losses    :    5263757                52.64%

Roulette 1

Start with $200 and make minimal $2 bets up to 300 times each night. This runs 2 days a week (the weekend) every week for 1 year.

The result: you're going to lose money, around $3,000 per year.

To run:

./doit --bet-type 1

Typical output:

<snip weekly summary>
     roulette1:
        Start with an initial bank and always bet minimum amount.
        continue until day is over or run out of money
        initial bank: 200
     
     Weeks          :     52
     Weeks won      :      6 (includes when winnings == 0)
     Weeks lost     :     46
     Total winnings :  -3312
     Winnings per week        : avg:      15 (ranged from 0 to 24) 
     Losses per week          : avg:     -74 95% values:    -159
     Overall                  : avg:   -1562 (ranged from -3312 to -24) 
     Bankroll                 : avg:     168 95% values:     102

Roulette 2

Makes minimal $2 bets. If it wins, then it repeats. If it loses, then it doubles up.

Note: there is no cap on the bet made. This is not normal casino policy!

The result: you're going to make money, around $28,000 per year. But see Roulette 3 for a more realistic scenario.

To run:

./doit --bet-type 2

Typical output:

<snip weekly summary>
     roulette2:
        bet minimum amount. If you lose, double the bet (no house limit).
        if you win, reset to the minimum amount
     
     Weeks          :     52
     Weeks won      :     52 (includes when winnings == 0)
     Weeks lost     :      0
     Total winnings :  29248
     Winnings per week        : avg:     562 (ranged from 0 to 610) 
     Losses per week          : avg:     nan 95% values:     nan
     Overall                  : avg:   14910 (ranged from 606 to 29248) 
     Bankroll                 : avg:     281 95% values:     245

Roulette 3

Same as Roulette 2 but puts a cap on the max bet that can be made. Different casinos have different policies. I chose $200, you can change self.max_bet = 200 to other values.

The result: you're going to lose money. This value varies quite a bit. e.g. I ran it 5 times: -20,072 -16,464 -22,198 -18,828 -26,654

To run:

./doit --bet-type 3

Typical output:

<snip weekly summary>
     roulette3:
        same as roulette2 but house imposes a max_bet
        max bet is: 200
     
     Weeks          :     52
     Weeks won      :     18 (includes when winnings == 0)
     Weeks lost     :     34
     Total winnings : -25160
     Winnings per week        : avg:     312 (ranged from 0 to 604) 
     Losses per week          : avg:    -905 95% values:   -2163
     Overall                  : avg:  -12936 (ranged from -25160 to 56) 
     Bankroll                 : avg:    -242 95% values:   -1356

Roulette 4

Same as Roulette 2 (again no house limit) but starts with a fixed amount. It continues until you run out of money. I chose $257 so that the doubling of the bet could handle up to 8 times (2^8 = 256).

The result: you're going to lose money, around $5,500. This is substantially less than Roulette 3.

To run:

./doit --bet-type 4

Typical output:

<snip weekly summary>
     roulette4:
        similar to roulette2. but start with fixed amount, stop if you run out
        if you win, reset to the minimum amount. If you lose, double the bet (no house limit).
        initial bank: 257
     
     Weeks          :     52
     Weeks won      :     21 (includes when winnings == 0)
     Weeks lost     :     31
     Total winnings :  -5382
     Winnings per week        : avg:     198 (ranged from 0 to 610) 
     Losses per week          : avg:    -308 95% values:    -536
     Overall                  : avg:   -3165 (ranged from -5520 to -206) 
     Bankroll                 : avg:     205 95% values:    -193

Roulette 5

Start with an initial amount in your right pocket (chose $200) If you win, put the winning in your left pocket to protect it. Play until you run out of cash or you hit 300 times.

The result: you're going to lose money, around $2,000, which is substantially less than Roulette 1.

To run:

./doit --bet-type 5

Typical output:

<snip weekly summary>
     roulette5:
        starts with an initial amount. It plays minimal bet.
        if you win, save the winnings separately. If you lose, keep playing.
        initial bank: 200
     
     Weeks          :     52
     Weeks won      :      9 (includes when winnings == 0)
     Weeks lost     :     43
     Total winnings :  -2030
     Winnings per week        : avg:      16 (ranged from 0 to 46) 
     Losses per week          : avg:     -51 95% values:    -111
     Overall                  : avg:   -1046 (ranged from -2030 to -100) 
     Bankroll                 : avg:     -20 95% values:     -71

- John Arrizza