Coin Operator

Coin Operator

July 2026 ยท 14 min read

Photo of the casino room in Blue Prince.

Every Wednesday night, my wife leaves the house to get a reprieve from the chaotic boy energy that swirls around her. I am very grateful for the fact that, to date, she has always returned home.

In the interim, my sons and I have instituted a tradition known as "boys' night." After we've eaten dinner and put the trash bins out, we park it on the couch and play a video game together. They are big fans of Metroidvanias, but I try to throw some puzzlers in there as well.

A couple of months ago, we started playing Blue Prince. The game was met with critical acclaim when it was released last year, and it had been on my radar for a while as one the three of us could work through together.

In case you don't know much about the game, the premise sounds simple. You play as a young boy whose great uncle has died. You arrive at your great uncle's large estate because it has been bequeathed to you, subject to one condition: you need to find a hidden 46th room in the 45-room mansion. Here's a short trailer if you'd like to see more.

The premise is just the tip of the iceberg. We reached the 46th room months ago, but are still diving back in to uncover more secrets and solve more puzzles.

To keep things spoiler-free, that's all I'll say about the game's story. From here, I'll focus on one room in particular, and some delightful mathematics therein. The only thing I need to reveal is a description of the room; beyond that, you can read through this story without fear of me spoiling anything about the game.

Let's go!


Casino Night

One of the rooms in the estate is a casino. There are a couple of different games of chance you can play using the in-game currency. The one we'll discuss here is a slot machine.

In Blue Prince, slot machines have 4 slots, and there are a total of 8 images that can be drawn. Here are the rules for how the payouts work. The game has real art; I'm using the closest emoji to the actual symbols in the game's slot machine.

SymbolsPayout
๐ŸŸก ๐ŸŸก ๐ŸŸก3
๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก5
๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ9
๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ15
๐Ÿ€10 each
2๏ธโƒฃ2x amount
๐Ÿsets total to 0
๐Ÿฅ…3 for each snake
๐Ÿ‘‘ ๐Ÿ‘‘ ๐Ÿ‘‘ ๐Ÿ‘‘100
Payout rules for the slot machine in Blue Prince. The one symbol missing, a dash mark, has no effect on payouts.

As with any other game of chance, a natural question arises here: if we spend a coin to play the slot machine, how much money do we expect to get back? This depends, of course, on the likelihood of each icon appearing. For example, a slot machine with a 100% probability of spitting out four crowns would be great economically, but not a very compelling game design.

Fortunately for us, intrepid players have already gathered a wealth of experimental data on this game. For purposes of today's analysis, we will assume that the probabilities of each symbol are as follows:

SymbolSymbol NameProbability
๐ŸŸกCoin31.5%
โž–Dash28.0%
๐ŸSnake10.0%
๐Ÿ’ฐ3 Coins9.0%
2๏ธโƒฃDouble9.0%
๐Ÿ‘‘Crown8.0%
๐Ÿฅ…Net4.0%
๐Ÿ€Clover0.5%
Probability of each symbol in the slot machine.

Using these values as our source of truth, we can now properly analyze the game.


One Armed Bandit

Before we dig into the analysis, I thought you might enjoy playing the slots for yourself. Don't worry, this version is provided completely pro bono. It does, however, track how much you would have spent had you been charged one coin per play.

Play SlotsView History
โ”
โ”
โ”
โ”
Cost
0
Payout
โ€“
Pull the machine as many times as you want. It'll record how much you spend and how much you earn with each round.

Play this for a while, and you'll probably come away feeling ripped off. After 100 pulls, I had spent 100 coins but only won 52, mostly from the three single coin payouts or sometimes from a snake / net combo.

But we can do better than taking an experimental approach. The universe of results with payouts is actually relatively small, so we can enumerate them all, and calculate their payouts and probabilities.

If you'd like to try calculating any of this on your own, be my guest. Don't scroll any further until you're ready to see the results. For the rest of you, here's a table with every possible positive payout along with its likelihood when you do a fresh pull.

