I would like to try the following algorithm in order to win in the roulette:
Be an observer until there are 3 same parity numbers in a row ($0$ has no defined parity in this context)
Once there were achieved 3 numbers with the same parity in a row: init $factor$ to be $1$
Bet the next number will be the opposite parity if you were wrong double $factor$ and return
3
elsegoto
1
.
Here is a python code for it - which bring profit all the time:
import random
nums = range(37)
bank = 10**10
games = 3000
factor=1
bet_amount=100
next_bet = None
parity_in_row ={"odd":0, "even":0}
for i in xrange(games):
num = nums[random.randint(0,36)]
if next_bet == "odd":
if num % 2 == 1:
bank += factor*bet_amount
factor = 1
next_bet = None
else:
bank -= factor*bet_amount
factor *= 2
elif next_bet == "even":
if num % 2 == 0:
bank += factor*bet_amount
factor = 1
next_bet = None
else:
bank -= factor*bet_amount
factor *= 2
if num > 0 and num % 2 == 0:
parity_in_row["even"] += 1
parity_in_row["odd"] = 0
elif num % 2 == 1:
parity_in_row["odd"] += 1
parity_in_row["even"] = 0
else:
parity_in_row ={"odd":0, "even":0}
if parity_in_row["odd"] > 2:
next_bet = "even"
elif parity_in_row["even"] > 2:
next_bet = "odd"
else:
next_bet = None
print bank
- If I did the calculation correctly the probability to have 4 numbers in a row with the same parity $ < (1/2-\epsilon)^4 $ [where $\epsilon < 1/36$ is a compensation for the probability to achieve $0$].
- Keep doubling $factor$ ensures you will have positive expectation, right?
- Isn't the probability of getting odd number is $0.5$ ? since $Prob(odd | even, even, even) = \frac{1}{2}$ ?
Please try to supply a rigorous proof why it is wrong, and try to explain why my python code always return with a positive outcomes