Roulettingale
February 5, 2015
The Idea
Track and visualize series of attempts to use the martingale betting system in Roulette.
I recently learned of the Martingale betting system and how it's one of the popular betting systems used in roulette. I've always been a fan of number systems, especially ones that involve wagering: stocks and gambling.
There are some decent roulette apps for iOS and the Mac so I'm going to run a series of tests using the system, record data, and visualize it.
Manual Data Collection… yuk
This is all manual and I'll use a couple of different apps to get different results. I've been using an app on iOS called
Roulette - Casino Style
and I've already noticed a couple of patterns where it repeats numbers after a win.
I do have some concerns about using these apps because they offer in-app purchases. While the odds alone would lead to plenty of purchases, it certainly seems like it would be easy to program some occasional lose streaks to help out.
In my first day of testing, my longest losings streaks came from only betting black and using the system. I'll test more to see if that is normal.
What to Observe
I want to know a few things:
-
How does it work over a long series of spins?
-
How does it perform over short sessions with a goal of 10 wins?
-
What bankroll would be necessary to complete the worst session?
-
What bankroll would be necessary to complete the average session?
-
What casino stakes allow for the worst session to be completed?
-
What casino stakes allow for the average session to be completed?
The First Sessions
I believe that this is what I want to know and display about individual sessions. This part tells the important part of the data:
Can you successfully win 10 times your minimum wager within the stakes?
If so, how much of a bankroll was necessary to achieve it and how many rolls did it take?
(It seems you can get in 35 - 112 spins per hour depending on the number of players.
Reference )
Session 001
- Winnings
- 10x
- Spins
- 16
- Max Bet
- 4x
- Min Bankroll
- 7x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 002
- Winnings
- 10x
- Spins
- 21
- Max Bet
- 8x
- Min Bankroll
- 15x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 003
- Winnings
- 10x
- Spins
- 17
- Max Bet
- 4x
- Min Bankroll
- 7x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 004
- Winnings
- 10x
- Spins
- 31
- Max Bet
- 128x
- Min Bankroll
- 255x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, No
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 005
- Winnings
- 10x
- Spins
- 21
- Max Bet
- 16x
- Min Bankroll
- 31x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 006
- Winnings
- 10x
- Spins
- 22
- Max Bet
- 16x
- Min Bankroll
- 31x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 007
- Winnings
- 10x
- Spins
- 19
- Max Bet
- 4x
- Min Bankroll
- 7x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session 008
- Winnings
- 10x
- Spins
- 21
- Max Bet
- 32x
- Min Bankroll
- 63x
- Mirage ($25 - $20,000) (800, 400, 200)
- Yes, Yes, Yes
- Mirage ($100 - $20,000) (-, -, 200)
- -, -, Yes
- MGM ($25 - $10,000) (400, 200, 100)
- Yes, Yes, Yes
- Beau Rivage ($10 - $15,000) (600, 300, 150)
- Yes, Yes, Yes
Session Spins and Bets
I'm recording each spin and bet as well. While these aren't useful in answering the questions, they'll make for some interesting visualizations. I'll also need to learn how to compile and compare data sets, which is one of the goals of this little project.
Colors
I searched for
roulette
and
casino
on
colourlovers.com
and found a few options that I dig.
Graphs
This is a loose example, but I'm thinking of plotting the rolls like this with the 00 through 36 on the Y axis and the X axis showing spin count and bet amount.
Chartist gets closer to showing it, albeit with the usual range problem which I'll need to solve with d3 instead.
February 6, 2015
Got a big JSON going and spewing out data. Let's get it on.
February 7, 2015
I went with the first color scheme, Casino Royale, and began adding some styles. I think this is a good time to learn some flexbox. I want some things vertically centered and I want the sidebar with information to have a different color background. The 2 columns are uneven and can vary as to which one is longer. There are hacks for that in the grid but I'd rather just learn flexbox since this is a side project and I'm not worried about people seeing it or what browser they're in.
I'm doing a weird combination of Middleman math and JS math to get the values. When I do a session, I've started recording them as single unit values. Ultimately, I want to show the results for multiple bet amounts: $25, $50, $100, maybe $200. For now, I got it working at $50 and I'll work out how to make it more flexible when I'm ready.
February 8, 2015
The beautiful thing about working with existing data to create the designs is that the data dictates the needs. Before collecting and organizing, I imagined that a scatter chart showing all of the numbers would be interesting. While it may look interesting visually, it doesn't have much impact on the proofing that I'm doing. In this case, I really don't care about what numbers are there. I only care what category they are in, with categories being an available even-money bet type: 1-18, 19-36, odd, even, black, red. I'm not recording this information, but that's just because it's so much more effort and leaves room for error. I'll be using Middleman for this, comparing the individual number against a set of numbers. I'll get a rough version working with template logic and then bug Drew for how to write it better.
Streaks are another thing of interest. They are the best or the worst thing that can happen to a session. A streak of wins is good, a streak of losses is bad. Right now, I can't get these at all. I'll need the results of the checks on the numbers to then identify streaks. Not sure how that will happen yet, but I'll work it out once I can see them.
Hitting a wall
I have this data, but I don't know how to extract certain bits out of it. These things are easily done manually, but I want to do them programmatically. I want to be able to programmatically show what category of bet a spin number is and then graph the results of those.
At this moment, I can't achieve that even with data that I do have recorded. In a session, I want to divide the numbers into their bet categories and graph opposing categories: Red vs. Black, Even vs. Odd, 1-18 vs. 19-36. I can create a table with some really complex if statements, but thinking that this may be a scenario where I have to combine Middleman and d3.
You can see the results and the streaks here, but I also want them in graphs. This is a start, though, so I'm going to put these in. Visually, the check and the 'x' aren't big enough to follow cleanly so I'll do them in a different way.
Number |
Red |
Black |
Even |
Odd |
1-18 |
19-36 |
27 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
26 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
26 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
21 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
8 |
✘
|
✓
|
✓
|
✘
|
✓
|
✘
|
33 |
✘
|
✓
|
✘
|
✓
|
✘
|
✓
|
21 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
32 |
✓
|
✘
|
✓
|
✘
|
✘
|
✓
|
13 |
✘
|
✓
|
✘
|
✓
|
✓
|
✘
|
34 |
✓
|
✘
|
✓
|
✘
|
✘
|
✓
|
29 |
✘
|
✓
|
✘
|
✓
|
✘
|
✓
|
26 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
21 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
32 |
✓
|
✘
|
✓
|
✘
|
✘
|
✓
|
21 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
33 |
✘
|
✓
|
✘
|
✓
|
✘
|
✓
|
Number |
Red |
Black |
Even |
Odd |
1-18 |
19-36 |
22 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
22 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
11 |
✘
|
✓
|
✘
|
✓
|
✓
|
✘
|
16 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
16 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
2 |
✘
|
✓
|
✓
|
✘
|
✓
|
✘
|
36 |
✓
|
✘
|
✓
|
✘
|
✘
|
✓
|
22 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
13 |
✘
|
✓
|
✘
|
✓
|
✓
|
✘
|
15 |
✘
|
✓
|
✘
|
✓
|
✓
|
✘
|
29 |
✘
|
✓
|
✘
|
✓
|
✘
|
✓
|
2 |
✘
|
✓
|
✓
|
✘
|
✓
|
✘
|
34 |
✓
|
✘
|
✓
|
✘
|
✘
|
✓
|
4 |
✘
|
✓
|
✓
|
✘
|
✓
|
✘
|
26 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
12 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
9 |
✓
|
✘
|
✘
|
✓
|
✓
|
✘
|
16 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
21 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
16 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
28 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
Number |
Red |
Black |
Even |
Odd |
1-18 |
19-36 |
9 |
✓
|
✘
|
✘
|
✓
|
✓
|
✘
|
18 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
19 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
24 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
3 |
✓
|
✘
|
✘
|
✓
|
✓
|
✘
|
16 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
5 |
✓
|
✘
|
✘
|
✓
|
✓
|
✘
|
3 |
✓
|
✘
|
✘
|
✓
|
✓
|
✘
|
19 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
35 |
✘
|
✓
|
✘
|
✓
|
✘
|
✓
|
7 |
✓
|
✘
|
✘
|
✓
|
✓
|
✘
|
22 |
✘
|
✓
|
✓
|
✘
|
✘
|
✓
|
14 |
✓
|
✘
|
✓
|
✘
|
✓
|
✘
|
17 |
✘
|
✓
|
✘
|
✓
|
✓
|
✘
|
19 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
19 |
✓
|
✘
|
✘
|
✓
|
✘
|
✓
|
10 |
✘
|
✓
|
✓
|
✘
|
✓
|
✘
|
Digging this
Seeing this in action, I think it's something that I'll want to keep (in addition to visualizing the percentages. It's really interesting and important to betting to see the streaks. Identifying long streaks allows to show how bad it couldn't have gotten in any one session.
jQuery length will get me a lot of what I want so I'll probably start with that. Now that all of this stuff exists in the DOM I can loop over it pretty easily. One quick example is the number of times a number was 1-18 occurred in the first set. I chose this one because it's insanely low.
examplePos = $('.js-id001 .js-n-118 .positive--a').length;
exampleNeg = $('.js-id001 .js-n-118 .negative--a').length;
exampleTot = examplePos + exampleNeg
examplePosPer = examplePos / exampleTot
exampleNegPer = exampleNeg / exampleTot
$('.example-positive').append(examplePosPer)
$('.example-negative').append(exampleNegPer)
Ready for Charting
As usual, getting the data in helped make decisions. Once I could see the percentages I realized that they're not as important. They'll make for a good graph (maybe a donut chart), but seeing the spin counts make things more apparent. It's awesome to see 009, which was a perfect session.
Bankroll Tables
I've had this in a spreadsheet for reference but I'd rather have it here since I can see the streaks visually now.
Losses |
Bets |
Bankroll |
Bets |
Bankroll |
Bets |
Bankroll |
1 |
25 |
25 |
50 |
50 |
100 |
100 |
2 |
50 |
75 |
100 |
150 |
200 |
300 |
3 |
100 |
175 |
200 |
350 |
400 |
700 |
4 |
200 |
375 |
400 |
750 |
800 |
1500 |
5 |
400 |
775 |
800 |
1550 |
1600 |
3100 |
6 |
800 |
1575 |
1600 |
3150 |
3200 |
6300 |
7 |
1600 |
3175 |
3200 |
6350 |
6400 |
12700 |
8 |
3200 |
6375 |
6400 |
12750 |
12800 |
25500 |
9 |
6400 |
12775 |
12800 |
25550 |
25600 |
51100 |
10 |
12800 |
25575 |
25600 |
51150 |
51200 |
102300 |
11 |
25600 |
51175 |
51200 |
102350 |
102400 |
204700 |
12 |
51200 |
102375 |
102400 |
204750 |
204800 |
409500 |
13 |
102400 |
204775 |
204800 |
409550 |
409600 |
819100 |
14 |
204800 |
409575 |
409600 |
819150 |
819200 |
1638300 |
15 |
409600 |
819175 |
819200 |
1638350 |
1638400 |
3276700 |
February 8, 2015
Drew fixed my two problems in minutes, like usual. For the ternary operator on classes, I just wasn't supposed to keep the word "if".
span{ class: (sp.result == 'l' ? 'negative' : 'positive') }
The comparisons are a bit more complicated. I need to set up a JSON with an array to compare to. It makes total sense, but I wouldn't have thought to do it on my own.
Cha cha cha changes
Changing up one small thing and one significant thing. I'm going to display the sessions in reverse order. When I add a new one it's silly to have to scroll past them all. The bigger thing is longer sessions.
In 15 sessions, the biggest bet was $6,400. While that was the last bet before disqualfying the MGM limits, there was one additional bet left for each of the others. It's time to push the system for some sessions to see where it breaks.
It didn't affect the session outcome because I was betting a new bet every time in rotation, but it had a 9 loss streak that would have made it impossible to bet the necessary amount at any of the casinos. With 9 losses, you need to be able to bet $25,600 but the most lenient allows for $20,000.
With a $20k cap, you'd have $45,550 invested and would win $40,000. The cap causes a $5,550 loss.
With a $10k cap, you'd have $22,750 invested and would win $20,000. The cap causes a $2,750 loss.
With a $15k cap, you'd have $40,550 invested and would win $30,000. The cap causes a $10,550 loss.
Imagine if you lost the max bet!
The $15k is clearly the worst loss, but you get to last one extra loss in that and the $20k. 8 losses in a row guarantees a financial loss at a $10k cap, 9 losses guarantees a financial loss at $15k and $20k caps.
February 10, 2015
Moving on to a new version:
Why
The purpose was to determine if it was possible to achieve a small number of wins before hitting a point in which the betting caps would force a loss. It's a small sample, but it is. In 20 sessions, the profit was $11,250. At this point, hitting the max bet but winning would still result in a profit. Hitting a the max bet is a whole other level of hurt.
More importantly, I'm now fascinated with other things in the numbers and I want to revamp what I'm showing. For one, I need 0 and 00 in the data. I'm comparing percentages of rolls incorrectly without them. Additionally, every time a set is completed there are 2 other winning sets. These can be compared as well to indicate how the bet decisions affected the outcome. Basically, there's a lot more data to dive into and it'll requre a new design. I really want to keep this version, though, to show what I learend. This is v1, onto v2.