main | features | weblog | forums | cranky | personal | links | contact

  Sirlin.net Forums
  Sirlin's Articles
  Rock, Paper, and Scissors in Strategy Games

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Rock, Paper, and Scissors in Strategy Games
Sirlin
Administrator
posted 10-28-2000 02:46 AM     Click Here to See the Profile for Sirlin   Click Here to Email Sirlin     Edit/Delete Message   Reply w/Quote
Rock, Paper, and Scissors in Strategy Games

A simple rock, paper, scissors (RPS) system of direct counters is a perfectly solid and legitimate basis for a strategy game provided that the rock, paper, and scissors offer unequal risk/rewards.

Consider a strictly equal game of RPS. We’ll play 10 rounds of the game, with a $1 bet on each round. Which move should you choose? It makes absolutely no difference whether you choose rock, paper, or scissors. You’ll be playing a pure guess. Since your move will be a pure guess, I can’t incorporate your expected move into my strategy, partly because I have no basis to expect you to play one move or another, and partly because I really can’t have any strategy to begin with.

Now consider the same game of RPS with unequal payoffs. If you win with rock, you win $10. If you win with scissors, you win $3. If you win with paper, you win $1. Which move do you play? You clearly want to play rock, since it has the highest payoff. I know you want to play rock. You know I know you know, and so on. Playing rock is such an obvious thing to do, you must realize I’ll counter it ever time. But I can’t counter it (with paper) EVERY time, since then you could play scissors at will for a free $3. In fact, playing scissors is pretty darn sneaky. It counters paper—the weakest move. Why would you expect me to do the weakest move? Are you expecting me to play paper just to counter your powerful rock? Why wouldn’t I just play rock myself and risk the tie? You’re expecting me to be sneaky by playing paper, and you’re being doubly sneaky by countering with scissors. What you don’t realize is that I was triply sneaky and I played the original obvious move of rock to beat you.

That may have all sounded like double-talk, but it’s game theory (in the mathematical sense) in action. And it had quite a curious property: playing rock was both the naïve, obvious choice AND the triply sneaky choice. For much more on that concept, read my article on Yomi Layer 3.

Fighting games rely heavily on RPS. They have both overall games of RPS going on as well as many rapid fire situations of RPS. Virtua Fighter 3 games can even have 5 sets of RPS take place in a period of 2 seconds! No joke!

Virtua Fighter’s overall system of RPS is as follows: attacking beats throwing, throwing beats blocking or reversing, and attacking beats blocking and reversing.

To be clear, let’s define terms.

An attack is a move that deals damage. An attack has an initial startup phase where it can’t yet do damage (a punch extending), a short phase where it actually can do damage (the sweet spot of the punch), and a recovery phase (the arm retracts). If the defender is blocking correctly, an attack will not damage him, but he can be thrown.

A throw is a special type of move that instantly grabs an opponent whether he’s blocking or not and does damage. The catch is, a throw will not grab an opponent who attacking (specifically, a throw will fail if the opponent’s move is in startup or hitting phase).

A reversal is a special type of move that grabs an incoming attack. Reversals usually look like throws, but they work at the exact opposite times. A reversal only works when the opponent’s move is in startup or hitting phase, which are, incidentally, the only times a throw would fail.

Even these explanations are simplified, but the RPS system is basically there. Attack the opponent. If they tried to throw you, you’ll hit them. If they block or reverse your attack, they nullified your attack. If you expect them to block, you can throw. If they expect you to throw, they can attack.

Dead or Alive 2 basically uses this same system, except that the risk/reward for doing a reversal is much different. Reversals are difficult and relatively rare in Virtua Fighter, but they’re incredibly easy and do a ridiculous amount of damage in DOA2. Reversals are so effective, in fact, that they can paralyze the enemy into not attacking for fear of being reversed. Of course, that’s when you throw them….