Winning CombinationPayoutProbability
๐ŸŸก ๐ŸŸก ๐ŸŸก36.13%
๐Ÿ ๐Ÿฅ…32.96%
๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก50.985%
๐ŸŸก ๐ŸŸก ๐ŸŸก 2๏ธโƒฃ61.13%
๐Ÿ 2๏ธโƒฃ ๐Ÿฅ…60.678%
๐Ÿ ๐Ÿ ๐Ÿฅ…60.377%
๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ90.208%
๐Ÿ ๐Ÿ ๐Ÿ ๐Ÿฅ…90.0160%
๐Ÿ€100.979%
๐Ÿ 2๏ธโƒฃ 2๏ธโƒฃ ๐Ÿฅ…120.0389%
๐Ÿ ๐Ÿ 2๏ธโƒฃ ๐Ÿฅ…120.0432%
๐ŸŸก ๐ŸŸก ๐ŸŸก ๐Ÿ€130.0625%
๐Ÿ ๐Ÿ€ ๐Ÿฅ…130.0377%
๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ150.00656%
๐Ÿ ๐Ÿ ๐Ÿ€ ๐Ÿฅ…160.00240%
๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ 2๏ธโƒฃ180.0262%
๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ’ฐ ๐Ÿ€190.00146%
๐Ÿ€ ๐Ÿ€200.00972%
๐Ÿ€ 2๏ธโƒฃ200.350%
๐Ÿ ๐Ÿ€ ๐Ÿ€ ๐Ÿฅ…230.000120%
๐Ÿ ๐Ÿ€ 2๏ธโƒฃ ๐Ÿฅ…260.00432%
๐Ÿ€ ๐Ÿ€ ๐Ÿ€300.0000403%
๐Ÿ€ ๐Ÿ€ ๐Ÿ€ ๐Ÿ€400.0000000625%
๐Ÿ€ ๐Ÿ€ 2๏ธโƒฃ400.00217%
๐Ÿ€ 2๏ธโƒฃ 2๏ธโƒฃ400.0391%
๐Ÿ€ ๐Ÿ€ ๐Ÿ€ 2๏ธโƒฃ600.00000450%
๐Ÿ€ ๐Ÿ€ 2๏ธโƒฃ 2๏ธโƒฃ800.000121%
๐Ÿ€ 2๏ธโƒฃ 2๏ธโƒฃ 2๏ธโƒฃ800.00146%
๐Ÿ‘‘ ๐Ÿ‘‘ ๐Ÿ‘‘ ๐Ÿ‘‘1000.00410%
Payouts and probabilities for each result with a positive payout.

Note that these are all mutually exclusive by construction. For example, the probability of getting three single coins is listed as 6.13%. This is the probability of getting exactly this outcome with a payout of 3; in other words, the fourth symbol must be a dash, crown, money bag, or net. The other symbols would all impact the payout and are therefore represented in other rows.

By multiplying each payout by its associated probability and adding everything up, we find that the expected value of this machine is 0.695. Put another way, for every 1,000 coins you put into the machine, you can expect to get only 695 coins back, losing 305 coins on average. I was particularly unlucky in my experiment of 100 draws, but the odds are definitely not stacked in your favor.


Bonus Spins

If this were all we could do in the game, the decision would be pretty clear: as in life, playing the slot machine is not a rational choice. However, the slot machines in Blue Prince have another mechanic taken from the real world. Once you've taken your first pull, if you want, you can select one of the slots to pull again in isolation. For example, if you pull three crowns and a dash, for the cost of just one additional coin you can spin again but lock in all of your crowns in the hopes of hitting that jackpot.

Most of the slot machines in the game let you take this bonus spin up to three times, at the cost of one additional coin per spin. From here, a natural question arises: how does this change the expected value of the game?

Bonus spins introduce an aspect of player choice and strategy. How do we know whether we should use a bonus spin, and how do we determine which symbol we should replace? Our strategy here impacts the expected value. For example, if we take a bonus spin on a machine that looks like โž– โž– โž– โž–, we most likely have wasted a coin. The only way to get a payout is with a ๐Ÿ€, but these are quite rare.

