The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Wednesday, June 15, 2005

Gold fever

Many years ago while I was working in college, working part time at IBM and living at home (meaning: having fun, making an insane amount of money for a college student with no real expenses) I was invited to a poker game by some friends of a friend. The fact that I had (and still don't have) a mind for cards nor what hands beat what hands in poker was no deterrent (mistake numero uno)—in fact, I was made quite welcome.

So I arrived at the game with quite a bit of my weekly paycheck in the form of liquid cash (mistake number two). I bought into the relatively low stakes game and off we went.

And for my first poker game, I was quite lucky with the cards (mistake number three). Made some profit and quickly stuff it into my wallet (mistake number four) and continued playing.

Of course as the game ran on I ran out of money on the table. Not a problem, I thought. I'll just take some of the money I just made at poker and use that (mistake number five, and of all the mistakes, this was the biggest one).

Time passes. Money passes from my side of the table. Money passes from my wallet (it's still won money) onto the table. Time passes. Money passes from my side of the table. Money passes from my wallet (it's still won money). Lather, rince, repeat. Reach into my wallet to find a lone $5 bill.

It was not a pleasant feeling knowing one has just increased the liquidity of others, especially when those others are people I don't even know.

From that point on, I made a conscience decision never to gamble, especially poker. It's an expensive vice, and frankly, there are other vices that are just as expensive but more pleasurable (just as long as you can keep your kidneys).

Of course, of everybody I know, I'm the one that's been to Las Vegas the most.

Of course.

And I'm headed there again next month.

My friend Hoade is writing yet another novel, a good portion of which takes place in Las Vegas, so he's going out there for research. And he wants a guide, having never been there. And as the only person he knows that's been there, I get to be his guide and mentor to the experience that is

VIVA LOST WAGES!

During the planning of the trip the topic of a tax break for the smart gambling came up and where the only two games one can make money are blackjack (but only if you count cards and take a risk of being politely thrown off the roof by casino security if they catch you) and poker (where, since you're playing against other players, not the house). And then roulette.

A wheel with 38 slots (American—European has 37) numbered 1 through 36, half of which are red, the other half black, with 0 and 00 (both of which are green). The payoff is based around a wheel with 36 slots, so the addition of two slots (0 and 00) give the house a 5.26% edge over the long term (although there is one bet you can make that gives the house a 7.89% edge).

And there are more systems to play roulette than any other house table game, trying to get around that house edge (the European wheel, with only 37 numbers, has a house advantage of 2.63%).

I know this.

I got enough of this from my Dad (who works in a casino) and from several general math books to know this.

And yet, that didn't stop me from spending the past few days coming up with a roulette system and testing it against a roulette simulator I wrote.

I'm not exactly sure what prompted me to do this, but I did, and I came up with a system that my simulator showed as giving me an edge over the house. A long term edge over the house.

Not only did I come up with the Holy Grail of roulette systems, but a Holy Grail roulette system with a

13.16% edge over the house!

Of course I looked for flaws in the code.

Sure, I found a few, but that 13.16% edge was still there.

Hoade was skeptical—heck, I was skeptical and asked around a bit for help, but no one here knows 1) enough statistics and probability to point out the error, 2) enough programming to point out the error and 3) enough about roulette to point out the error (other than “there's a house edge—you've really beat it?”). Hoade ended up playing a free online version of the system I came up with, and between clarifications in email, reported back that he wasn't seeing the expected payouts.

Meanwhile, I was busy with the simulator, generating data and making numerous graphs (gnuplot rocks) of expected payouts and bankroll over time and testing the simulator.

I'd run, say, 1,000,000 spins betting black, and sure enough, there's the house edge of 5.26% (give or take a tenth of a percent). Another million runs betting column 3 (house edge of 5.26%). Or the five number bet (house edge of 7.89%). Then I do my system and see that magical edge of 13.16% towards me, and the bankroll reaching skyward.

It was very hard not to get caught up in this. I mean, people are happy with a 10% ROI with regular investing, here I'm getting a bit over 13% for just sitting in a noisy casino, placing bets for black, odd, 1-18, column 3 and the Five Number bet per spin of the wheel for hours on end. How can you not get caught up?

By knowing my system doesn't work, that's how (but I get ahead of myself).

I eventually talked to my Dad, given that he works at a casino and all. I found out that I know a bit more about roulette than Dad does, but he did give me some valuable hints (“Roulette is an old game, and if there was any way to beat the house, it would have been exploited by now,” was one. “Roulette wheels always have a bias—you're not taking that into account in your simulator, are you?” was another).

It was the hint to include some bias into the wheel that shed light onto my system. I added a slight bias to the area of the wheel that has the lowest payout in my system (the numbers 32 and 34 are the only two numbers where I loose all five of my bets) and I still come out ahead.

Okay, increase the bias, and I still come out ahead.

Okay, increase the bias such that the ball will always land on a spot where I should loose the perverbial skin off my back.

I'm still coming out ahead.

Other bets like black, or odd, you can see the bias.

So I went through the code more carefully this time. Okay, the bet for odd was actually an even bet (but the payouts are the same, so I didn't notice). And the bet for column 3 was for column 1 (but again, the payouts are the same, so it was hard to notice). And the bet for low would always add to the winnings, dispite what happened (and not too surprisingly, this was one bet I didn't bother testing, and of course, always adding to the winnings would give one an edge).

Once fixed, I saw the Holy Grail of roulette systems come crashing down to an edge of 5.79%.

In favor of the house.

Sigh.

But it does explain one bit. Earlier in an email exchange with Hoade, I drew up a table of wins vs. loss for every possible combination of bet and number (38 numbers, five bets each). But when I first tabulated the results, it didn't jibe with what my (at the time, incorrect) simulator said (and I know realize that my initial tabulation by hand was correct), so I did what any self-respecting person would do—I fugded the results until it at least jibed in the general direction of my simulator (in fact, my jibes overstated the winnings by a factor or two, but).

So much for wealth at the expense of casinos.

And this time, I swear I'm giving up gambling.

Obligatory Picture

[It's a study in contrasts—digital camera contrasts]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2018 by Sean Conner. All Rights Reserved.