# I Designed the Perfect Gambling Game, But...

- Mathematics, Business, Game Design

Latest revision:

Back in 2006-07-08, during the 13th Canadian Undergraduate Mathematics Conference at McGill University, I presented a gambling game I designed with the novel property of being both advantageous to players and the house, and that despite this proprety, that pretty much nobody in their right mind should ever consider hosting or playing this game.

This blog post is a revised version of that talk. However, for those that understand French, I have made the original recording and slides of the presentation available online as well.

So, what kind of gambling game are we dealing with anyway?

## The game's rules

This game is a more fleshed-out version of a similar game designed by mathematician Jean-Paul Delahaye as described on pages 11 and 12 of their book *Jeux mathématiques et mathématiques des jeux* (Belin, 1999), which itself appears to be inspired by the St. Petersburg paradox.

Players can join the game at any time, and bet as many times as they want throughout the duration of the game.

Each round has a combined betting limit between all players. The **betting limit** is set at a predetermined amount by the house for first round, and that amount **triples** every time a new round starts. (The betting limit for a given round does not include those of previous rounds.)

Players bet any amount they desire up until the bet limit for the current round is reached, at which point there is a **60% chance** (for example by rolling a fair 10-sided die and checking if the result is 6 or less) for the next round to start, otherwise the game ends.

When the game ends, bets from the last round are losers, and bets from all previous rounds are winners. A winning bet yields **double** the original bet to the player that won the corresponding bet.

## A good bet for everyone?

As a third of the total amount of bets for any given round except the first will be used to pay the winnings for the bets of the previous round at the end of the game, **the house has a guaranteed profit**.

Meanwhile, **on the players' side**, profits are not guaranteed. However, the expected profit for a given bet is 0.6 times the bet minus 0.4 times the bet, which is equal to **0.2 times the bet**. Sounds like a good deal to me!

Maybe... too good even? Since the house has guaranteed profits, and since we're not creating money out of thin air for the players, how does that work? Well, the trick is that *while each individual bet is more likely to be a winner, most bets at the end of the game will be losers*. It's therefore important for a player to be careful in the strategy they use so that combining bets placed on different rounds don't negate their expected profits.

So everything is good, right? I just created the perfect gambling game, and everybody will live happily ever after, right?

## Not so fast

You probably noticed at this point that since the game does not have a fixed ending point, it may go infinite, and thus the house would keep all the money from the players. That wouldn't be good. As such, we should calculate the probability of this event occuring:

Oh, never mind then.

Still, even if there a game has no chance of going infinite, it may still last a long time before enough players get on board to play the game, so we should consider the expected number of rounds a game will require as well, which is:

Huh, so that doesn't appear to be an issue either. Games are expected to end relatively quickly after all.

Alright then, looks like all possible concerns have been investigated and are non-issues! I guess it's utopia time then, baby!

...

...right?

...

...wait, why is the police showing up all of a sudden?

## The real issue

There are only a finite number of potential players, and they only have a finite amount of money available, so even if they were to bet as much as they can, they may still be unable to reach the betting limit of a given round if the game lasts for too many rounds.

As such, it becomes critical to know the expected total amount of all bets required in order to complete a game. If ${l}_{0}$ is the bet limit for the first round, that expected value would be:

...oh.

The inevitable conclusion is that *we end up in a situation where the average game, while only expected to last 2.5 rounds, requires an infinite amount of money to complete*, and until that infinite amount is reached by the recruitment of new players, the game will be stalled forever. However, since there are only a finite number of potential players, and since said potential players only have a finite amount of money available, that average game requirement will never be met.

To put it simply, the catch is that **this game is a pyramid scheme**.

## The collapse

For the rest of this analysis, we will ignore the issue of legality of such a pyramid scheme, and simply analyze the consequences of the possibility of its collapse.

The house would still make a profit regardless of when it collapses, as it can immediately pocket the guaranteed profits as bets are placed. But what would be the best winning strategy for a player then, and how much would they expect to gain or lose?

In order to answer this question, a player would first need to be able to correctly guess the round at which the game will stall indefinitely. This is easier said than done not only due to the various socioeconomic factors affecting players' behavior, but also because the house removes money from the players' total pool for every game completed.

Assuming a player can somehow accurately predict this stalling round correctly however, the question becomes an optimization problem. If round 0 is the first round, ${b}_{r}$ is the player's total bet amount for round $r$ and $m$ is the maximum round that can be reached before the game stalls, then their expected profit is (and simplifying):

It should be obvious now that the effect of each ${b}_{r}$ is independent from each other, and that in order to maximize this formula, each ${b}_{r}$ must either be maximized if the part it affects is positive, or set to 0 otherwise. We can immediately determine that ${b}_{m}$ must be set to 0 due to this. As for the rest, we can solve the following inequality for a given ${b}_{r}$ to determine if it should be maximized:

Note that the last inequality is true because $4<{\mathrm{log}}_{0.6}0.1<5$ and because $r$ is an integer.

In other words, *a player with sufficient funds should invest the maximum amount possible in every round up to 5 prior to the stalling one*.

But why would the house let a player get an edge on them when they could just bet on these earlier rounds themselves to maximize their expected profits? In fact, they can easily do that due to their position as the game's organizer. Interestingly, the resulting game is equivalent to the normal game in which the initial bet limit is ${3}^{m-5}$ times the one originally considered, hence why it didn't really made sense for the house to consider that strategy in the utopic never-stalling scenario. And of course, at this point, since the game will never complete more than 5 rounds, it is no longer advantageous to any player to bet at all.

Therefore, accepting the risk of the pyramid scheme collapsing is **losing** against a house that can correctly predict that moment.

OK, but what if the house does not make that prediction accurately, or does not use it for whatever reason? Well, we could simply re-use the previous formula to get a player's expected profit for an individual game, but in order to properly measure the effectiveness of the optimal strategy, it would be best to consider a player's expected profit for **all** games to be played until the stalling one instead. Unfortunately, *such an analysis is pretty much impossible without additional major assumptions*, as players may compete against each other to place bets, and as the stalling round number is a variable relative to many factors, including the outcome of previous games and socioeconomic factors from outside the game.

What is clear is that the game is... well... terrible.

## Related content I wrote

## A Technical Introducition to MathML Core for Writing Mathematics on the Web

- Programming, Mathematics

Thanks to recent efforts, all major web browsers currently support MathML Core, a subset of MathML focused on important presentation markup, to support mathematics on the web. As of this writing, the MathML Core specifications are still not finalized, but given its strong origins and support, it can…

## Minifying JSON Text Beyond Whitespace

- Programming, Mathematics

JSON is a common data serialization format to transmit information over the Internet. However, as I mentioned in a previous article, it's far from optimal. Nevertheless, due to business requirements, producing data in this format may be necessary. I won't go into the details as to how one could…

## Current Generative AIs Have Critical Quality Issues

- Business, Quality Assurance, Security

The hype for generative AI is real. It is now possible for anybody to dynamically generate various types of media that are good enough to be mistaken as real, at least at first glance, either for free or at a low cost. In addition, the seemingly-creative solutions they come up with, and the…

## Current Data Serialization Formats May Be a Waste of Money

- Programming, Business

Storing data. Transmitting data. Processing data. These fundamental topics of computer science are often overlooked nowadays thanks to the historical exponential growth of processing power, storage availability and bandwidth capabilities, along with a myriad of existing solutions to tackle them. So…

## The Ultimate Maths Cheat Sheet

- Mathematics

The following is a compilation of pretty much every single mathematical topic that I learned throughout my life, covering topics from all levels of education, along with external links for each of them for quick reference. I have compiled this list after extracting all of the relevant information…