Saturday, 6 August 2011

n-dimensional rock-paper-scissors

Ever since I learned of the "rock-paper-scissors-lizard-Spock" extension to the classic nontransitive game "rock-paper-scissors" (created by Sam Kass and Karen Bryla), I have pondered from time to time the properties of these games, and more particularly, the general properties of arbitrarily large games of a similar nature. Defining a game as level n if it has 2n+1 choices ("weapons"), we can call rock-paper-scissors a "level 1 game" and rock-paper-scissors-lizard-Spock a "level 2 game".

A map is a level 'n' game if each "weapon" must beat and be beaten by the same number of opposing weapons (for example, in rock-paper-scissors-lizard-Spock, every weapon is beaten by 2, and beats 2, of the other weapons). This makes it "fair", in that no one weapon choice has an advantage over the others.

A further property of the directed graph (digraph) as constructed, is that any three neighbouring weapons on the outside ring form a map that is equivalent to the original rock-paper-scissors map. Thus, the game "rock-lizard-Spock" is the same as rock-paper-scissors. Rock-scissors-lizard, however, is not, since rock beats both lizard and scissors. This proves that it is not the case that all level 1 subsets of the level 2 game are level 1 games. The property of neighbouring subsets being lower-level games is elegant, but not necessary in terms of arranging the digraph (that a level 2 game produces subsets that are level 1 games, it turns out, is guaranteed).

My next question was whether it was possible to construct an arbitrarily large level 'n' game that retained these properties with respect to lower level games. Leaving aside the designations of the weapons for the moment, and instead labelling them A, B, C, ... etc, then the next thing is to try to construct a level 3 game (that is, one with 7 weapons, [A, B, C, D ,E, F, G]). To retain the elegant graph structure, it was easy enough to observe that one way this can be achieved is to take the relationships of A with respect to B, C, D, and E in the level 2 game, and ascribe those relationships to F as well (that is, if A beats B, then F also beats B, and so on). Then, take the relationships of B with respect to C, D and E and ascribe those relationships to G (so, if B beats C then G also beats C, and so on). That leaves four relationships undefined, which are A to F, A to G, B to G and F to G. A fair game can be constructed by arbitrarily deciding whether A beats F or G and matching accordingly. To retain the property admired earlier, however, we want the [C, D, E, F, G] level 2 game to be the same as the [A, B, C, D, E] level 2 game. That means that letting F stand in relation to G in the same way that D stands in relation to E will enable us to fill in the rest of the graph according to the requirements of a fair game, and this produces the quality we wanted.

It is possible to produce the level 2 graph from the level 1 graph in a similar way (that is, with A = scissors, B = paper and C = rock, then to produce lizard (D), lizard, like scissors, must beat paper and lose to rock. Spock (E) can be produced by copying the relationship of paper to rock (i.e. Spock beats rock). This leaves the question of Spock's relationship to scissors, paper and lizard, and lizard's relationship to scissors. After these relationships have been copied, paper now beats rock but loses to lizard and scissors. That means paper has to beat Spock. Because we want the game rock-lizard-Spock to be the same as rock-paper-scissors, lizard must stand in relation to Spock as paper stands in relation to rock, so lizard loses to Spock. From that decision, the requirement of fairness allows us to finish the rest of the graph.

And the same method can be generalised for any level n game, the level n+1 game can be constructed using a similar method.

Using this method, the level 3 game can be constructed, and the two new items are as follows:

F: beats paper, lizard and G. Loses to scissors, rock and Spock.
G: beats scissors, rock and Spock. Loses to paper, lizard and G.

Readers are invited to try to come up with names, symbols/gestures, and explanations for the relationships, for these two new weapons!

[ETA: It turns out that this stuff has been done before, but I always thought it would have been - here's a game called RPS-25 (which corresponds in my terminology to "level 12", and that page has a link to a whopping RPS-101 (level-50!). Without seeing a chart like the one below, I couldn't follow it closely enough to say if it's the same as what my method would produce.]

I am not sure how motivated I am to follow this up, but there are lots of questions that have piqued my curiosity about these types of graphs/games now. For instance, in the proof below, I mentioned that a level 2 game must have 2 5-step non-transitive cycles in the map. I had a go at working out the same question for level 3 with respect to 7-step non-transitive cycles, but my scribbling was a bit untidy and I may have miscounted (I think it came to 21). I am curious as to the relationship between the size (level) of the game and the number of such cycles there are in it, and also the ratio between the number of level 1 games versus the number of sets of 3 weapons that are not level 1 games. (In the level 2 game, the numbers are equal, but does that hold for all levels?)

Thinking about this stuff takes me back to 'A' Level maths classes, and the coursework requirements. Happy memories!

***

To prove that a level 2 game necessarily produces smaller level 1 games within it, I constructed the initial non-transitive sequence of five weapons, A beats B, B beats C, C beats D, D beats E, E beats A:



(+1 means the letter on the left beats the letter across the top; -1 means the letter on the left loses to the letter across the top)

This leaves, for each weapon, two undefined relationships. For the digraph to be a game in the sense used above (that is, "fair"), it is clear that for each weapon, these two relationships must be opposite to one another: it beats one of them, and is beaten by the other. That gives only two choices for weapon A - either it beats weapon C or it beats weapon D. If A beats C, then for the game to be fair, C must beat E, and we already know that E beats A. If A beats D, then we already know that D beats E, and that E beats A.

By constructing a tree to show the conditions and possible paths, I was able to demonstrate that for any level 2 game, there must be 2 non-transitive cycles that involve all the weapons within the game (on the rock-paper-scissors-lizard-Spock graph, you can see the second cycle by tracing the 5-pointed star in the middle of the diagram, e.g. lizard, paper, Spock, rock, scissors and back to lizard).

2 things wot people said:

  1. Have you heard of RPS-25?

    You may also be interested in the concept of a k-embarrassing tournament :)

    ReplyDelete
  2. Thanks, pkle, no, I hadn't heard of that, but I have now! I'll put an edit-to-add at the bottom of the OP.

    I always expected someone else would have done the work before me but that's not the point of doing maths from my perspective - I do it because it's fun to figure stuff out for myself :-)

    ReplyDelete

Comments Moderation Policy

This blog is intended to be a place where I can develop my thoughts freely and get free and honest responses. Essentially, it is my safe space, and for that reason I have elected to maintain this blog as a moderated space. However, I am opposed in general to censorship and believe that usually the best way to kill a bad idea is with a better one, so very few comments will be rejected. Comments designed to cause offence for the sake of it (e.g. abusive or inflammatory remarks with no other content), or else those that I feel cross a boundary of human decency, are most likely to be rejected.