Sunday, December 14, 2014

Spinning the wheel: clustering and near misses

The previous post showed a simple model casinos use to manipulate the odds. Instead of relying on the physical wheel for randomness, they rely on a virtual list of indexes that maps to the physical wheel.

Using that same model, it's easy to fiddle with the virtual indexes so that they map to misses right next to the winning pocket, creating "near misses". "Near misses" make players feel less like losing, since you "almost won". Casinos use this technique to get the next spin out of you.

Let's create more specific labels - a label for each individual pocket.

The winning pocket is in the physical wheel at index two. We need the virtual indexes to make clusters next to the winning label. Four indexes map to Miss2, one maps to Win and three map to Miss3. We intentionally ignore Miss1.


Spinning the wheel one million times reveals the pattern; Miss1 gets ignored, while we hardly ever win but very often "just" miss.

Since the law states that randomness and visualization are two separate concepts, casinos are free to operate in this gray zone, as long as randomness stays untouched.

Thursday, December 11, 2014

Spinning the wheel: manipulating the odds

The previous post defined a basic set of data structures and functions to spin a wheel of fortune in F#.

There was very little mystery to that implementation though. The physical wheel had four pockets and spinning the wheel would land you a win one out of four spins. As a casino, it's impossible to come up with an interesting payout using this model.

To juice up the pot, casinos started adding more pockets to the wheel of fortune. This meant that the odds were lower, but the possible gain was higher. More pockets also allowed casinos to play with alternative payouts, such as multiple smaller pots instead of one big one.

Adding pockets to the wheel didn't turn out the way casinos hoped for though. Although players were drawn to a bigger price pot, they were more intimidated by the size of the wheel - it was obvious that the chances of winning were very slim now.

Today, instead of having the physical wheel determine randomness, randomness is determined virtually.

Casinos now define a second set of virtual indexes that map to the indexes of the physical wheel.


There are seven virtual indexes; six map to a miss pocket and only one maps to a win pocket - one out of seven is a win.

Instead of picking a random index in the physical wheel, we now pick a random index in the virtual indexes and map that back to an index in the physical wheel.

When we now spin the wheel a million times, the outcome is different. Although the physical wheel has four pockets, we now only win one out of seven times or 14% of the time.

Using this technique, the physical wheel only serves for interaction and visualization. Randomness is determined virtually, not physically.

In my next post, I'll describe how casinos have tweaked this model to create "near misses", making players feel as if they just missed the big pot.

Tuesday, December 9, 2014

Spinning the wheel

In this post, I'll define a basic set of data structures and functions to spin a wheel of fortune. In the next post, I'll show you the simple model casinos use to build a bigger, more attractive pot, without touching the physical wheel and without losing money. Finally, I'll show you how casinos tweak that model to bend the odds and create near misses.


Let's say we have a physical wheel with four pockets, which are labeled either miss or win.

Three out of four pockets are labeled as a miss, one is labeled as a win. This makes the odds to win one out of four, or 25%.

Spinning the wheel, we should end up in one of four pockets. We can do this by picking a random index of the physical wheel.

To avoid a shoulder injury spinning the wheel multiple times, we'll define a function that does this for us instead.

Now I can spin the wheel one million times.

If the math adds up, we should win 25% of the time. To verify this, we'll group the results by label and print them.

Give or take a few hundred spins, we're pretty close to winning 25% of the time.

When the odds are this fair, it's impossible to come up with an attractive enough payout without the casino going broke. What if we wanted to advertise a bigger pot, while keeping the same physical wheel, without losing money? Tomorrow, I'll write about the simple model casinos have been using to achieve this.