Simulating outcomes of Black & Red roulette game series

This one might be off the point a little bit but I was really surprised how many people have tried and burned with this crazy Casino strategy. Well I hope most of people visiting my blog wouldn’t even attempt to outplay Casino but in case You were wondering how to test your “strategy” for outplaying Casino let’s see an example Black & Red roulette game strategy.

The Back & Red strategy

The main principle is very simple – You bet on either Red or Black and stick with it until You win. To cover the losses You double your bet after each loss. That’s it. Simple as that and that’s what should make anybody doubt the strategy. Clearly the strategy to win Casino must be as difficult as rocket science. Let’s test it.

The code

Let’s calculate what would be the average outcomes of this strategy.

import random
import pandas as pd
import matplotlib.pyplot as plt

oMoney = float(input("How much money would You gamble on Black & Red strategy?\n"))
oBet = float(input("What's your starting bet?\n"))
y = int(input('How many simulations shall we run?\n'))

bet = oBet
playerChoise = ['Red','Black']

player = random.choice(playerChoise)
casino = ''

result = ['Red','Black','Zero']
prob = [18/37,18/37,1/37]
totalFigs = []

print("\nStarting the game simulation:\n")
x = 1
moneyPlot = []

while x < y: 
    if (100*x/y)%1 == 0: 
        print('Running simulation: {}%'.format(round(100*x/y))) 
    
    maxMoney = 0.00 
    maxBet = 0.00 
    rounds = 0 
    bigLoss = 0.00 
    money = oMoney 

    while money > 0:
        rounds += 1
        casino = random.choices(result, weights=prob)
        win = casino[0] == player

        if win:
            money = money + bet

            if bet>maxBet:
                maxBet = bet

            bet = oBet

            if player == 'Red':
                player = 'Black'
            else:
                player = 'Red'

        else:
            money = money - bet

            if bet > bigLoss:
                bigLoss = bet

            if bet * 2 <= money: bet = bet * 2 else: bet = money if money > maxMoney:
            maxMoney = money

        moneyPlot.append([rounds, money])
        
    totalFigs.append([maxMoney, maxBet, bigLoss, rounds])
    x+= 1
    
print('Running simulation: 100%')

results = pd.DataFrame(totalFigs, columns=list(['MAX money','Biggest Loss','MAX bet','Rounds']), dtype='float64')
results['Rounds'].astype('int64')

temp = pd.DataFrame(moneyPlot, columns=list(['T','Money']))
mPlot = temp.groupby('T')['Money'].mean()

print('\nOn average players lose their money in {} rounds.\
     \nHighest increase in player total money is around {}% and bet won by {}% \
     while largest bet lost by {}%\n'.format(round(results['Rounds'].mean()),\
     abs(round(100*(1-results['MAX money'].mean()/oMoney))),\
     abs(round(100*(1-results['MAX bet'].mean()/oBet))),\
     abs(round(100*(1-results['Biggest Loss'].mean()/oBet)))))

print('Overall STDs per measurements: \nTotal money pool: {}% \nLargest won bets: \
     {}% \nLargest lost bets: {}%\n'.format(abs(round(results['MAX money'].std())),\
     abs(round(results['MAX bet'].std())),abs(round(results['Biggest Loss'].std()))))

print('\nMax rounds in single simulation: {}'.format(temp['T'].max()))

plt.plot(mPlot)
plt.ylabel('Money pool')
plt.xlabel('Rounds')
plt.show()

The outcomes

In order to get more or less reliable data let’s run 100k tests for 1k buks betting 5 each time. After some serious calculations I got these results:

On average players lose their money in 1322 rounds. 
Highest increase in player total money is around 267% and bet won by 30148% while largest bet lost by 19279%

Overall STDs per measurements: 
Total money pool: 28843% 
Largest won bets: 12191% 
Largest lost bets: 8577%

After these runs I did another round of 100k simulations just to check if result are significantly different. This is what I got on my second trial:

On average players lose their money in 1182 rounds. 
Highest increase in player total money is around 236.0% and bet won by 27509.0% while largest bet lost by 17923.0%

Overall STDs per measurements: 
Total money pool: 11194% 
Largest won bets: 4260% 
Largest lost bets: 3550%

To put the money pool movements graphically:

So let’s read the results:

  • If You are about to gamble 1k USD You should have at leastĀ 1375,45 USD (5 USD bet x 27509% bet increase) to save your ass if things go south.
  • be mentally prepared to loseĀ 963,95 USD (5 USD bet x 19279% lost bet) or more since these are only averages.
  • You should quit while you’re not losing which would inevitably happen at around thousand rounds.
  • I must admit that our standard deviation and winnings by color measurements look shady so I wouldn’t draw conclusions out of them.

One other thing that I wanted to check – do outcome numbers change if my cash changes. Meaning, if I have 10 grand instead of one or if I have only 100 buks to gamble but I am still a big chicken and will bet 5 as my initial bet. As we saw from previous results the bet significantly increases anyway.

So let’s see this in more detail.

Having 10x the cash

This time we will gamble away 10 000 dollars. How fast can we lose 10k USD?

On average players lose their money in 9417 rounds. 
Highest increase in player total money is around 187% and bet won by 234982% while largest bet lost by 146640%

Overall STDs per measurements: 
Total money pool: 50683% 
Largest won bets: 19818% 
Largest lost bets: 15165%

Let’s try one more time just to see if result significantly changes:

On average players lose their money in 9882 rounds. 
Highest increase in player total money is around 195% and bet won by 243794% while largest bet lost by 154494%

Overall STDs per measurements: 
Total money pool: 90263% 
Largest won bets: 38091% 
Largest lost bets: 25161%

So let’s read the results:

  • If You are about to gamble 10k USD You should have at least 12 189,70 USD (5 USD bet x 243794% bet increase) to save your ass if things go south.
  • be mentally prepared to lose 7 724,70 USD (5 USD bet x 154494% lost bet) or more since these are only averages.
  • You should quit while your not losing which would inevitably happen at around nine thousand rounds.

How long 100 dollars last in roulette?

This will be more realistic since I wouldn’t consider gambling on more than 100 dollars if I have 0% chance to get ahead of the game.

On average players lose their money in 175 rounds. 
Highest increase in player total money is around 342.0% and bet won by 3541.0% while largest bet lost by 2220.0%

Overall STDs per measurements: 
Total money pool: 1971.0% 
Largest won bets: 771.0% 
Largest lost bets: 538.0%

and another round of simulation for comparison:

On average players lose their money in 172 rounds. 
Highest increase in player total money is around 338.0% and bet won by 3521.0% while largest bet lost by 2223.0%

Overall STDs per measurements: 
Total money pool: 2380.0% 
Largest won bets: 949.0% 
Largest lost bets: 692.0%

So let’s read the results:

  • If You are about to gamble 10k USD You should have at least 177,05 USD (5 USD bet x 3541% bet increase) to save your ass if things go south.
  • be mentally prepared to lose 111,15 USD (5 USD bet x 2223% lost bet) or more since these are only averages.
  • You should quit while your not losing which would inevitably happen at around nine thousand rounds.

Conclusions

First of all I must admit that this test has turned out to be a fail at this stage. More work on it is needed to get statistically significant outcome but I since this wasn’t really a project I wanted initially to spend nearly as much time as I have already, I will call it quits here and ask You to comment if You have any advice how to make this simulation more accurate and memory efficient. Currently this model is eating a lot of memory and I am not 100% sure about the outcomes as it suggests that we can win money with this strategy although it’s not true in reality.

Having that said, here’s what we can conclude here:

  • Amounts of winnings and losses are have a strong positive correlation with money being gambled – if we gamble more money we get higher losses and winnings percentage wise.
  • We can expect that at some point our bets will be higher than the amount of money we wanted to gamble. So we would need to have at least as much money to spare as we have to gamble in order to win this game. And also be willing to go all in to come out clean.
  • The amount of rounds to lose all our money is also increasing with increased money pool and increasing bet decreases the amount of rounds needed to lose all your money.

Last notes

While these simulations show that there is theoretical chance of winning significant amount of money keep in mind that You have to be rather crazy and willing to go all in. Also, You would have to have strong discipline and a lot of extra cash for this to have realistic probability to work.

Leave a Reply

Your email address will not be published. Required fields are marked *