When you hear the words “game of chance” I doubt Candy Land is the first one that comes to mind. Still, that’s what it is. The game requires no reading, no strategy and only the most basic counting skills. No choices present themselves. In terms of games of chance, the rules are far more simple than even craps or roulette. Still, how many turns would the average game take? How long should I budget to play a game?

Let’s find out – By coding a game as a Markov chain and running a few million Monte Carlo simulations.
The game of Candy Land has a 134-space board. Colors alternate between red, purple, yellow, blue, orange and green, with several pink spaces. Two shortcuts exist – The rainbow and gumdrop pass which, if a character lands on these, they get to move up 54 and 13 spaces respectively.
Gameplay progresses with the players taking turns drawing cards out of a deck. The deck consists of eight cards of each color, plus two “double” cards of each color and six character cards that represent the pink spaces. When a player draws a color card, they move to the next space of that color. Double cards allow the player to move to that colored space, after the next. Character cards send the player to whichever pink space they draw – regardless if that card is ahead or behind. Since there are no instructions on whether to replace cards or not, I’ve opted for the simplest option and assumed replacement.

For simplicity’s sake, I omitted the “cherry-pitfalls” which require a player to wait until another player draws a card of the same color as the square they’ve gotten stuck on. If you have a good way to get this feature added in, I’m curious to hear it. I have a few ideas, but none would be particularly easy to code.
The game ends when a player lands on the final space – King Candy and the Candy Castle.
So how many turns is a game of Candy Land? Let’s find out.
We’ll start by defining the board:

Of course, I need some friends who can’t refuse to play with me:

We’ll use an object to hold their names and what space they’re on.
Then code the order of play.
This is where our flowchart comes in.
Generate a random number > if the number is between 1 and 48, generate a new number between 1 and 6. If the number is between 48 and 60, generate a number between 1 and 6, then double it. Add that value to the player’s space value. If the number is between 60 and 66, pick a character space value.
If the player’s space value is 5, add 54. If the value is 34 add 13.
Repeat.
Here it is in Python:

And after a few minutes, we have our result. A very cool fat-tailed distribution:

Dotted lines represent the CI95 per the normal distribution. I’m guessing the spikes reflect some attraction the system has to values influenced by the character cards. I’d have to do more study to be sure (and I have far better things to do). Since I have perfect replacement, (and you might already be aware of this fact if you’ve ever played) it is technically possible for gameplay to go on forever. Still, the skew isn’t that far off. Our calculated error bar is about 34, and 950,000th highest value is 35. Our max value is actually 117 rounds which would, by my own estimation could be as much as three hours. You could just draw character cards forever and never actually advance. In reality though, we almost never see a game go on past 60 turns. Keep in mind though, I didn’t code in the molasses swamp or cherry-pitfalls so this is a low estimate.
Lastly, this 19 year-old forum post made this whole ridiculous exercise possible. I can hardly believe someone actually crunched the math of this game but I’m hugely grateful they did.
Leave a Reply