To simplify our analysis, for now we'll assume that we use an optimal strategy. In other words, we assume we are slot machine geniuses who always make the play that maximizes our expected value, assuming that any future plays will also be optimal. Sometimes this means not taking the bonus spin at all. If we do take a bonus spin, we select the symbol that maximizes our chances of the largest return.

Want to try your hand at picking the best strategy? Here are some sample scenarios. Given that you have one, three, or five bonus spins, what is the best decision to make in each case? I find that the answers get harder to reason about the more bonus spins you have.

Which spin, if any, is best?

Test your skill at assessing the optimal strategy.

Select the symbol that you think maximizes the expected value given that you have one, three, or five bonus spins available. You can also skip the bonus spin if you think you're unlikely to do better than what you have now.

The strategy here gets complicated quickly. Note that several of the best choices depend on how many spins you have remaining. Question 3 is one of several examples of this; the best choice if you have one spin and the best choice if you have five spins are not the same choice!

Because of this complexity, getting a closed formula for the expected value is not feasible. Fortunately, this is the kind of thing that computers are very good at. The universe of possible spin results is not actually that large (exercise for the reader: ignoring ordering, show that there are only 330 of them). So to calculate the modified expected value, we can start with our known expected value with no bonuses, then use dynamic programming techniques to calculate the expected value of any four symbols given that you have one bonus spin remaining. From there we can use those same techniques to calculate the expected value of any four symbols given that you have two spins remaining. And you can repeat this once more if you assume you have three spins remaining. This type of inductive approach can prove that this really is the optimal strategy, not just a greedy heuristic.

I'll show you the results momentarily. But just in case you want to try it out for yourself, here's the same simulation with the three-bonus-spins rule tacked on.

Play SlotsView History
Cost
0
Payout
โ€“
This time you can play the game with up to three bonus spins. How does your strategy change? How does your profit change?

How did you do? Were you able to earn more than in the first example? Unless your strategy is awful, or you are very unlucky, you should find that this version of the game is more forgiving. In fact, with optimal strategy, it even has a positive expected value! You'll never find this slot machine in Vegas, because it would bankrupt the casino.

With perfect play, three bonus spins represents the tipping point where the game goes from a negative expected value to a positive one. Here's a table of the data:

Number of Bonus SpinsExpected Value
0-0.305
1-0.122
2-0.011
30.096
Expected value of the slot machine as a function of the number of bonus spins. As the number of bonuses increases, so does the expected value.

Stacking the Odds

While the expected value of the game is positive, it's only barely so. This means that in order to eke out more coins than you put in, your gameplay needs to be pretty close to perfect.

Fortunately, the game is even more forgiving than this. There is a way to play a slot machine that supports up to five bonus spins. I won't share the details of how, because unlike warm produce I do not spoil.

I will say, even with this generous number of bonus spins, I find the game to be barely profitable. Perhaps I am bad at strategy. Anecdotally, at one point in the game I needed 400 coins to purchase an item. Unfortunately, I had only 380 coins, and would stand to lose everything unless I could grind out an additional 20 coins from this 5-bonus slot machine. Eventually I was able to get there, but it took way longer than I (or my kids) would've liked. I'll take it as a win that they came away feeling like gambling is a waste of time.

Maybe you can do better than I did. Here's a final slot machine. This one gives you up to five bonus spins. How many rounds does it take you to reach a profit of 20?

Play SlotsView History
Cost
0
Payout
โ€“
Slot machine on easy mode. This time you can play the game with up to five bonus spins.

This time around, with an optimal strategy the expected value of this machine with 5 bonus spins is 0.332. In other words, for every 1,000 coins played, you should expect to get 1,332 coins back. Put yet another way, to get 20 coins, I should've expected it to take 20 / 0.332, or around 60 spins. Assuming it takes around 15 seconds per spin, that's 15 minutes of time.

