What is your lucky number if you were going to play The Glass Stepping Stones game?

Spoiler Alert: please finish watching the show BEFORE you read this blog.

1. Background

I just finished watching the Squid Game last week, as many of you, I enjoyed it a lot. Games in the show are very stressful and require different tactics to win, thus fun to watch. Specifically, “The Glass Stepping Stones” in episode 8 has caught my eyes. It is a crucial game, with only 3 survivors out of 16 players. I think this game is different compared to other games, because it’s a gamble game from the perspective of statistics, in which the players’ behaviors do not help them to win. Believe it or not, each player’s destiny is almost determined when they pick the numbers, and what they guess during the game does not matter much. Yes, I agree that having luck is a superpower. And knowing some statistical knowledge would help you survive in a crucial game like this.

In this blog, I am going to discuss the following questions:

  • There are only 3 survivors in the show. Is it possible to have more (or fewer survivors) if they play the game again? What are the probabilities of having other outcomes?

  • Is the probability of survival in this game 3/16? How does the survival probability relate to the game order?

  • How to tell if a player is a cheater, based on how many glasses guessed right?

  • How to survive this game?

The codes for this analysis are available in my Github.

2 Other outcomes of the game - from parallel universes

To answer these questions, I did a simulation using the idea of “survival analysis”. It’s a type of statistical analysis widely used to analyze events like death, disease occurrence, recovery, etc. [1], to calculate the probability that a subject survives. One way to perform the survival analysis is through simulations by running experiments thousands or millions of times, then calculating the survival probability that you are interested in. I like the idea of simulation because running one experiment feels like watching what would happen in a parallel universe, you could even read either sad or happy stories you get from the simulation results, with a perspective of an oracle(if an oracle exists)!

Let’s first get warm up by reviewing the game rules again: all players select a number between 1 and 16, then they would cross a bridge in that order within the time limit. The bridge has 18 rows of glasses, and the players need to pick left or right glass from each row. If they picked the right glass they could continue walking, otherwise, they fall off the bridge and die.

To simplify the problem for the simulation, I need to make a few assumptions:

  • Players would continue walking if they haven’t died.
  • Players pick glasses randomly (i.e. the chance of guessing correct is 0.5 for each row) - no cheater is allowed.
  • Time effect is not considered in the simulation (showing some mercy to players by removing the time limit in the simulation).

Now I am giving the players another chance to play the game, in my parallel universes established in Python. I created a Python function to simulate the game process, calculate the number of survivors, and how many times they have guessed correctly. Let’s look at some interesting results I got by running the game:

1) A similar story in parallel universe A:

We have 3 survivors in this experiment. Different from the show, the glass expert (14th player in the show) failed on his first trial! Most players did not guess right on the first trial, the team had bad luck. ;(

2) A happy story in parallel universe B:

13 players have survived in this universe, with player 4 guessing right 9 times! Hero of the team! Wait, what is the probability of guessing 9 times right? Is this player a cheater? We’ll discuss this later in the blog.

3) A sad story in parallel universe C:

Well, this is not too bad for the team with 9 survivors. I am saying it’s sad because player 4 had guessed 6 times correctly, then he died. R.I.P for player 4, that’s great contribution to the team and you are still a hero!

3 What is most likely to happen?

As you can see, every time I run the game, the results can be very different. Can we calculate the probability of having each different outcome in terms of the number of survivors? Yes, we can! We only need to run the experiment many times (I ran for 100,000 times in my analysis), and then we could calculate the probabilities based on the simulation.

Let’s see some probabilities: {: {:

As we see from above, this game is most likely to have 7 survivors at the end. And it’s almost impossible to have no survivors (prob. of 0.1%), or a whole team of survivors (prob. of 0). Sadly yes, this is a game that is doomed to have someone die.

However, we should also notice that the game in the show are more difficult than we are simulating here, with the time limit. And humans could not act like in the simulation, by pushing the person front, trying to switch game orders, or even cheating. But thanks to these “human factors”, the show is more exciting to watch, also more crucial with only 3 survivors.

4 Which players got really lucky?

As I mentioned in the beginning, this is a game that relies on order to play. So how does their chance to survive change with the order? Here’s the simulation output:

{: {:

The first 6 players have less than a 5% chance to survive. And for the last 4 players (from 13-16), they can lay back and relax in this game with more than 95% chance of survival. But, even if Cho Sang-woo (No. 218) learned statistics and knew that he and the person in the front are both likely to survive, I think he would still choose to be a killer and push the poor guy. Do you agree?

5 How to tell if a player is cheating?

“Everyone Is Equal While They Play This Game. Here, The Players Get To Play A Fair Game Under The Same Conditions. Those People Suffered From Inequality And Discrimination Out In The World, And We’re Giving Them The Last Chance To Fight Fair And Win.” - The Front Man[2]

Cheating has zero-tolerance here. As for the game host, they have the responsibility of making the game fair without any cheating. For the players, they need to fight for fairness by calling out the cheating behaviors.

But how? If Il-nam (the old guy, No. 001)[pic from 3] made it to this game and he knew all the correct steps, can you tell he knew something instead of relying solely on luck?

We can solve this using some basic Bayesian statistics. Suppose we have: Prior knowledge of Il-nam before the game: we believe that he is a REAL player with 99% chance, and only 1% chance that he’s a cheater.

Question: how many times he needs to guess correctly before we are convinced that he’s a cheater?

Solution with Bayesian statistics:

  1. Let’s start by supposing he guessed 5 times correctly:
    • Prior ratio: cheating vs. non-cheating is 1/99
    • The prob. of without cheating is 1/(2^5)=1/32, and cheater guess 5 times correctly with a probability of 1, so the likelihood ratio is 1/(1/32) =32
    • posterior ratio = prior ratio *likelihood ratio = 1/99 * 32 = 32/99
    • Posterior: probability of cheating = 32/(32+99) = ~24%.
  2. Now suppose he guessed 10 times correctly:
    • Prior ratio: cheating vs. non-cheating is 1/99
    • The prob. of without cheating is 1/(2^10)=1/1024, and cheater guess 10 times correctly with a probability of 1, so the likelihood ratio is 1/(1/1024) =1024
    • posterior ratio = prior ratio *likelihood ratio = 1/99 * 1024 = 1024/99
    • Posterior: probability of cheating = 1024/(1024+99) = ~91.2%.

As we see from the calculation, if the player has guessed correctly 10 times we would be very sure that he is a cheater with prob. of 91.2%.

6 How to survive this game as a player?

The ultimate solution: change your lucky number to a bigger one.

I am not kidding. From what we learned from the above, the best way to survive is to get the last numbers to play: 13-16 are all good choices (suppose you won’t be killed by the player behind you).

If you were unlucky and got numbers from 1-8, the best chance to survive is to convince other players numbered from 1-9 to quit (based on the rule that the game can be stopped if the majority agrees so). How to convince them to quit with you? It’s not difficult to convince the first 8 players since the largest chance to survive is only 0.41. But it would be difficult to convince the 9th player whose chance is 0.6! I don’t know if the director of the show calculated this number, but I would guess player number 9 would not easily be convinced in this situation (suppose they all know statistics).

Statistics is so useful to survive, isn’t it? That concludes my blog here.

OK, now, my NEW lucky number is 16 (or whatever the largest in the team). Anyone wants to Play?

💖Love the story? Please feel free to subscribe to the mailing list for DS and ML fans, and become a Medium memberfor more DS blogs!🤩

References

[1] https://en.wikipedia.org/wiki/Survival_analysis

[2] Squid game, Netflix

[3] https://screenrant.com/squid-game-netflix-bravest-characters/