Template:Mixup

Template page
Revision as of 01:34, 11 March 2022 by RogerDodger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template displays the payoff table and first Nash equilibrium for a zero-sum, two player strategic game.

The game is defined in a .gbt file in the Mixup namespace. These files are used by the game theory software Gambit.

In other words, this template takes a well-defined mixup and shows the optimal strategy for both players, i.e. how often they should use each option. See the example for how to interpret this.

Usage

{{Mixup|Kazumi-fly-infinite.gbt}}

The display can be collapsed by default by adding |collapsed=1 to the call, e.g. {{Mixup|Kazumi-fly-infinite.gbt|collapsed=1}}.

Example

Kazumi FLY mixup in mirror after 1+2, ws3, and u/f+2 transitions on infinite stage.

d
b
SWR
4
FLY.1
29-31-6834
FLY.2
-75-317579
FLY.4,2
-80363639
FLY.1+2
242-68-68
FLY.3+4
64-681365

Nash equilibrium with payoff -4.79

FLY.4,2
0.39
FLY.1+2
0.33
FLY.3+4
0.28
d
0.35
b
0.44
SWR
0.21

Payoff for dominated options

FLY.1
-17.58
FLY.2
-24.48
4
-11.17

Explanation

Table
Every possible outcome for the options considered. Each cell is the damage done in this outcome from P1's perspective. Negative numbers mean damage in P2's favor.
When FLY.1 is used against d (crouching guard), the outcome is 29 damage in P1's favor. (The attack actually does 25 damage, but the okizeme is approximated to be worth about 4 damage.)
Nash equilibrium
The optimal strategy given the above payoffs. If either player deviates from this strategy they can only worsen their payoff, so there's no way to force an opponent to change from it. However, it's possible for a player to get a better payoff by changing their strategy if their opponent is also not using this strategy, i.e. there might be a better way to exploit a weak opponent.
...with payoff -4.79
When both players follow the optimal strategy, the average outcome is -4.79 damage from P1's perspective. It being negative means it's in P2's favor.
FLY.4,2: 0.39
P1 uses FLY.4,2 about 39% of the time in the optimal strategy.
Payoff for dominated options
Some options aren't good enough to ever be used. For these, the average outcome of using it against the optimal strategy is shown.
FLY.1: -17.58
If P1 uses FLY.1, they get an average outcome of -17.58. This is the case without P2 changing their strategy at all. Since it's worse than the payoff from the optimal strategy, there's no point in using it.

Limitations

A Nash equilibrium for a particular mixup is useful for getting a general idea for which options are better than others, but there are many limitations in the context of Tekken:

  • Payoffs are defined in terms of damage, so any extra payoffs from frame advantage or okizeme need to be approximated.
  • Life advantages aren't considered.
    • An outcome where both players trade damage is considered an even outcome, but it actually favors the player that's ahead.
    • A high risk option might be dominated because it has bad payoff on average, but if you're on 1 life, then taking 5 damage is the same as taking 80.
  • Outcomes can vary a lot depending on execution.
    • In particular, whiff punishment is a big problem. The punisher used and whether it's fast enough can lead to dramatically different outcomes. In general, determine the attack from what caused the whiff (e.g. Kazumi would use 1,1,2 with sidestep and 3,2 with backdash) and if the whiff is very big then approximate how likely it is the player would react and punish optimally. Be realistic—optimal whiff punishment shouldn't be expected.
  • Humans can't perfectly follow a randomized probability distribution, so hard reads are always something to keep in mind.
  • In general, situations favor the attacker over the defender more in practice, because the attacker is the one setting up the situation, and thus doesn't have to react to its occurring. For example, Kazumi being +2c after hitting d/b+3 is better for her than being +2c after being hit by a generic d+4. Even though the frames are the same and the spacing is almost identical, in the first case the defender has to react, whereas in the latter she does.

Generating .gbt files for Gambit

Manually entering payoff values in Gambit using its GUI is cumbersome since it assumes a non-zero sum game, whereas everything in Tekken is zero-sum: what's good for the attacker is bad for the defender, and vice versa. Given Gambit's assumption, we have to enter two payoff values for every outcome, which in zero-sum games is redundant (defender's payoff is simply the negative of the attacker's payoff) and error-prone (might make a typo in one of the two values to make it no longer a zero-sum game).

Aside from that, the GUI is a bit clunky, with it being difficult to edit text fields or change the number of rows/columns. In particular, deleting rows/columns often doesn't work properly.

If you're familiar with text editors, you might prefer to specify games that way instead. json2gbt.py is a script to convert a game specified in JSON to a GBT file, which can then be fed to Gambit to find equilibria, and then finally fed to {{Mixup}} to display on the wiki. For an example of such a JSON file, see Kat-har4-oki.json. To run the script, you need Python installed. You can then run e.g. python json2gbt.py Kat-har4-oki.json -o Kat-har4-oki.gbt.