Real-time Strategy games are the other kings of the RPS system. Like fighting games there’s the concept of RPS on large scale and a small scale. On the small scale, particular units are designed to counter each other in a RPS way. A marine dies to a guardian. A guardian dies to a corsair. A corsair dies to a marine. Abstractly, there are 6 categories of unit. Ground units can either attack 1) other ground units, 2) air units, or 3) both. Air units can attack 4) other air units, 5) ground units, or 6) both. Pure ground-to-ground units usually beat both other types of ground units, yet lose to both types of air units that can attack ground. Similarly, pure air-to-air units usually beat both other types of air units, but loose to both types of ground units than can attack air.

RPS is not limited purely to units countering each other though. Real-time strategy games also have the concept of trading off powerful units now for a strong economy now, which leads to even more powerful units later. So on one extreme, a Zerg player in Starcraft might sacrifice his entire economy to get a quick attack force (“6 pool” is the term). This will likely beat a player who chose the other extreme of playing for pure economy and no immediate attack force (by building double oven triple hatcheries). A moderate build (pool on 9th peon, one sunken colony) will likely defend against the early attacker’s rush, though. Surviving the rush, the moderate build will have a much superior economy and win in the end. However, this moderate build will produce an inferior economy to the player who built 2 or 3 hatcheries and went for pure economy.

This is all very textbook and a number of other factors come into play in practice, but the underlying RPS is there, and it most certainly has unequal payoffs. In Starcraft, the early rush is a very, very risky strategy. It’s all or nothing. You’ll either win right away off it, or your rush will fail and you’ll almost surely lose. Because of this, the early rush isn’t all that common (depending on the map), but the very threat that the opponent might play the early rush is enough to stop you from playing for pure economy every time.

RPS Gone Horribly Wrong: Killer Instinct 2

Killer Instinct 2 boasted a rock, paper, and scissors system of moves. Every character had 3 moves assigned RPS designations. It was all rather arbitrary and artificial. Jago’s “rock” move would beat any other character’s “scissors” move. Jago’s “scissors” move beat any other character’s “paper” move. The entire system was so homogeneous, that there was little basis from which to choose rock over scissors. The gameplay was based on blind guessing, and felt hollow and devoid of strategy. RPS needs to be a natural part of the game, and it absolutely has to have unequal risk/rewards for each move.

For those interested in reading about the lighter side of RPS strategy, I’ll leave you with this link: http://www.worldrps.com/index1.html

--Sirlin

IP: Logged

Flayra
Junior Member
posted 07-30-2002 10:19 AM     Click Here to See the Profile for Flayra   Click Here to Email Flayra     Edit/Delete Message   Reply w/Quote
Great article. Since finding your site, I'm devouring your every article.

The one point I can think might deserve adding, is that along with varying costs/payoffs to each component in the RPS set, a game is further enhanced by being able to discern your opponent's direction before it occurs. I think that varying costs/payoffs in the RPS hand-game would make it more interesting then the game on it's own, but it's nowhere near as interesting as the interactions around VF or Starcraft, where you're probing your opponent for every bit of information you can, ie, watching their animations and movements closely in VF, or scouting your opponent in the early game in Starcraft.

------------------
Game designer and programmer
http://www.natural-selection.org

IP: Logged

DemonAtheist
Junior Member
posted 10-03-2005 05:36 PM     Click Here to See the Profile for DemonAtheist   Click Here to Email DemonAtheist     Edit/Delete Message   Reply w/Quote
i agree that most games involve unequal risk reward RPS for much the same reasons that people stop playing equal r/r rps after a while. i was wondering how often you would say game makers go for rule-of-five systems instead of RPS (example of RoF would be rock-paper-scissors-lizard-spock), which while still needing unequal r/r, need far less to be engaging.

IP: Logged

