Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411502 Posts in 69379 Topics- by 58435 Members - Latest Member: graysonsolis

April 30, 2024, 05:41:07 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignadding Strategy to Rock Paper Scissors
Pages: [1] 2
Print
Author Topic: adding Strategy to Rock Paper Scissors  (Read 4108 times)
JasonPickering
Level 10
*****



View Profile WWW
« on: August 20, 2010, 03:16:02 PM »

alright guys, so how would you add strategy to rock paper scissors.

I have a game where you must play RPS to defeat monsters. the problem is the game is very much based on luck right now. the enemies randomly choose one of the 3 as do you. maybe you win maybe you don't. I tried making it so enemies have a greater percentage of throwing Rock for example but then if the player knows this throwing paper will give you a great chance of winning so they just throw paper. so how would you change this?

one idea right now is the choices flash very quickly, and if the player is paying attention they might see what the enemy will throw.
Logged

Landshark RAWR
Level 10
*****



View Profile
« Reply #1 on: August 20, 2010, 03:32:54 PM »

Try throwing an optional "second hand", for example you could have sword>axe>spear but for example your fighting a weapon who uses spears and is weak against fire, so instead of using your axe to beat it, you could also use your fire enchanted spear to win.
Logged

John Nesky
Level 10
*****


aka shaktool


View Profile WWW
« Reply #2 on: August 20, 2010, 03:48:06 PM »

Of course Rock Paper Scissors already has strategy, with humans or with AI or both. But personally I don't think it's very fun, and I'm guessing you agree since you're trying to change the strategy.  Tongue

Sirlin suggests unequal payoffs.
Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #3 on: August 20, 2010, 03:59:26 PM »

The original DungeonQuest board game had an interesting variation on rock/paper/scissors. I'll see if I can explain it. You have three options Mighty Blow/Slash/Leap Aside. The outcomes are as follows:

Mighty Blow vs. Mighty Blow - Both sides take one damage
Mighty Blow vs. Slash - Slash takes two damage
Mighty Blow vs. Leap Aside - Mighty Blow takes one damage
Slash vs. Slash - Both sides take one damage
Slash vs. Leap Aside - Leap Aside takes one damage
Leap Aside vs. Leap Aside - Both sides take one damage

On the face of it playing Mighty Blow has the best risk/reward ratio, but that's where the strategy comes in as your opponent knows that too and can use Leap Aside against a player who spams Mighty Blow. Of course you can change the names of the actions to fit your game.
Logged

SirNiko
Level 10
*****



View Profile
« Reply #4 on: August 20, 2010, 04:15:03 PM »

Princess Tomato in the Salad Kingdom turned the strategy into learning the patterns of foes. You simply needed to learn the order and preference of foes and you could easily win. This could be done via trial and error, or by talking to NPCs for clues.

To do this in your own game, you might try the following - Simple foes would require you to identify and use the right sign to beat them without taking damage (blue always uses rock, red always uses scissors). Advanced foes might look very similar, and require you to discern subtle differences, like eye color or style of hat. Expert foes change behavior based on certain conditions, like the terrain type or the weather.

This kind of a game would be very combat lite, so I'd focus on making the non-combat entertaining and the fights exist mostly to push along a story or be one-time puzzles.

Another idea, the player must find and/or buy rock-paper-scissor cards. Advanced cards may feature more than one sign or even beat all signs. Certain cards prevent the foe from using one sign for a few turns, and others grant multiple wins/extra damage if you play them against the right sign. Combat is as much about identify the pattern of the foe as it is about finding and buying enough cards and then sparing them for when you need them. This would be much more appropriate for a game with large quantities of combat as it offers more variation.
« Last Edit: August 20, 2010, 04:21:01 PM by SirNiko » Logged
kenesque
Level 1
*


mover of pixels


View Profile
« Reply #5 on: August 20, 2010, 04:28:22 PM »

Of course Rock Paper Scissors already has strategy, with humans or with AI or both. But personally I don't think it's very fun, and I'm guessing you agree since you're trying to change the strategy.  Tongue

Sirlin suggests unequal payoffs.

As much as I detest using Sirlin as an example, yes making unequal payoffs it the best way to go. Though you'd have to build enemies around this fact as well. If you simply made the payoff unequal without the enemy having behavior, it'd be just as random, except now you can afford to choose the highest reward/lowest risk option because in the long run it will pay off.

Make conservative enemies, make enemies that take heavy risk, make enemies that choose based on your previous behavior, make enemies that simply favor a certain hand, try and emphasis their behavior through something other than the behavior itself (a shy looking enemy will play more conservatively for example).
Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #6 on: August 20, 2010, 05:09:16 PM »

How about adding in combos. Playing moves in a certain order will deal more damage. If your opponent identifies that you are going for a combo early they can play all the winning moves during your combo. For example, a five move combo gives you an extra 3 damage/points. If you realise your opponent is going for this combo after the second move you now know the next three winning moves, effectively cancelling the combo.
Logged

Montoli
Level 7
**


i herd u liek...?


View Profile WWW
« Reply #7 on: August 20, 2010, 05:39:29 PM »

I think the real key here isn't "how to add strategy to Rock Paper Scissors" as much as "how to communicate enough information to the player that they can act on that strategy".

I mean, the human vs. human championships, they are face to face, and can try to read body language.  The AI vs. AI versions, they play huge numbers of games in rapid succession, so they can try to analyze each others' playstyles.

If you want to do it in a game, then you need to have some similar mechanism where the player can believe that it is more than just luck.  If the player has no idea what the opponent will do, and all choices are even, then it is luck.

Unequal payoffs by themselves won't make it fun.  They will just allow the player to optimize/risk manage.  I mean, thought-experiment:  If the CPU decides every turn with a die-roll what to do, but gets one point for winning with Rock, 2 points for winning with Scissors, and 3 points for winning with paper, the game still isn't fun.  (Try it yourself with a die if you don't believe me!)  (The reason they work in Sirlin's example is the implicit assumption that you are playing vs. a real person who, just like you, wants to win as much money as possible.  So you can devise your strategy around what you think he's going to do based on that assumption.)

Unequal payoffs only make it fun if you have some evidence that the game is NOT random, and can try to outthink it.  I think in this case, unequal payoffs only really serve to provide some motivation for certain moves, so you aren't working in a complete vacuum of "I have no idea what move he would want to play here..."

My $0.02 at least.
Logged

www.PaperDino.com

I just finished a game!: Save the Date
You should go play it right now.
JasonPickering
Level 10
*****



View Profile WWW
« Reply #8 on: August 20, 2010, 07:58:36 PM »

yeah I guess the main problem is when you choose fire and the enemy chooses water, right now its "oh they got lucky". I want it to be "ah they outsmarted me, I should have known they were going to pick that". But aside from devising a Turing Test, I don't know.
Logged

Landshark RAWR
Level 10
*****



View Profile
« Reply #9 on: August 20, 2010, 08:00:00 PM »

Warning - while you were typing a new reply has been posted. You may wish to review your post.

If your rock pape4r scissors system is based on weapons, you could make it so they degrade after extended use or getting bonuses from certain circumstances.

Logged

JasonPickering
Level 10
*****



View Profile WWW
« Reply #10 on: August 20, 2010, 08:06:12 PM »

actually I just use Fire > Plant > water. no actual weapons or anything.
Logged

Rob Lach
Level 10
*****



View Profile WWW
« Reply #11 on: August 20, 2010, 09:53:17 PM »

This is a common designer interview question btw.
Logged

kenesque
Level 1
*


mover of pixels


View Profile
« Reply #12 on: August 21, 2010, 12:46:44 AM »

actually I just use Fire > Plant > water. no actual weapons or anything.
You're probably going to need to add more detail than that. How many skills do the player and enemies have available to them? Do they have different risks/rewards/situational uses? Unique flavor? (which in turn can be used for behavioral patterns, some monsters may like overly flashy attacks but some would settle for mundane but more useful etc).  Is there resource management? Actual luck? (Critical hits, dodging, varied damage)?

It may be wise to model your RPS system after another game, then tune it and tweak it to your own tastes and game setting.
This is a common designer interview question btw.
That's interesting to know Smiley
Logged
Dustin Smith
Level 10
*****


Eskimo James Dean


View Profile WWW
« Reply #13 on: August 21, 2010, 04:38:09 AM »

http://www.glorioustrainwrecks.com/files/bedge.rar

Bushido Edge. My favorite fighting game ever. Basically, Attack/Feint/Block/Attack/Feint... etc.
Logged

shig
Guest
« Reply #14 on: August 21, 2010, 05:36:36 AM »

yeah I guess the main problem is when you choose fire and the enemy chooses water, right now its "oh they got lucky". I want it to be "ah they outsmarted me, I should have known they were going to pick that". But aside from devising a Turing Test, I don't know.

Sounds like a fighting game to me. Except you should replace "fire" with "jumping kick" and "water" with "shoryuken".
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #15 on: August 22, 2010, 05:56:35 AM »

Everything important was said:

AI must have an understandable behavior:
It should be readable and make sense, not entirely predictable. If random it should be based on clear context to be fine. It let the player evaluate risk.
ex: If the enemy have some high probability to heal himself when his hp is low, the player might recognize that and anticipate a moment of relief.

You should have push risk mechanics:
The reason is simple it makes choice more interesting, basic strategy is play safe vs playing risky. Risky movement should have high pay off to be worth, but not to high in order to not become an optimal strategy. It also give rush of adrenaline which is good in experiencing the game.
Ex: The lancer is GOW is a close combat mechanics that may expose the player but instantly kill an enemy.

Resource management:
This is very important in change risk assessment. It shift the context and the meaning of action. Unleashing that huge but slowly build attack when you are near dead is not the same at when you have plenty of life. The same movement is safe in one case and risky in the other. It's not the same either if the enemy HP is low or full. Resource help establishing stake, it should be clear how much risk involve their consumption. Risk is evaluate by how close to failure or success a move put you. Tension arise when success and failure are both close at the same times. Amno, HP, mana, lag, distance, range, round, turn, etc... are all resource.
Ex: birth of awesome

look at health bar, if you are familiar with the game mechanics it make it even more awesome.

RPS is just a way to balance those 3 parameters. If you understand that, more power to you.

EDit
http://www.sirlin.net/articles/designing-kongai.html
A good read too
« Last Edit: August 22, 2010, 06:12:03 AM by neoshaman » Logged

JasonPickering
Level 10
*****



View Profile WWW
« Reply #16 on: August 22, 2010, 04:15:28 PM »

so after reading about the kongai game and all the other things I came up with this.

3 moves
- attack: does damage if opponent attacks or counter-magics
- counter magic: stops enemy from healing and damages them
- heal: heals you and shields you from an attack.

so attack > counter > heal.

but attack is the only thing besides counter that harms the other player and a counter only harms them if they try and heal. now I need to build some competitive AI.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #17 on: August 22, 2010, 05:24:43 PM »

Pretty interesting!

It makes attack predominant in opening and healing in ending, creating some predictable pattern and yet add tension into the mind game.

The problem is that it can create static game: Heal and attack balance themselves and you can get into an endless loop (no resource sink). You need something that precipitate the game to its end no matter what. Generally you have one resource that only sink and allow the game to reach an end. IN fighting game health and time generally does that. Racing game have an obvious sink (the track/distance to end). You'll  want your game to work technicvally like a race (ie in your game racing to enemy death).
You need a decisive sink somewhere.
For example: in naruto like fighting game counter attack got faster and faster as you counter a counter while damage stack up, the first one to fail the timing frame is harsly punished, it keeps the game going to an end.


Try to chart AI behaviour around faillure/success axis. 4 principals cases:
Failure would be determined by how close the char are from death (hp close to 0)
Success would be measured by how close his enemies are from death (total Hp close to 0)

1st case: Low failure and low success scale
Obviously no real risk, offense is the dominant obvious strategy (increase success scale).

2nd case: High failure low success
High risk, healing is the obvious choice, it's about survival (decrease failure)

3rd case: Low failure high success
Risky offense, it's a clear domination trade off can be made to kill enemy as quick as possible.

4th case: High Failure High success
TENSION! you either lose or win, it's all about the mind game.

Pay attention that moving from one cadrant to another can be interesting.
For exemple moving from 2nd to 3rd case is call a DRAMATIC COME BACK, it's usually achieve by adding a rubber band mechanics (super bar in fighting games, items in mario kart)

Advice you want to have as many situation to create diversity, but try to keep failure and success close to each other so they can build effective tension.
Logged

JasonPickering
Level 10
*****



View Profile WWW
« Reply #18 on: August 22, 2010, 05:43:04 PM »

thanks I am actually using a grid for AI descions right now

i take the health of each person and divide it by its total. this gives me a percentage
0-33% = A
33%-66% = b
66%-100% = C

then I have different percentages for where it falls on the grid

AA AB AC
BA BB BC
CA CC CC

also I forgot to mention I am limiting the amount of heals to 4 per battle 4 might be to many but we'll see, thats what testing is for. I might also limit the counters also. I was also thinking of giving the player 1 heal, then can upgrade to more if they want, and then specific bad guys would also have different amounts of heal and counters. I almost just want to get rid off the AI and have players battling each other, but I don't know how multiplayer works with flash.
Logged

SirNiko
Level 10
*****



View Profile
« Reply #19 on: August 22, 2010, 06:13:56 PM »

What role does combat take in your game? What percentage of the game would you say is combat? (100%, 50%, 10%?)
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic