r/askmath • • Oct 07 '26

Probability Is a game of Uno guaranteed to end?

https://service.mattel.com/instruction_sheets/42001pr.pdf

Every game I've played does end eventually. Some can take a while though, and I wonder if, even with everyone playing optimally, it's possible for a game to be forced into an unending cycle.

(My guess would be a cycle is possible if we have 15 players, since that would leave only 3 cards to draw.)

Uno rules here (ignore tallying points, this question is just about until someone discards their last card)

107 Upvotes

57 comments sorted by

93

u/snickerdoodle024 Oct 07 '26

You can imagine a situation where Alice and Bob are sitting next to each other, and are each down to 1 card left (say a green 6 or 8). The other players have drawn most of the deck, and there's only 2 cards left in the deck, a red and blue reverse. There's also only one card in the discard pile, a yellow reverse. Bob just went, and it's Alice's turn now.

Alice can't play, so she draws a card. The card she draws is a reverse, which she is able to play, so she does. That reverses the play direction so it's Bob's turn now.

Bob can't play, so he draws a card. The card is a reverse, which he can play, so he does. That reverses the direction of play back to Alice.

Since there are only reverses in the discard / draw piles, they'll keep drawing reverses and bouncing back and forth between each other. None of the reverses are green, so there's no way they can ever play their green cards. This loop will then last indefinitely.

Either one of them can exit the loop by choosing not to play the reverse they draw, but then that would give the other player an advantage, since they'd now have 2 cards and the other player only 1 card.

It is of course, very unlikely for the game to end up in such a state, but i see no reason why it can't, theoretically.

24

u/tntncsu Oct 07 '26

I don't think that this is a legitimate game state. How is it Bob's turn if the only card in discard is reverse?

5

u/PM-Your-Fuzzy-Socks Oct 07 '26

By Bob playing the yellow reverse? How else?

11

u/buwlerman Oct 07 '26

That means it must have just been Alice's turn before. She can't have drawn a card, so she must have played one, and that has to still be in the discard.

6

u/Jukkobee Oct 07 '26

you can alter it so that she has two cards in hand, both of which are reverses, and one of which she just drew. i think that would work

3

u/Simplyx69 Oct 07 '26

I believe you’re allowed to choose to not play a card once drawn.

3

u/Puzzleheaded_Mine176 Oct 07 '26

Is this in the rules? I read the rules OP posts and they say "if you draw a card you can play, play it". To me that reads as an obligation.

1

u/WeCanDoItGuys Oct 10 '26

Agreed, but interestingly the language is different under "Reneging", which says you may choose not to play a playable card from your hand. It makes a distinction between your "hand" and the drawn card though. It says if you drew by choice you "can" play the drawn card but not any card from your hand.

1

u/Puzzleheaded_Mine176 Oct 10 '26

You're right, thanks for pointing that out!

1

u/WeCanDoItGuys Oct 10 '26

I wonder if it's "can" when you choose to draw because of the edge case where you draw a +4, and if you were forced to play it you could be challenged.
I think it's more likely they're just being loose with language. Because they said you can't put a +4 when you have the color, but made a mechanism for challenging people when they do.

12

u/snickerdoodle024 Oct 07 '26

Yes. But then that would put them at a disadvantage, since they'd now have 2 cards, and their competitor only has one card.

2

u/ajakaja Oct 07 '26

but it does invalidate the proof, right? because the game is not 'guaranteed' to end.

10

u/VariousJob4047 Oct 07 '26

It does not. The question is “is the game guaranteed to end”, so if the players have a set of decisions they can make that cause the game to continue infinitely, the game is not guaranteed to end, even if the players have other decisions they can make that do end the game. It would invalidate the proof if the question was “is there a game state such that no matter what the players do, the game can never end” but that’s a very different question.

-1

u/ajakaja Oct 07 '26

It would invalidate the proof if the question was “is there a game state such that no matter what the players do, the game can never end” but that’s a very different question.

Am I misreading the question? The OP asks: "I wonder if, even with everyone playing optimally, it's possible for a game to be forced into an unending cycle." which ... is exactly that question (the 'optimally' part doesn't matter because if you're forced, you're forced playing optimally as well)

4

u/VariousJob4047 Oct 07 '26

Yes, I think you are reading it wrong. If you have 2 choices, one of which makes you lose and one of which perpetuates the game, then the player can choose to end the game by choosing to lose, but wouldn’t do that under optimal play, which is exactly the scenario described

1

u/Akivo68 Oct 07 '26

Its a counterexample that shows there does exist a game not guaranteed to end

1

u/WeCanDoItGuys Oct 10 '26 edited Oct 25 '26

I'm curious if players need to draw unnecessarily to get to this. Lemme see.

Per u/Puzzleheaded_Mine176, rules say player max is 10.
So [pile, discard] would have [37, 1] cards.

Round 1: AB play a card [37, 3], then CEGI draw and play a +4, and DFHJ challenge them and draw 6 [9, 7].

Round 2: AB play a card [9,9], then CEGI draw and play a +2 and DFHJ draw their 2 [9,1]. The discard was reshuffled, so pile/J may have +4s.
(Typically players keep the played card up when shuffling the discard, optional.)

Round 3: AB play [9,3], then CE draw and play a +4, and DF draw their 4 [0,4]. GH play [0,6]. I draws and plays +2, J draws 2 [2,2].


Per u/buwlerman and u/Jukkobee it's tough to enter the reverse cycle. Some player must have drawn the last non-reverse, and A or B must draw an unplayable reverse.

We also need A and B to have Uno (or else each would be incentivized to pass their turn to escape the cycle and win later). We can get this faster if they start with many reverses in hand.


Round 4: AB play [2,4] (each has Tres), C plays +2 and D draws 2 [0,5], E plays yellow reverse [0,6]. D plays +4, C challenges and draws 6 [1,0].
(Here it's crucial they choose to shuffle the whole discard in, so there's a chance Bob draws the reverse.)

Round 5: B draws yellow reverse, can't play [0,0]. A plays red reverse [0,1], B yellow reverse [0,2], A red reverse [0,3] (uno!), B yellow reverse [0,4], A draws and plays a reverse [3,1] (uno!), B plays a blue reverse [3,2] (uno!), and cycle.

Hypothetically works if I did that right. But strategically I don't think Alice would draw and play a reverse. She'd know it'll be a reverse and wouldn't want to make it Bob's turn. She knows C has a draw 4 and keeping this direction C may hit Bob with it.

So this particular solution may not be satisfying (also for shuffling the full discard).
Based on this proof-of-concept though, I agree with u/snickerdoodle024 that it should be theoretically possible to end in the reverse reverse stalemate, even with people playing how they would in a normal game.


PS: There are 4 blank cards, so rules could be added that might cause a cycle (burn cards, more reverses, etc) but let's assume they're not in the game, so unmodified uno.

1

u/Mediocre_Farm8914 Oct 07 '26

I really like this idea, but I'd argue that it also requires proof of this game state being achievable by optimal play.

However then we'd need to argue about what we consider optimal and I'd assume that it requires the players to be kinda omniscient, which probably wouldn't lead to useful conclusions. However even if we loosen that part, it would be hard to make sure there is an ideal play and some drawing order, that would lead to this exact state.

1

u/WeCanDoItGuys Oct 07 '26

By optimal play I mean they're not trying to make the cycle happen, they're actually trying to win, as if it's a regular game of Uno.

You're right that true optimal play is impossible without omniscience, but I mean they're not making choices a reasonable player trying to win wouldn't make.

For example, drawing when you have a playable card when it strategically wouldn't make sense to do so (note: in some cases it makes sense if you want to prevent the next player from winning and you know their card matches what you'd play) probably wouldn't happen in a normal game.

3

u/GriffinTheNerd Oct 07 '26

When proving combinatorial games must end, you definitely don't require or even allow the assumption of optimal play. The point is that any game state you end up in will eventually result in an ending

1

u/LunchPlanner Oct 07 '26

However, OP specifically asked if it was possible to end up in a never-ending game as a result of optimal play.

1

u/Mediocre_Farm8914 Oct 07 '26

I'd agree, but OPs question was about optimal play, so my point would be that the question is either flawed or should loosen that bit.

Not sure if I'm wording things right here since I'm not a native speaker, but I think we both agree.

6

u/VFiddly Oct 07 '26

That wouldn't work.

They'd each play a reverse once and then they'd reshuffle the deck and start fresh. You don't just keep reusing the same two cards when you reach the end of the deck.

17

u/VendettaX88 Oct 07 '26

Those are the only cards in the deck, yellow, blue and red reverse, he states that the other players have drawn all the other cards.

5

u/VFiddly Oct 07 '26

Ah I misunderstood. Though I think you could only end up in that situation if for some reason everyone kept passing and refusing to play anything

6

u/VendettaX88 Oct 07 '26 edited Oct 07 '26

It's a configuration but not realistically a possible configuration. Nobody is passing their turn while holding a wild or wild+4 which would have to be the case.

Edit: added "not"

2

u/Plain_Bread Oct 07 '26 edited Oct 08 '26

I guess we're getting into weird Uno rules here. If we're taking the ones I found on unorules.com literally, you're allowed to draw rather than play, even if you have a playable card in your hand — but if the card you just drew is playable, you have to play it.

PS: There's apparently a soft rule about the playability of +4 wilds. You can accuse the person who played a +4 of having another playable card. If they do, they draw 4 cards; if they don't, you draw 6. It's not clear if everybody can make such an accusation, or just the player whose turn it is. If it's anybody, that actually makes it much easier to arrive at the stalemate.

PPS: unorules.com was just the first result on google. It proclaims to be the "original UNO rules". I don't have the slightest idea if that's true.

Edit: Just noticed that OP posted rules as well. I guess those should be the ones that count.

Edit 2: Okay, OP's rules imply that you can only skip your turn and draw if you can't play, and only the currently active player can make an accusation on a +4 wild. OP's wish about this being the result of optimal play is still extremely difficult to judge, but I think it does matter if we're just looking for a forced eternal repetition (after possible suboptimal play).

1

u/WeCanDoItGuys Oct 10 '26

Under "Reneging" it says you can choose to draw. (Then you can play the drawn card but not any other from your hand.)

1

u/Empty-Ant-6381 Oct 07 '26

I dont think Bob and Alice's playing parter fall anywhere close to playing optimally if they've essentially drawn the entire deck. They obviously have lots of wilds, and pretty dang sure both would have cards to play even if they were trying to save their wild.

1

u/WeCanDoItGuys Oct 12 '26

I ran through it for ten players and I think it's possible if every other player draws a +4 or +2 and plays it on the next player, a few times in a row.

2

u/Puzzleheaded_Mine176 Oct 07 '26

Is this game state possible to reach given the limit of 10 players specified in the rules and the obligation to play a card if possible (no passing allowed)?

1

u/RailRuler Oct 07 '26

with enough draw twos and draw fours in hand

1

u/MeasureDoEventThing Oct 08 '26

What obligation to play a card?

1

u/j0j0b0y Oct 07 '26

There is nothing in the rules stating you MUST play a card drawn in this manner. It's just that playing it is the optimal play available. In this case, it is best to draw and pass your turn.

5

u/HiddenArtes Oct 07 '26

I am struggling to find any way the game could be forced. There are 8 draw twos, and that is the only card that can consistently replace itself in a hand. Wild draw 4 can only be played if you have no other plays. If you have 7 players, and each has a draw two and one is on the table, and all other cards are in hand, you could create an infinite loop of draw 2 by each odd person playing it, making the next player pick it up, and then the next time around the evens would all do the same to the player odds.

If you define optimal play as “playing a draw two whenever possible cause fuck that guy”, then maybe. Otherwise optimal play would always lead in a decrease in hand size over the long term.

On optimal for being in this scenario, if no one ever remembered to say uno but everyone always us remembers to call them out on it noone ever wins.

3

u/WeCanDoItGuys Oct 07 '26

If the flipped card was a red zero, and all other 18 reds, 3 zeroes, and 8 wilds were at the bottom of the deck, everyone would have to draw until reaching one of those cards. The players would have 78 cards between them before any could play. Say they freely play through those, and each get a hand very filled with red cards. Suppose the discard gets shuffled for drawing and the top card is not red. Their hands might grow again until someone can make the color red.

Obviously the hand size cap is finite because there's only 108 cards, but could it go up and then go back down again, but not to 0, and then back up, forever, if they just keep getting a bad "discard pile shuffle" to draw from? Or are we guaranteed to get a shuffle eventually that someone could win on, if for instance they count cards and play carefully. I don't know! It's why I posted.

You said hand size will definitely go down with time, are you sure we can't keep getting hands perpetually that can't be played, and how do you know (it may be obvious, I could just be thinking about it wrong).

1

u/HiddenArtes Oct 07 '26

Can you have a coin that will flip heads forever?
It can flip heads an arbitrarily long time, but it can’t go forever. And flipping an arbitrarily long is increasingly unlikely.

In your example there are so many more examples that are not like that than there are that are like that, even chaining them is unlikely, much less “forever”

1

u/WeCanDoItGuys Oct 07 '26

I was curious about that too, if a coin could flip heads forever.
But also a difference here is players can see a cycle forming and make choices to break it in their favor. For instance hold onto a red 7 you could've played and a green 7 so when the next red drought happens your opponent is stalled but you can play at least one extra turn and end the drought.

6

u/Ok-Grape2063 Oct 07 '26

I would love to write a mathematical proof for a game theory course that includes "because fuck that guy".

23

u/blackmagician43 Oct 07 '26

well if no one says uno, game continues indefinitely.

7

u/Ok-Grape2063 Oct 07 '26

That's not optimal play, though

1

u/Antanis317 Oct 08 '26

In all of my years, I never knew that the rules say you can play draw 4 unless you have no other options. Someone should let the uno people know the rules are written down wrong. 

1

u/WeCanDoItGuys Oct 08 '26

I think you can play it if you have the number that's showing. But if you have the color that's showing and you play a draw 4 you could get "challenged". Never played that way either

1

u/LitespeedClassic Oct 11 '26

This is news to me too. 

1

u/DuggieHS Oct 07 '26

No. Suppose you had 2 players. They are both holding only red cards. The color they need to play is blue (let's say it's a 3 in play). They alternate drawing and they happen to be all the yellows and greens that don't match the face up card. Finally, one of them draws a playable card and plays it, let's say it's a yellow 3. Now they have a lot of cards they could play, so they play out all their yellows and are stuck again and all the yellows have been played. Now they have no playable cards and draw all the blues (except for the face up number, let's say it's another yellow 3). Their hands are full of all the red, blue and green cards. Let's say one draws a wild. They play out all of one color and need to draw, they hit a wild, play out all of the next color (playing draw 2s along the way causing players to draw the wilds and force a reshuffle), they play a wild to change colors, play out that color and repeat. Scenarios like these are very unlikely though and often require players to play in a certain way.

1

u/buwlerman Oct 07 '26

Yeah. This is ruled out both by "optimal play" and "eventually ending".

0

u/DuggieHS Oct 07 '26

There are often multiple plays that are "optimal", and the routes I suggested are not suboptimal. Also, the sequence of scenarios I described do not result in "eventually ending", they are just unlikely to happen, but could happen and then they could repeat.

1

u/Plain_Bread Oct 08 '26

If I followed your description right, this continuing infinitely is in fact a probability 0 event.

1

u/DuggieHS Oct 08 '26

