# How many ways to make rock, paper, scissors, lizard, Spock?

In The Big Bang Theory, Sheldon Cooper explains an extension of the game Rock, Paper, Scissors by introducing two more possibilities, Lizard and Spock, so the game becomes Rock, Paper, Scissors, Lizard, Spock. Sam Kass and Karen Bryla invented the game before it became widely known via the television show.

The diagram below summarizes the rules:

## Alternative rules

Imagine yourself in the position of Sam Kass and Karen Bryla designing the game. You first try adding one extra move, but it turns out that’s not possible.

The main property of Rock, Paper, Scissors is that no player has a winning strategy. That implies you can only add an even number of extra moves, keeping the total number of moves odd. That way, for every move one player makes, the other player has an equal number of winning and losing moves. Otherwise some moves would be better and others worse. So you can’t add just one move, say Lizard. You have to add two (or four, or six, …).

How many ways could you assign rules to an extension of Rock, Paper, Scissors adding two more moves?

Number the possible moves 1 through 5. We will make a table of which moves beat which, with +1 in the (ik) position if move i beats move j and -1 if j beats i. There will be zeros on the diagonal since it’s a tie if both players make the same move.

Let’s start with the original Rock, Paper, Scissors. In order for this game to not have a winning strategy, the table must be filled in as below, with the only option being to set a = 1 or a = -1.

```|---+----+----+----|
|   |  1 |  2 |  3 |
|---+----+----+----|
| 1 |  0 |  a | -a |
|---+----+----+----|
| 2 | -a |  0 |  a |
|---+----+----+----|
| 3 |  a | -a |  0 |
|---+----+----+----|
```

If 1, 2, and 3 correspond to Rock, Paper, and Scissors, then a = 1 according to the usual rules, but we’ll allow the possibility that the usual rules are reversed. (If you don’t like that, just set a = 1).

Next we fill in the rest of the moves. The table must be skew-symmetric, i.e. the (ij) element must be the negative of the (ji) element, because if (ij) is a winning move then (ji) is a losing move and vice versa. Also, the rows and columns must sum to zero. Together these requirements greatly reduce the number of possibilities.

```|---+----+----+----+----+----|
|   |  1 |  2 |  3 |  4 |  5 |
|---+----+----+----+----+----|
| 1 |  0 |  a | -a |  b | -b |
|---+----+----+----+----+----|
| 2 | -a |  0 |  a |  c | -c |
|---+----+----+----+----+----|
| 3 |  a | -a |  0 |  d | -d |
|---+----+----+----+----+----|
| 4 | -b | -c | -d |  0 |  d |
|---+----+----+----+----+----|
| 5 |  b |  c |  d | -d |  0 |
|---+----+----+----+----+----|
```

The values of a, b, and c may each be chosen independently to be 1 or -1. If bc = 0, then d can be chosen freely. Otherwise b and c have the same sign, and d must have the opposite sign. So all together there are 12 possibilities (6 if you insist a = 1). These are listed below.

```|---+---+---+---|
| a | b | c | d |
|---+---+---+---|
| + | + | + | - |
| + | + | - | + |
| + | + | - | - |
| + | - | + | + |
| + | - | + | - |
| + | - | - | + |
| - | + | + | - |
| - | + | - | + |
| - | + | - | - |
| - | - | + | + |
| - | - | + | - |
| - | - | - | + |
|---+---+---+---|
```

The version of the rules used on The Big Bang Theory corresponds to the second row of the table above: a = b = d = 1 and c = -1.

## Simpler solution

Here’s another way to count the number of possible designs. Suppose we start with tradition Rock, Paper, Scissors, corresponding to a = 1 in the notation above. Now let’s add the rules for Lizard. We can pick any two things from {Rock, Paper, Scissors, Spock} and say that Lizard beats them, and then the other two things must beat Lizard. There are 6 ways to choose 2 things from a set of 4.

Once we’ve decided the rules for Lizard, we have no choice regarding Spock. Spock’s rules must be the opposite of Lizard’s rules in order to balance everything out. If  we decide Lizard beats Rock, for example, then Rock must beat Spock so two things beat Rock and Rock beats two things.

If we’re willing to consider reversing the usual rules of Rock, Paper, Scissors, i.e. setting a = -1, then there are 6 more possibilities, for a total of 12.

## Adding two more moves

By the way, we can see from the approach above how to add more moves. If we wanted to add Stephen Hawking and Velociraptor to our game, then we have 20 choices: we choose 3 things out of 6 for Hawking to beat, and the rest of the rules are determined by these choices. Velociraptor has to be the anti-Hawking. If we decide that Hawking beats Paper, Lizard, and Spock, then we’d get the rules in the diagram below.

## Fair subsets

You might want to design the game so that for any subset of three moves you have a game with no winning strategy. Here’s an example why. If the subset (1 , 2, 4) is a fair game, then a = c. But if the subset (2, 3, 4) is a fair game, then a-c. So one of the two games must have a winning strategy.

## Graphing the rules

The first graph above was made with GraphVis using the code below.

```digraph rock {
node [fontname = "helvetica"]

"Rock"     -> "Scissors"
"Rock"     -> "Lizard"
"Paper"    -> "Rock"
"Paper"    -> "Spock"
"Scissors" -> "Paper"
"Scissors" -> "Lizard"
"Lizard"   -> "Spock"
"Lizard"   -> "Paper"
"Spock"    -> "Rock"
"Spock"    -> "Scissors"

layout = circo
}
```

Save the code to a file, say `rock.gv`, then run the command

`dot -Tpng rock.gv > rock.png`

to produce a PNG file.

## 2 thoughts on “How many ways to make rock, paper, scissors, lizard, Spock?”

1. Your second table (five by five) has a flaw. The constraints determine 23 out of the 25 entries in the table, but entries (4,5) and (5,4) as shown require b+c=0. If b=c, those entries should have opposite sign. Entry (4,5) could be b+c+d, and entry (5,4) -b-c-d.

One might ask whether all possible (fair) 5-state games would be isomorphic. The 3-state (fair) game can only work one way: the three states are in a cycle. So, other than arbitrarily naming the states, there’s only one 3-state game. Every fair 5-state game has to contain somewhere a fair 3-state game (proof by contradiction will do); and, starting with a 3-state cycle, there is, up to state names, only one way to extend it fairly to 5 states. So, yes, up to isomorphism there is only one fair 5-state game.

Not sure, “off hand”, on isomorphism of larger games.

2. Nathan Hannon

A few notes:

1) All of your arguments assume that 1, 2, and 3 (or Rock, Paper, Scissors) are in a cycle, but there is another possibility if we’re willing to disregard the traditional Rock, Paper, Scissors rules: Rock beats both Paper and Scissors, and loses to both Lizard and Spock. (Or Paper beats both Rock and Scissors, or Rock loses to both Paper and Scissors, etc.) There should be a total of 24 possibilities for a game with 5 options, since there are 24 permutations of (1, 2, 3, 4, 5) up to cycles.

2) You can generalize this to any odd number of moves as follows: Denote the options by 1, …, 2n + 1. The move k beats k – n, k – n + 1, …, k – 1, all modulo 2n + 1. There are (2n)! sets of rules isomorphic to this one.

3) The ruleset I described above does not include all possible variants. Consider the following example: There are 9 options denoted by RR, RP, RS, PR, PP, PS, SR, SP, SS, corresponding to 2 rounds of Rock-Paper-Scissors. If there is a winner in the first round, that player wins and the second round is disregarded; otherwise, the second round breaks the tie. There is only a tie if both players choose the exact same option, and every option beats 4 other options. However, RR, RP, and RS are a cycle, and they all beat SR. This cannot happen in the set of rules described in 2) (for example, the moves that beat 1 are 2, 3, 4, and 5, and no three of those make a cycle). I have no idea how many variants there are overall.

4) For more fun, we can consider three-player variants. Imagine there are 5 chairs seated around a table, and each player (secretly) chooses a chair. If two players choose the same chair, the game is a draw. Otherwise, the winner is the player with either zero or two other players next to him/her. This is a reasonable generalization of RPS in that there is a draw only when two players choose the same option, and given any set of distinct choices by two players, the third player has an equal number of winning and losing options. More generally, we can consider options numbered 1, …, 3n + 2, and the option k wins if either zero or two players choose any of k – n, k – n + 1, …, k-1, k+1, …, k + n – 1, k+n, all modulo 3n + 2.