I definitely spent more time than this. So maybe my strategy was bad. Though if I'm being kinder to myself, the distribution of payouts is also pretty clumpy. There are a lot of small losses, but the occasional ๐Ÿ€ or jackpot can trigger substantial payouts when it comes up.


Pobody's Nerfect

Let's double down on this notion of optimal play. Throughout our investigation, I've tried to emphasize that these expected values only hold under the assumption that players always know the best move to make. But if you're anything like me, sometimes that choice is hard. Especially when you have a number of bonus spins remaining. How does sub-optimal play impact these expected values?

One way to model this is to introduce a sliding scale that roughly maps to how good your strategy is. At one end of the scale, you play the game perfectly; this is the model we've been using the entire time. At the other end of the scale, the strategy is just random choice (i.e. not a very good strategy).

In between, without getting too lost in the mathematical weeds, the slider controls how likely we are to choose the optimal value vs making an incorrect choice. The options are weighted such that two good options will be roughly equally likely to be chosen, while a horrible option will have a low (but nonzero) likelihood of selection.

Optimality measurement: 1.00
Number of bonus spins: 5
๐ŸŸก๐ŸŸก๐Ÿ’ฐ๐Ÿ’ฐExpected ValueNo strategy (random)Unoptimized strategyOptimized strategy
Stay0.00033.3%0.0%0.0%
Spin ๐ŸŸก0.44433.3%0.0%0.0%
Spin ๐Ÿ’ฐ0.46333.3%100.0%100.0%
For a given number of bonus spins, this optimality slider veers between a totally optimal strategy and a totally random one.

This approach has some unexpected behavior. For example, with 5 bonus spins and an optimality measurement of 0.20, you can see that the unoptimized strategy is even less likely to pick the optimal symbol than a random strategy is! This is because player error is baked into the model; even if someone makes the correct choice on the first bonus spin, they are less likely to make it on subsequent spins.

I'll spare you the mathematical details. If you're curious to learn more about the underlying models here, this is a discrete choice model. More specifically, it's a conditional logit model, where our slider parameter roughly controls how likely a player is to choose the best alternative over the other available options.


Taking it to the Limit

If one bonus spin is good, and three is better, and five is even better still, what happens if we have six bonus spins? 10? 100?

Using the same techniques we've already developed, we can chart the expected value of this machine as a function of how many bonus spins you have. We can do this both for the optimal strategy, and the discrete choice model outlined above. Take a look!

Optimality measurement: 1.00
Optimal
Suboptimal
Number of Bonus SpinsExpected Value
As one might expect, the worse your strategy, the smaller your expected value from the game.

Interestingly, the expected value increases quite rapidly for every additional spin from around 20 to 60 bonus spins. After that, the increase starts to taper off; eventually it stabilizes right around an expected value of 54 coins. Conceptually, this makes some sense. In fact, if you do the math, the 8% probability of getting a crown means that after the initial roll, you should expect on average it will take 47 bonus spins to hit the jackpot. So with enough bonus spins, the dominant strategy becomes to go for the jackpot every single time.

You can also adjust our optimization slider to see how the payouts look if you don't always make the optimal move. Here things get interesting in terms of the actual game: note that at an optimality of 0.75, the 3-bonus slot machine flips from having a positive expected value to a negative one. If you've played the game, this probably aligns with your experience. The 3-bonus machine requires a pretty tight strategy.

Interestingly, the 5-bonus machine doesn't provide much more latitude: it has a positive expected value when the optimization slider is at 0.70, but at 0.65 even that version of the game's expected value becomes slightly negative.


Conclusion

Fortunately, the boys and I are at a point in the game where I don't foresee a need for us to grind out more coins in the casino. But if we did, I'm now more confident that it's a defensible position. Indeed, we've demonstrated here that both versions of the slot machine in Blue Prince offer what's effectively an infinite money machine.

The only question is how much you value your time, because these machines dispense that infinite money at a pace that would make any pit boss proud.

Sources: