1. Hey Guest, looking for Virtua Fighter 5: Ultimate Showdown content? Rest assured that the game is identical to Virtua Fighter 5: Final Showdown so all current resources on here such as Command Lists with frame data, Combo Lists and the Wiki still apply. However, you can expect some VF5US specific changes to come soon!
    Dismiss Notice

The Mathematics Behind Throws

Discussion in 'Wolf' started by Zass, Feb 5, 2013.

By Zass on Feb 5, 2013 at 9:41 PM
  1. Zass

    Zass Well-Known Member

    XBL:
    Zass30
    Have you ever wondered what the best throw to use is? Should you do your most damaging throw? Should you mix up your throws? Should you do the weakest throw because no one breaks it?

    Fighting games are based on two players making decisions simultaneously. Different choices give different payoffs.

    Throws are an especially interesting situation in VF5:FS, because the attacker and the defender have to simultaneously choose from three options. The defender is trying to predict what the attacker will do, while the attacker is trying to do the most damage possible while not being predicted by the defender. It almost seems like a game of cats going in circles -- as soon as you develop a pattern, your opponent can develop a counter pattern to exploit your pattern. Is there any way to win the mind games?

    Nash equilibrium is a strategy that cannot be exploited. In other words, you could tell your opponent what your strategy is, and he could do nothing to change your payoff. The Nash equilibrium strategy for the attacker means that you are playing optimally to maximize your damage, no matter what your opponent does. For the defender, it means your are playing optimally to minimize your average damage.

    Either player can deviate from this strategy, but doing so exposes that player to being out-predicted. So you may find that your opponent is weak, and that you can always do your most damaging throw. This increases your damage, but your opponent may learn from this and always escape your throw. Then you modify your strategy, and so the game of cats begins again... Nash equilibrium is an escape from the mind games.

    In this video, I outline the concept of Nash equilibrium, and go through a case study of deriving the optimal probabilities of Wolf's standing neck clutch throw stance. This video is lengthy and mathematical in nature:



    For those of you that want to skip the math, this video shows the optimal throw percentages for each of Wolf's setups:



    Some of the conclusions presented may be unintuitive.
     

Comments

Discussion in 'Wolf' started by Zass, Feb 5, 2013.

    1. Xzyx987X
      Xzyx987X
      Ah, yes, it appears it did. Sorry, I just kind skimmed through the video because it was rather long. Incidentally, one method I thought of to help keep your distribution random, is to glance at the value in the seconds position of the match timer before you input a throw to determine which one to use. Assuming you are using the probabilities for Wolf's throws in the video's example, that would mean if you see the second position is 0-2 you'd do the back throw, if 3-6 you'd do neutral, and if 7-9 you'd do forward. Although for the best possible distribution using this method you should also rotate which numbers correspond to which throws.
      Zass likes this.
    2. Zass
      Zass
      Haha! That made me smile, because I thought the exact same thing. Ever since I calculated these probabilities I've been wondering how to act randomly without falling into the trap of trying to fill a distribution (as you correctly mentioned in your last post).

      My thought was to look at the seconds timer, exactly as you described. Although even then I thought I might end up being too predictable, as if it's the last few seconds on the clock then I would end up doing the same thing every time. So then my thought was to rotate the numbers->throw mappings based on stage... but even that might be too predicable! People are really good at picking up patterns. What I really need is the real life superpower ability to just pause time, compute the nash equilibrium of every scenario, and then roll a die to pick the randomly weighted option :)

      We appear to have very similar thought processes :)
    3. Genzen
      Genzen
      Could just mash the joystick in all directions and spam on P+G. That'd be random!
    4. Zass
      Zass
      That's true, and that's actually an excellent way to be random with equal weights. That's what I try to do when I or my opponent are low on life and any direction would kill them (like in standing neck clutch).

      But how to act in a weighted random strategy? That's where the suggestion of using the clock fits in.
    5. Myke
      Myke
      Erdraug, have you been holding onto that "complete guessing game" link for 2 years? Damn. I'm not even sure what point you're trying to make.
    6. El_Twelve
      El_Twelve
      Mmmmm. Very nice info here. Thanks for typing that up.

      Makes me think a bit of one of Sirlin's old articles.
    7. erdraug
      erdraug
      Yes i have :oops:

      At the time i was trying to point out that the guessing game is "complete" for every character since all the options available are known to both players in advance.

      AFAIK it's one the hypotheses one has to make in order to appreciate Zass's approach.
    8. aoi ameindei
      aoi ameindei
      can we see the nash equilibrium
      for aois chougarmi chain throw
    9. Genzen
      Genzen
      You should be able to follow the instructions in the video and work it out for yourself. I know diddle-squat about maths and I was able just to plug-in the numbers for Eileen and and Kage and see what's what.
      Zass likes this.
    10. SDS_Overfiend1
      SDS_Overfiend1
      This info is cool props for digging deep but IMO...Breaking throw directions comes down to Habit, Flow and Ring postioning in FS. In Vanilla you can basically eliminate the 2 strongest directions depending on certain characters so you can protect yourself well against Habit,Flow and Ring Positioning.
      Genzen likes this.
    11. Shouta
      Shouta
      Habit, flow and ring positioning are pretty big things to consider but as a general idea, considering this concept is pretty good if you're trying to analyze your own throwing style. Most people say that this game is more dealing with the player than the character and understanding how this works can allow you to understand why something occurred the way it is when you're playing against someone.
      capt_catalina and Genzen like this.
    12. EmX
      EmX
      Is it possible for this to take into account setups after a throw successfully executes? The time left to you before they rise is pretty critical for what you're able to do to keep the pressure on. For some characters it's the whole point of doing a particular throw to begin with.
    13. Zass
      Zass
      That's an excellent point, Emx, and yes, a more accurate nash calculation would take this into account.

      The way one would do this would be to calculate the nash value of each setup. Similarly, to calculate the nash value of striking vs throwing, one would want to factor in not just the damage a strike does, but the frame advantage on hit/block.

      In essence, the problem becomes translating frame advantage to damage. In other words, how much damage is being +5 frames worth? For high numbers, we can do this. For example, if I'm at +20 frames, one could argue that the value of +20 frames is the damage of the biggest combo I can land at +20. But at +5, nothing is guaranteed. How do we find the value of being at +5? Well to do that, we'd have to draw a nash matrix of every possible attack, and every possible response -- and see what damage comes out of all of those. But not all of those combinations would lead to damage. Some would lead to another situation where you are at -3 on block (for example). So then to calculate the value of -3 frames, we have to again consider every possible response... the problem quickly becomes one of comparing every move in the game to every other move in the game.

      With such data, one should be able to calculate the nash value for the entire game! This would be interesting, as one could then predict with theoretically perfect play the value of character matchups.

      Going back to more practical matters, if a good player could list all the setups after each throw for a given character, I could try my hand at calculating a nash value that takes into account those setups. I confess however, that since most setups involve strikes, it will be very hard to do this without ending up having to calculate everything as described above.

      As a final thought, one way to approximate the values of being +5 frames would be to list the damage values of +10 and above. At +10 we have the nash values from throw setups, at +12 we have the damage of p+k, and at higher values we can take the guaranteed best combo. We could plot those as a graph and interpolate (best guess) what the damage values for lower frames would look like from that data. That would seem like a reasonable approximation.

      So I'd need a table like

      +12: XXX guaranteed damage
      +13: YYY guaranteed damage
      +14: ZZZ guaranteed damage
      ....


      Anyone up for listing out that data? That would be a step towards finding the approximate value of the setups you describe.
    14. Genzen
      Genzen
      It'd be interesting to see an A.I. do this. I'd be curious to see how strong it would be, since, theoretically, it wouldn't have anything exploit (such as always doing rising low sweeps or whatever) and would being playing in a statistically superior manner, but would not be adjusting to the opponent's inputs or 'learning'. And then, the next step would be to create a system that allowed the A.I. to update the weightings for every attack and defence based on the opponent's actions (such as giving a higher weighting to a particular throw direction every time the opponent uses it, for example), so that it is dynamically applying the 'correct' weightings to every situation based on how the opponent plays. It would likely lead to being able to set-up the A.I. to be almost guaranteed to take a certain action (by doing things that repeatedly force it to increase the weighting on a certain action) and then capitalise, but that would come at the expense of doing the same thing over and over and having the A.I. use the correct response several times over. Would be an interesting exercise and I'd like to observe it fight against the standard A.I. as well as against players with varying degrees of skill.
    15. Zass
      Zass
      Genzen, that's a very astute observation. Just because a strategy is Nash equilibrium doesn't mean it's what would win a tournament. As you point out, a Nash strategy can't be exploited, but it also isn't smart enough to capitalize on opponent's mistakes.

      A good read on this subject is the 1999 first rock-paper-scissors (RPS) programming competition. The nash equilibrium strategy in RPS is quite simple: select randomly.

      With that said, a robot playing random (nash equilibrium) would not be even close to winning a contest. A fascinating read here:

      http://webdocs.cs.ualberta.ca/~darse/rsb-results1.html

      Very related to your point, Genzen, is the following section:

      They make the case here that the optimal strategy (nash equilibrium) is not the "best", for the reasons you correctly point out. An opportunistic strategy, that can learn and take advantage of opponent's weaknesses, could be stronger. Of course, any such strategy would necessarily deviate from nash equilibrium and thus be vulnerable itself to more advanced strategies.

      PS: the winning RPS bot, "Icoaine powder", is explained by the author in this fascinating page: http://ofb.net/~egnor/iocaine.html . A must read for any AI enthusiast.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice