So you think you know UNO?

Divij Garg
5 min readOct 31, 2022

--

A special thanks to Vaatsalya A. for reviewing the article.

I think we all know UNO is the best party game.

It’s a simple game, really. There’s a card in the middle with a number and a color. On each player’s turn, they have to place down a card matching that card’s color or number. They may place a draw 4 card or a wild card, allowing them to change the color and annoy the person next to them. You’d think there isn’t much to be said about this game. You’d think it’d be fairly random. Yet, running simulations of UNO reveals very predictable patterns, some of which aren’t entirely obvious. Let’s dive in and analyze this.

To do so, I coded the game logic of UNO with Python. There are several key assumptions I made for my analysis.

  • We will use the standard game logic of UNO; aka, each turn, you may place down one card that matches the color or number of the current card. Players may not “stack” cards like draw twos and skips. In addition, for simplicity, players may not challenge draw fours.
  • Our deck will consist of four 0’s, eight 1–9’s, 8 draw twos, 8 reverse cards, 8 skips, 4 wild cards, 4 draw fours for a total of 108 cards.
  • Each player’s card decision will be decided by what I call the YoungChildAlgorithm. Plain number cards are prioritized over special cards which are prioritized over wild and draw four cards. This was the general consensus of most people’s algorithms when I asked them what their UNO strategy was.

A brief summary of how the program works. There are two classes I created: OneTrialSimulation and Simulation. I ran simulations which iterated through # of players and # of initial cards given. Each Simulation object takes a given # of players and given # of initial cards, and then runs 1000 trials through the OneTrialSimulation class. The OneTrialSimulation class has all the game logic — it creates a card deck and runs the game until a player runs out of cards.

Now, let’s look at the first set of data: the number of moves it takes to finish a UNO game. The x-axis is the # of initial cards given and the y-axis is the # of moves it takes to finish the game.

This data is incredibly surprising in many, many ways. Firstly, it will take around 150–200 moves in total to finish a single UNO game, of course varying over how many players and cards you have. So, about those UNO games that felt like they never ended? Yeah, those were normal. UNO is a long, long game.

Secondly, you would expect that if you give a player more initial cards, then the game will go on longer as players need to get rid of more cards. That’s what essentially happens until around 7 cards — after that point, the number of moves for all the different # of players is essentially the sameit even decreases in some cases. There are several reasons this could occur. It’s possible that since the probability of getting wild cards increases as you give more cards (because there are less regular cards to give), the nature of these cards allows them to expedite the game. Another reason is that the probability of having a card to place down increases as you give more cards — we’ll analyze this later. But, to me, the most interesting fact is that this trend occurs after 7 cards. Coincidentally (or perhaps not), the official rules of UNO say to give 7 cards in the beginning to each player.

Lastly, we see that having more players will mean the game will go faster. Adding 1 more player decreases the average number of moves by about 10 — not a significant difference, but still important to highlight.

Next, we will analyze the average probability of having a card to place down in a given game. The x-axis is again the number of cards, and y-axis is probability.

This data is very interesting. There is a clear, linear trend between giving more cards at the beginning and being able to place down a card. It might not feel surprising, but think about it this way: this includes end-game scenarios where you might not have cards to place down. Anyways, on average, this suggests you have a >50% chance to place down a card, and with 7 players, you might even have a >90% chance of being able to place down a card. This is most likely why the # of moves levels out after 7 cards. While yes, you’re giving more cards to the players, the probability of being able to place down cards also increases. Hence, players are able to get rid of their cards faster, allowing for the moves to stay about the same.

Now, there are limitations to this data. The algorithm behind choosing cards doesn’t consider what other players are doing. For example, if the player next to me has 2 cards left, I’m much more likely to place a draw two. To simulate this, I coded the BigBrainAlgorithm, which checks the number of cards the next player has. If it’s less than 4, then it will prioritize action cards like draw twos over regular cards.

The games on average take 10–15 more moves to finish, reflecting that such a strategy is effective at stopping people from winning. Interestingly enough, the data levels out after 6 cards here rather than 7, but it’s still in that general range. Now, looking at probability data,

There’s virtually no difference!

Overall though, there’s some key points I want to re-emphasize. Surprisingly, an average UNO game will have around 150–200 moves. In addition, UNO deciding to give players 7 cards at the beginning is likely not a coincidence. The number of moves to finish the game levels out after 7 moves, as the first graph reflected. Lastly, on average, a player will have a >50% chance of placing down a card. These kinds of coincidences and trends are what make a seemingly simple game like UNO, simply fascinating.

Up next: Scrabble.

--

--

Divij Garg

Freshman at the University of Illinois Urbana-Champaign with a major in Mathematics. https://www.divijg.com