SoulSeek
Junior Member
posted 11-06-2005 07:40 PM     Click Here to See the Profile for SoulSeek   Click Here to Email SoulSeek     Edit/Delete Message   Reply w/Quote
This topic in particular appealed to me. I pretend to know a bit about game theory, and if you can at least estimate the payoffs which occur for your choice versus your opponent's, there exist concrete equations determining how often you should use each choice to obtain an optimal payoff, if your opponent is playing against you to allow the least payoff. I found these equations on my own for the form of a thee-choice, or RPS game with unequal payoffs.
It turns out with your $1, $3, $10 example, that you should use rock a fraction under 70% of the time, paper 23% of the time, and scissors is left with 7%. This will guarantee you an average of 70 cents per game, and more if your opponent is playing a sub-optimal strategy.
What at first looks like a deeply complex guessing game with endless, self-encircling yomi levels, actually has a single perscribed mixed strategy.
Although this example is over-simplifed in most cases, the ideas stretch to emcompass any game we might be engaged in.

IP: Logged

x1372
Member
posted 11-10-2005 10:25 AM     Click Here to See the Profile for x1372   Click Here to Email x1372     Edit/Delete Message   Reply w/Quote
Soulseek, the problem with any pure simple strategy like that... in any RPS like game, not just sirlin's little idea here... is that any strategy like yours is designed simply to minimize loss. If I know your strategy, I can take advantage of it - and have an average gain on you simply by picking paper every single time. If you play rock 70% and scissors 7%, if we play 100 times I just gained 49 dollars by simply choosing paper every time. Heck even if I chose the most stupid basic strategy of playing rock every time I would gain 47 dollars, with how rarely you play paper.

This shows exactly why these RPS games stay alive so long after they come out. It's all about adaptation. If I know you're using a computer to do your odds thing, I can win by adapting and simply choosing paper. You may be using the general ideal, but if I know and expect it, I can still profit off of it.

Now if I was playing against a "real" human with this? I'd have to play a guessing game with him. Going rock too much would make him play a lot of paper... giving me the opportunity of playng scissors, though then I'd be at risk if he happened to choose rock on me... or if I continued to play paper I could sneak in rock every once in a while to take advantage of his counter. In 1000 games, assuming both players are relatively smart and adaptive, it is unlikely that more than 100 dollars will change hands. If I play 1000 games with your little simulator, I would probably have gained at LEAST 200 - I would have recognized your pattern and adapted, while your insistence on repetition would put you further and further in debt.

From my experience, there are 3 major things that you need to do well in fighting games - Knowledge of the game, Technical skill, and adaptation (or mind games, as some would call it). I know in the games I play that mind games are the deciding factor most of the time - I'm quite a bit less technically advanced than several people that I can consistently beat. And in this RPS system, technical skill is a nonissue, so once you know the basic rules, adaptation will beat any set-in-stone strategy.

IP: Logged

SoulSeek
Junior Member
posted 11-10-2005 07:10 PM     Click Here to See the Profile for SoulSeek   Click Here to Email SoulSeek     Edit/Delete Message   Reply w/Quote
You are talking about using a pure strategy against my mixed strategy. If a mixed strategy is optimal for me, it would be for you as well.
Also, what I got out of Sirlin's example is the player he assumes perspective of will gain money for his victories, while that player's opponent doesn't. My strategy is based upon that, perscribed for the player in a position to gain money. That is fitting to situations where one player is on the attack and the other is trying to cancel out damage done to him.
Assuming you were thinking of a complete, fair game where both players stand to gain $1 for paper, $3 for scissors, and $10 for rock, the mixed strategy changes.
In this example, both players would be best off using rock 21% of the time, paper 72%, and scissors 7%. If both players do this, they will guarantee no loss to themselves in the long run. Any deviation from this strategy to favor a move more will have a negative impact, as long as the other player stands by the original.
A player who presents and attempts to elicit patterns in guessing games will have nothing to gain against the one who does not, where a mixed strategy is optimal.

[This message has been edited by SoulSeek (edited 11-10-2005).]

IP: Logged