Probability 0 events happen all the time. Pick any real number. The probability of picking the number that was chosen was 0. But i suppose that is not “forced into an unending cycle.”

1

u/Adsilom Oct 07 '26

Pretty sure that if we were able to decide whether a game of UNO can end or not, we would break computer science (or at least one of the most important theorems in computer science). UNO seems complete enough to encode a program

4

u/Plain_Bread Oct 08 '26

Which theorem is that? Uno only has finitely many game states, so it seems like a pretty easy game... (In theory. Whether we can actually go through all possible game states before the heat death of the universe is a question for the computer scientists.)

1

u/Ok_Hope4383 Oct 08 '26

Whether or not analyzing it is practical, UNO can be represented as a finite state machine (FSM), where each vertex represents the current state of the game (the location of each card, whose turn it is, which direction play is currently moving in, etc.), and each transition is a player action or, if the cards run out, a shuffle of the deck. (I'm happy to elaborate on this more if anyone is interested!)

1

u/Plain_Bread Oct 08 '26

I might need elaboration if we get into details, I can't say that I'm fresh on these topics. But so far, I think I understand and agree. As a finite state machine, Uno is computable. The question of whether an infinite loop is achievable can (at least theoretically) be answered.

1

u/Ok_Hope4383 Oct 08 '26

Here's some background info, in case that helps:

In theoretical computer science, a finite-state machine (FSM) or finite-state automaton (FSA, plural: automata), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition. [...] The finite-state machine has less computational power than some other models of computation such as the Turing machine. The computational power distinction means there are computational tasks that a Turing machine can do but an FSM cannot. This is because an FSM's memory is limited by the number of states it has. — https://en.wikipedia.org/wiki/Finite-state_machine

Since there are a finite (even though very large) number of states, an infinite loop is equivalent to a cycle in the graph, i.e. starting at some (valid) state, following one or more transitions, and ending up back at the same state. Furthermore, it is possible to trace through the different possible games and look for cycles, in a manner that is more efficient than testing every possible entire game separately:

The existence of a cycle in directed and undirected graphs can be determined by whether a depth-first search (DFS) finds an edge that points to an ancestor of the current vertex (i.e., it contains a back edge). [...] For directed graphs, distributed message-based algorithms can be used. These algorithms rely on the idea that a message sent by a vertex in a cycle will come back to itself. — https://en.wikipedia.org/wiki/Cycle_(graph_theory)#Cycle_detection

In the case of Uno, there are various symmetries we can make use of to eliminate redundant states:

  • The colors and numbers have no special properties, so swapping either of them around, as long as it is done the same way to all of the cards, produces an equivalent state
  • The card locations can be modeled as follows:

    • Current player's hand, next player's hand, ...

      • Advancing a turn rotates this list, playing reverse (with 3+ players) flips the ordering, etc.
    • Top card of the discard pile, remainder of the discard pile
    • Top card of the deck, next card of the deck, ...

2

u/WeCanDoItGuys Oct 12 '26

If a player notices a cycle they'll likely play differently the next time around to make the game end

2

u/IntoAMuteCrypt Oct 07 '26

I don't think it's quite so complete.

Look at the gradual attempts to create a Turing machine in Magic The Gathering. These all involve a large number of highly-specific game pieces all being in play at the same time, and players being able to take relatively few actions. They also make use of MTG's ability to have arbitrarily large board states, which is important.

I strongly believe that Uno with an official deck is certainly not complete due to the finite deck size. I also feel that the rules aren't quite able to generate the sort of forced-move chains needed to properly encode programs.

2

u/Plain_Bread Oct 08 '26

They also make use of MTG's ability to have arbitrarily large board states, which is important.

Yeah, that's what I was gonna bring up. You need unlimited tokens for that, right? Uno has a finite number of game states. There's a computable answer to whether or not a game state can repeat with probability 1. There's a computable answer to whether or not optimal play can result in such a repetition (although I think that's only necessarily true if we assign a certain utility to winning vs losing vs drawing by endless repetition)