x1372
Member
posted 11-11-2005 09:59 AM     Click Here to See the Profile for x1372   Click Here to Email x1372     Edit/Delete Message   Reply w/Quote
The point I'm trying to make here, and what makes RPS style games interesting, is that whether or not you're using a mixed strategy here is irrelevant. If I know what your strategy is, I can take advantage of it and profit from it. Even if it is a small profit, I would be gaining against your algorithm. For example, if I chose scissors every time, even against that algorithm you showed there, I will gain 6 dollars over 100 rounds. It may be a small gain, but it is a gain. I'm not going to spend the hours working out a complex algorithm that will be optimal against the 21-rock 72-paper 7-scissors, but there probably is one. While it may not have a very large average gain, there will still be gain. I realize you could extend this and go into decimals... but assuming you do, your algorithm will, at best, break even with the strategy of the same choice every time. In fact, any strategy would be even on average with it - the average gain (and average loss) of all options is 0 against it.

So the problem is that this "ultimate" player, if we extend this to fighting games, would over the long run go completely even with a scrub who picks the same tactic over and over - a scrub that thinking, smart players could beat easily. Long run is all fine and nice... but games take place in the short run, relatively speaking. While a fighting game would have hundreds of RPS moments with the risk/reward of everything, which you could calculate, the end result is that your algorithm will have a 50% win-loss record, in theory, against everyone. No tournament setting would reward this - this player could go very far occasionally, and maybe even beat the best player at times, but when every match is a coin flip you aren't going to win many tournaments.

IP: Logged

SoulSeek
Junior Member
posted 11-11-2005 12:37 PM     Click Here to See the Profile for SoulSeek   Click Here to Email SoulSeek     Edit/Delete Message   Reply w/Quote
You messed up somewhere. If I use 7 scissors, 72 papers, and 21 rocks in 100 games, and you use scissors every time, your gain will be
7 * $0 = $0 (scissors vs. scissors)
21 * $-10 = $-210 (my rock vs. your scissors)
and 72 * $1 = $72 (my paper vs. your scissors)
72 - 210 = $-138.
I will win 138 dollars for every 100 games if I use my strategy and you use scissors every time. The only way to cancel out my strategy in this game is to use it. Anything else will mean loss for you. And a scrub isn't going to stumble on the exact ratio.

[This message has been edited by SoulSeek (edited 11-11-2005).]

IP: Logged

x1372
Member
posted 11-13-2005 07:00 AM     Click Here to See the Profile for x1372   Click Here to Email x1372     Edit/Delete Message   Reply w/Quote
scissors gains 3 dollars when it wins.

7*0=0
21*-10=-210
72*3=216

216-210=6

The point I was making still stands that your ratio will only miniize loss. If you look at it from a statistical standpoint, your ratio (assuming you take it farther and add decimals) to eliminate the inherent advantage of scissors I demonstrated) will end up going even with the opponent no matter what he chooses.

Think about it: rock wins 10 dollars ~7% of the time, and loses 1 dollar ~70% of the time. in the long run, its a wash.

paper wins 1 dollar ~21% of the time and loses 3 dollars ~7% of the time. Again, in the long run, we break even.

Scissors gains 3 dollars ~70% of the time and loses 10 dollars ~21% of the time. Assuming things are actually balanced wth decimals, scissors will break even against your algorithm too.

If all 3 individual options break even against your algorithm any time, any combination will also break even. So yes, you've found a scenerio where you won't lose to anyone in the long run, but you won't gain anything either.

IP: Logged

SoulSeek
Junior Member
posted 11-13-2005 06:47 PM     Click Here to See the Profile for SoulSeek   Click Here to Email SoulSeek     Edit/Delete Message   Reply w/Quote
My apologies, I stand corrected. I assumed that since there was an optimal mixed strategy, that using it would cause a loss to your opponent if he wasn't using it. Instead, both players must not be using that strategy in order to see a gain either way.
It didn't make sense that both players have the ability to make the other player's choice not matter, but now I see that is the reason mixed strategy works.
I still think using mixed strategy is important until you can see what your opponent is doing wrong and exploiting it, but I admit with my new understanding, mind games are critical to obtain an advantage.

IP: Logged

x1372
Member
posted 11-16-2005 06:53 AM     Click Here to See the Profile for x1372   Click Here to Email x1372     Edit/Delete Message   Reply w/Quote
oh you're perfectly correct on that point. Having a mixed strategy of some sort initially is far better than nothing, or usually even a consistent strategy, when dealing with an opponent that you don't have any way to predict yet.

I generally pride myself on my ability to read and react to opponents in super smash brothers: melee. I am not a top level player by any means - my timing and execution are far lower than average... yet I am VERY rarely in the bottom 75% of entrants at any given tourney.

And yet, despite that, I have 3 preset strategies that I tend to use until I can get a bead on my opponent and start dealing with his strategy. Depending on the opponent and situation, I may never need to stop using any of these (and indeed, if I'm gaining I don't) . When I mix them up... especially since they tend to have completely different advantages and disadvantages... lets just say I've managed to drive several players who were far better than myself nuts with my style of play.

So yeah, having a game plan, especially a mixed one, going in is very important. However, when it comes right down to it, mind games are very important for gaining a clear and consistent advantage.

IP: Logged

Kicks
Member
posted 11-24-2005 05:09 AM     Click Here to See the Profile for Kicks   Click Here to Email Kicks     Edit/Delete Message   Reply w/Quote
Sirlin's comment on playing obviously weak moves reminds me a lot of poking. Let's say your playing someone very often, maybe at an arcade, or your in the finals with them so there are many matches ahead. You both have used a consistent style that can recover well, but can't really pick up steam. He's a bit better than you so the matches have shown back and forth momentum then close near the end, but he's winning. Usually at the end of the round, poking becomes more common. Poking at the beginning of the match can be extremely important, when the opponent feels like they can give up that kind of damage despite knowing you have forfeited setups. The mental weight and value of a quick low kick seems petty with full life. No matter what that kick is gonna do the same amount of damage (exclude juggles, ducking, counter hit, etc...). Using the mental weight of a move at decisive times is quite advantageous.
So you start poking at the beginning and near the climax of matches you have more life and start winning rounds. Reminds me of what Sirlin said about how Vega will lose if he falls behind. As an aside-You may have an advantage by picking up on this new strat first. Because when the opponent shifts, you will have been ready for them to do that and you counter it. The real trick is to consider all their options as a counter. That to can turn into some RPS of strats each start of a round.

IP: Logged

ycz6
Junior Member
posted 04-01-2006 09:57 PM     Click Here to See the Profile for ycz6   Click Here to Email ycz6     Edit/Delete Message   Reply w/Quote
SoulSeek must have calculated slightly wrong.

The optimal strategy in this game is 3/14 Rock, 5/7 (10/14) Paper, and 1/14 Scissors.

If your opponent uses all Rock, then he will get -1 10/14 of the time, and +10 1/14 of the time. -1*10+10*1=0. Even.

If your opponent uses all Scissors, then he will get -10 3/14 of the time, and +3 10/14 of the time. -10*3+3*10=0. Even.

If your opponent uses all Paper, then he will get +1 3/14 of the time, and -3 1/14 of the time. 1*3+-3*1=0. Even.

No matter what your opponent plays, he will never do better than 0. This should be obvious, since the game is symmetrical.

[This message has been edited by ycz6 (edited 04-01-2006).]

IP: Logged

pictish
Junior Member
posted 07-11-2006 05:22 AM     Click Here to See the Profile for pictish   Click Here to Email pictish     Edit/Delete Message   Reply w/Quote
The problem is, you're not just throwing stats against one another.

The %'s of RPS aren't suddenly thrown at eachother - it happens over the span of games.

No matter what strategy you use (even in normal rock paper scissors), patterns emerge. Sure, you might try and randomly mix it up - but even random number generators are just working on algorhythms. A human simply cannot become 'random'.

Unless I've misunderstood something, the potential for payoff against these '% of the time' strats is variable depending on A) How good you are at mixing your patterns B) How good I am at anticipating.

If I KNOW you tend to go for one of your deignated 'rocks' after I win with rock, I just got a free paper win. The point is, in all games people tend to have patterns or habits. Exploiting these and hiding your own (or not developing your own in the first place) is how to beat that specific opponent more easily than with whatever base strategy you have.

IP: Logged

All times are PST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | www.sirlin.net

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.47a