Applying Game Theory to Pokemon II

McGrrr

Facetious
is a Contributor Alumnus
Introduction

When I posted the original thread, there were a couple of limitations. These were:

1) my own understanding
2) nothing concrete was established

I have since improved my knowledge and this time around, I aim to detail a way of thinking that will be applicable to (and usable on the spot in) competitive battling. In short, this topic is an insight into prediction.

Many experienced battlers will consider much of what I write here as instinctive. However, I believe that we all subconsciously go through these thought processes and it is at least interesting to analyse them explicitly.

The decision process

1. What is the probability of my opponent switching this turn?

The answer will be dependant on myriad factors ranging from instinct to experience to how obviously mismatched the Pokemon are.

2a. What is my least risky response to the most likely set of attacks/switches? (minimax)

This is the recommended approach when you have not scouted and remain unsure regarding which team member will be the most useful. Essentially a best response to multiple moves; it takes into account all reasonable attacks/switches and aggregates the expected payoffs to find the best overall option. The concept of "walling" is most relevant here.

2b. What is my best response to the most likely attack/switch?

Mid to late game, you will know most of your opponent's team and should have identified the match up that will win the battle for you. Now it is a case of manoeuvring your opponent to reach that match up (by e.g. juggling switches).

Minimax decision theory

This is defined as "minimizing your opponent's maximum payoff". It is a form of hedging your bets, in that; should the worst case scenario occur, it is the best worst case scenario possible. Minimax is most useful early to mid game when many uncertainties still exist regarding the opposing team. You are not aiming to predict perfectly, but to predict adequately to cover the widest spread of situations.

To illustrate my point, consider the following common turn one match up:

Gengar @Choice scarf
Shadow ball
Focus blast
Thunderbolt
Hypnosis

Against... Azelf:

Azelf leads almost always carry focus sash, and if it uses psychic, you will be losing 6-5 after turn one. Shadow ball would be best response if your goal was to KO Azelf, because a priority attack or sandstream will kill it turn two. However, this is risky because Gengar could be vital later.

1. What is the probability of my opponent switching this turn?

Azelf is only switching if it does not have either psychic and focus sash or jolly scarf u-turn. Any that stay in have two clear options; stealth rock or psychic. The latter is likelier because your opponent expects scarf Gengar and will be unwilling to risk not attacking.

2a. What is my least risky response to the most likely attack/switch?

You cannot afford to lose Gengar here, so a switch is marked. If Azelf outpredicts you and stealth rocks, mentally note your opponent as potentially "high risk/high return". This will help with your profiling as detailed in my original topic. However, be wary of reading too much into these subtleties, because a novice might pull this out of stupidity or even an expert who saw the switch coming and best responded! Note that if you switch, the worst case scenario is stealth rocks is up. However, if you attack and are wrong, it is 6-5.

Another early game example:

Heatran @Choice scarf
Fire blast
Earth power
Dragon pulse
Explosion

Against... Bronzong:

1. What is the probability of my opponent switching this turn?

Bronzong is as good as certain to switch the first time this match up occurs.

2a. What is my least risky response to the most likely attack/switch?

You can expect the new Pokemon to either resist fire blast or be Blissey. It is obviously too early to explode (implicit), and no special attack is troubling the latter. On one hand, earth power might catch opposing Heatran or Tyranitar, but being locked into a ground attack is a liability. Therefore, your minimax attacking option is actually dragon pulse, which will be at least neutral to every likely switch except Heatran. However, this remains better than activating flash fire.

General implications

1) It is not a good idea to explode early
2) Blissey is usually your minimax switch against special attackers
3) It is rarely profitable to use a super effective attack against a Pokemon that is likely to switch (during the first match up)

These are not unexpected implications because they are largely common sense. However, I have established the reasoning behind the decisions. If you apply the method, you will also obtain less obvious actions depending on the situation. If you remain confused, feel free to post a scenario and I will explain which attack/switch is your likely minimax option.

Best response

Best response is... just that; responding optimally to the most likely attack/switch given all the information you have gathered. It is riskier by default because you are trusting your prediction and profiling skills. Instead of dragon pulse as above, you might explode, expecting Blissey to switch in. The better the battler and the more experienced you are, the sooner you can profitably switch to best response over minimax strategy during a battle.

There are more subtle applications of this however; namely juggling to achieve a cheaper switch into a favourable match up. These involve pivots who serve as intermediary switches. Pivots induce a different attack (or a switch) that the next Pokemon will be resistant or immune to (or favourably matched). For example, you might want to reach the favourable match up of Rotom vs Blissey for trick, but it is currently Vaporeon vs Blissey. You can switch to Jolteon (pivot) to absorb thunder wave, before switching to Rotom for seismic toss.

Mr.E used to make fun of how I would take unnecessary risks to get these free switches (back in the 200 days), but this technique is essential if you are to maximise your edge when using offensively orientated teams without much walling. It could mean risking a NVE CH or worse, a 10% status (like heat wave burn on Kingdra), but one should not be too concerned by luck. It is out of your control and will be constant in the long run anyway.

Repeated Games

The really interesting mind games occur when match ups are repeated, because both players will have accumulated information from previous decisions. It is not only important to keep track of what you know about your opponent's team, but also what (s)he knows about yours. The minimax option and best responses will change as the battle progresses. For example, once you discover your opponent has a Magnezone, dragon pulse can never be minimax for Heatran, because it will get revenge killed.

The more often a certain match up is repeated, the less likely you rate to accurately best respond. Therefore, minimax increases in relevance should the same situations occur over and over again. For stalling/walling teams, this is not a significant problem, because it is where your edge lies.
 
I apply this somewhat, because if I think the opponent will switch I just go for a move the current opponent resists/ is immune to: I can usually hit something good early-mid game, and by end-game it's all about making the careful choices to not fall trap to the opponent's prediction. I comes especially when using things like Azumarill, who can OHKO Heatran and there fore you can just randomly Return for the 2HKO on the incoming Gyarados/ Salamence.

Good read though, I'd like to help but I realize this is your topic so I won't force myself upon you. lol that sounds like some weird sexual innuendo. @_@
 
I read the old thread, glad you wrote up a new one. I always use minimax in my battles, because I tend to overpredict so stick to a given formula that works. And unlike some more experienced battlers, I consciously use it.

A question that might seem stupid: How does luck factor into minimax and best response?
 
I just wrote a whole big paragraph and the computer crashes. Basically the main gist of what I said was that Forming your own "Mixed Strategy is good, but I find that trying to mess up your opponants mixed strategy can be just as rewarding.

Consider the Azelf Example. I am running an offensive team with the standard Suicide Azelf lead. I would choose to Stealth Rock in your face, whilst I hang on with my focus Sash. the I can switch to Specs Lucario. But what now, thinking that I am a high risk high reward player they may expect me to Predict the switch to a counter i.e. use HP Ice, but then I Aura Sphere instead possibly putting a large dent in their Ice resist, something like a Heatran or Vaporeon. Then they are already in trouble. If I do not allow them to set up SR, my Azelf may have a chance to come in late game and explode anyway. I feel that mixing up your playing style is as important as judging the other players playing style.

Another note that I had was that people try to minimise their losses in the early game, this is where plans are formed and people try to understand more about their opponant. Later on in the game people try to maximise their gains, by executing that strategy that they were planning.

Great topic McGraw that needs a lot more love!
 
This thread is great, Like you said most experienced players already do most of what you wrote about, I do but quite a bit of it is sub-consciously, Its probally immensly better to do it consciously

Thanks for the topic =)
 
Great topic; it should be quite helpful for beginners learning to predict.

3) It is rarely profitable to use a super effective attack against a Pokemon that is likely to switch (during the first match up)
That's assuming your opponent is smart and rational (a limitation of game theory overall IMO) but noobs exist. Granted, one could argue if one were facing a noob, one would have many opportunities to win the match, even after one "overprediction".

And unless your opponent is keen on your skill level, choosing a Fire attack with Heatran against a Bronzong that will most likely switch (in an initial matchup) could lull your opponent into a false sense of security. Not exactly something to hang your hat on, but it could come in handy later in the match.
 

TAY

You and I Know
is a Top Team Rater Alumnusis a Senior Staff Member Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Probably the most directly applicable concept in this post is what you call minimax, which you define as: "What is my least risky response to the most likely attack/switch?" However, I think this concept could and should be expanded to take more variables into account. The current concept of minimax does not take into account the fact that your opponent might have two or three or even more plays which are all equally likely (or close enough).


Here is a lengthy example...

--------------------------------------------------------------

Let's say your team is:
  • Skarmory
  • Blissey (Thunder Wave)
  • Rotom-H (@ choice scarf, knows Trick)
  • Heatran (@ leftovers, Fire Blast / Earth Power / Taunt / Toxic)
  • Tentacruel
  • Celebi (Stealth Rock)
and your opponent leads with Gengar. A lead Gengar is probably holding a Choice Scarf and knows Thunderbolt / Shadow Ball / Focus Blast /Trick, or is holding a Scarf and knows Hypnosis or Counter or something weird for the last move. Obviously you don't want Skarmory to go down so early, as you would lose a primary physical wall and a lot of potential passive damage. You know you're going to switch. Your opponent knows you're going to switch. So what do you do?

Honestly the most likely play is that your opponent will Shadow Ball as shot in the dark for some potantial damage, and save the Scarf in case you run a Dragon Dancer or Skymin. Your current concept of minimax would suggest that Blissey, who is immune to Shadow Ball and can spam T-wave (a very deadly move with so few usable ground types), is the correct choice. But the chance of your opponent using Trick or even Thunderbolt is pretty high (I doubt many players would use Focus Blast due to 70% accuracy). If your opponent is using Trick then Rotom is the best choice, since on a stall team you obviously don't want any of your slow defenders holding a Choice Scarf if they can't get rid of it.

Still, I would argue that the best choice is a switch to Heatran, even though it doesn't counter the three most likely moves anywhere near as well as Blissey or Rotom-H. Even if it isn't as well as Blissey, Heatran can obviously take a Shadow Ball; Heatran still very usable if Gengar uses Trick; and Heatran's damage against thunderbolt is low enough that it doesn't matter.

After you switch in Heatran, if you didn't get Tricked the best play is to switch to Rotom-H. Even after seeing your leftovers, no one is going to Shadow Ball into a likely Fire Blast, and most players would use Focus Blast over Hypnosis here due to accuracy. If Gengar is scarfed, it will switch out. If not, it will likely stay in and Focus Blast after seeing lefties.

If Gengar switches, you have likely just switched your Rotom into a Gyarados, Suicune, or Heatran (Gengar lead signals an offensive team); the former two you have an advantage against and the latter is easily beaten by Blissey. If not, you just switched Rotom into a Focus Blast, and you can go to Blissey for the rest of the game without fearing Trick.

--------------------------------------------------------------

I have more examples which I might edit in later (my time now is limited), but I think that the concept of minimax would have a much wider application in battle if the question asked in your part 2.) were: "What is the least risky play which nets me a usable advantage?"

This is fairly similar to what you already have, and it sticks with the "minimizing your opponent's maximum payoff" idea. However, my version of the concept makes prediction a lot less necessary. Instead of strongly countering the most likely play, it slightly less strongly counters all likely plays, which IMO is a lot more useful most of the time. The "juggling switches" that you talk about really is a pretty risky maneuver, and my version of minimax provides additional routes which players can take to get to their desired matchup.


Anyway, great post McGraw, we really needed some actual discussion around here ^_^
 
not really in the state of mind to add anything relevant, but I guess I'll try.

what this kinda reminds me of is making "safe predictions." like, when scarftran is flamethrowering your vaporeon, chances are they are going to switch, so you fire off an ice beam at a prospective breloom or blissey. even if they choose to stay in and you do piddly damage, they are doing piddly damage as well, so its not like you really lost anything. I guess that's what your "minimax" is trying to get at. generally it's good to pretty much force your opponent to switch and then fire off something that you think can get you a lot of payoff. interestingly enough, people expect me to switch often and predict a switch as I just leave out whatever pokemon as a sacrifice. so like they have a 50% against my 30% gengar and they earthquake as I shadowball for a kill. of course this is because I sacrifice pretty much every pokemon on my team after it has netted a kill or dented a wall or something, which is generally not the way most people play.

I'm definately agreeing on tay about miminizing prediction, because frankly prediction is about the least consistent and reliable way to win a game. I'd rather have a surefire answer like resttalk zong that allows me a switchin to gengar rather than have something like weavile try and come in to pursuit against the possible focus blast prediction or scarfed fb, or whatever else he may pack to kill weavile. because even though with bronzong you don't get gengar out of the picture for sure, you get the next pokemon in for a relatively low price while still doing things. imo free switchins and prediction-free surefire plans are easily the most valuable things in the game, which is why I am constantly sacrificing pokemon when I play.
 
I'm interested in seeing this topic pop up because I learned about game theory in my political science class.

Most of what I will say will be directed to McGraw since he's probably the only one who will understand some of the terminology I'm gonna use.

As McGraw probably knows, the point of game theory is to establish or find an/multiple equilibriums for the type of game that youre playing. The problem with applying this to pokemon is that there are just way too many variables to consider when making a move. First of all, you have incomplete information in that you do not know your opponent's movesets to make a rational decision upon. When you factor in prediction, you end up with a stag hunt game (with multiple equilibriums and no dominant strategy) rather than a rollback equilibrium where one move will always be the "correct" move.

The reason I bring this up is because people assume that pokemon is a turn-based game, when it actually isnt. Players A and B make their decision at the same time, leading to an imperfect game. Player B can not observe the choices of player A before deciding his move and vice versa.

I'll add more once later today. I'm too sleepy to collect my thoughts.
 

McGrrr

Facetious
is a Contributor Alumnus
How does luck factor into minimax and best response?
Personally, I have never valued luck as a variable simply because it is beyond my control. I think it better to concentrate on trying to take the most accurate option at each turn. As I keep telling Junior (and gave up on telling MrE), luck is the same for everybody and constant in the long run.

To some extent, minimax accounts for luck because (held constant), it has no influence on your "best worst case scenario". For example, if a CH were to occur whatever you switched to, it still creates the least risk against your minimax switch.

Luck is more of a factor in best response situations. Namely that, if you are juggling switches to maximise your edge; you present your opponent with more opportunities to be lucky. It is difficult to analyse whether this element is superior to the benefit of say... activating volt absorb as you switch to Jolteon (via Kingdra) against Zapdos. If your opponent does get lucky (burns Kingdra), his preferences may alter so your next best response might prove inaccurate.

... they may expect me to Predict the switch to a counter i.e. use HP Ice, but then I Aura Sphere instead possibly putting a large dent in their Ice resist...
I think the situation described is more complicated. With Gengar locked into shadow ball, your opponent is likely to switch and knows that you know this as well. Therefore, there is no rational reason to rule out aura sphere. I agree that HPice is highest risk, but I provided the caveat that one should not read too much into the subtleties :toast: Note that if your opponent really believed Lucario would use HPice, (s)he would not switch and score a 3HKO.

... choosing a Fire attack with Heatran against a Bronzong that will most likely switch (in an initial matchup) could lull your opponent into a false sense of security.
I agree to an extent, but I doubt there will be enough opportunities for this to pay dividends in the future.

The current concept of minimax does not take into account the fact that your opponent might have two or three or even more plays which are all equally likely (or close enough).


This is an oversight on my part. Minimax theory actually implies accounting for a set of possibilities instead of the most likely one. Editted OP :toast: In regards to your example, trick should be accounted for in your thinking, so Heatran may well turn out to be minimax.

I'm definately agreeing on tay about miminizing prediction, because frankly prediction is about the least consistent and reliable way to win a game.
I would disagree here, because I tend to make pretty average teams (never been particularly good in this respect) so I rely heavily on prediction for my edge. I can understand your viewpoint though :toast:

... the point of game theory is to establish or find an/multiple equilibriums for the type of game that youre playing. The problem with applying this to pokemon is that there are just way too many variables to consider when making a move. First of all, you have incomplete information in that you do not know your opponent's movesets to make a rational decision upon. When you factor in prediction, you end up with a stag hunt game (with multiple equilibriums and no dominant strategy) rather than a rollback equilibrium where one move will always be the "correct" move.
Firstly, I would argue that the point of game theory is to offer insight into how people respond to incentives. Equilibrium is only important in theory, because few circumstances in reality will be as clear cut as pure strategies. Even with mixed strategies, there is a significant element of randomisation.

To usefully apply game theory, one does not need perfect information. If the opposite were true, it would not be applicable anywhere. Information can be substituted by reasonable/rational beliefs. Experience and profiling is therefore important. A simultaneous game is always based upon beliefs regarding other players anyway.
 
Looking back you are right, that was not the clearest situation for me to make my point. However I will try to sum up the possible options here.I guess in that situation you have 5 possible choices:

~ Switch to another pokemon to try and get a better match up when he switches (There are no Stealth Rocks down so you are relativly safe in that

(Worst Case Scenario - They predict your switch, they nail your next pokemon with a Shadow Ball, outcome depends on the make up of your team, and what possible switches they might have)

~ Aura Sphere

(Worst Case Scenario - They predict this and Shadow Ball for under 1/2 Damage. Then you have to switch out to something to take the Shadow Ball, but your lucario has taken damage too. So far the one above is the best worst case scenario.)

~ Dark Pulse / Shadow Ball

(Worst Case Scenario - They switch to a special resist and you do minimal damage. you then have to switch into an unknown attack / move that can do serious other damage i.e. knocking off a Choice Item or other such move)

~ Vacuum Wave

(Worst Case Scenario - Same as Aura Sphere but we class this as a worse option as 99% of the time, even the best outcome will be worse [only better thing I can think of is they switch to Weavile with an intact focus sash])

~ HP Ice

(Worst Case Scenario - They predict this and switch to a resist, then we are back to the same situation as Dark Pulse / Shadow Ball)

Overall you would say the best worse case scenario is the top one, a lot of the time they will switch to something that can threaten lucario or just completely wall it, you then have to opportunity to switch to something like Machamp or Salamence, that can pose a bulky physical attacking threat.

The essence of trying to go through this systematically comes back to the point that someone else made, that it is not very easy to apply an exact Game Theory to a pokemon situation, there are just too many unknown variables to deal with, and you can only make accurate estimates. I think that after a while you will find that you tend to make these descisions sub consciously from sitations that you have seen similarly before, and the outcomes that have worked. This may be game theory or simply a learning curve based on Good / Bad experience, or maybe they both feed off each other. Much as I love the idea and the thread, I really don't think that Game theory is that applicable due to the number of unown variables. Game theory is all about minimising your losses, but as the late pokemon gae develops your main goal changes to maximising your gains, something that means taking risks, but Game theory is about reaching an acceptable medium with the least possible risk.
 
To add on what Goldfan said, at the start of every round the following choices are avaliable:
switch X 5
use a move X 4

At the same time, because the opponent also faces the same choice, the total amount of possible outcomes, barring crits and probability hax such as freeze and effect spore is 81. Unless this number can be eliminated to lower than 10, I don't see how game theory can be applied effectively, at least in the early stages. This is stretched furthur by the fact that you have lot of information gaps which adds enormous difficulties to risk evaluation, as you have to analyse the probablity of the opponent's say, last pokemon or whether he carried a fire move or not.

For every round, more than half of the 81 choices can probably be eliminated straight away, but the situation is still too complex with bits and peices of information missing. From experience, I can usually start using minimax in the mid-game, and use it extensively late-game, but never in the first 10 rounds since I often find it screwing up instead.
 
I've been reading up on game theory on wikipedia, and I'm curious what type of game it would be designated? Obviously it's non-cooperative and zerosum. It's symmetrical, since it's two players who both have access to the same strategies whose successes are dependant on the other's. But is it a sequential game or a simulataneous game? It would seem that it is a simulataneous game, since each player must execute without knowing what the other player will do in that turn. But since both players are able to see what the other player has done previously, would that make it a sequential game of perfect information? I always thought of a pokemon battle as a series of Janken matches, where your trying to guess your opponents move and use the move that beats it, and wiki says that janken is not sequential nor is it perfect information.
 
I've been reading up on game theory on wikipedia, and I'm curious what type of game it would be designated? Obviously it's non-cooperative and zerosum. It's symmetrical, since it's two players who both have access to the same strategies whose successes are dependant on the other's. But is it a sequential game or a simulataneous game? It would seem that it is a simulataneous game, since each player must execute without knowing what the other player will do in that turn. But since both players are able to see what the other player has done previously, would that make it a sequential game of perfect information? I always thought of a pokemon battle as a series of Janken matches, where your trying to guess your opponents move and use the move that beats it, and wiki says that janken is not sequential nor is it perfect information.
It would be a simultaneous game with incomplete information because you don't know your opponent's "preferences", which translated to pokemon terms means your opponent's movesets.

The term perfect information means that a player can observe the other player's actions before making their own move. Since this is a simultaneous game, you make your first move without knowing what the other player did, which would make it imperfect. Even though the game may seem like a sequential game after the first move (aka what you did when the two leads were up against each other), it's still technically a simultaneous game because you make your decisions at the same time.

For further reference, Complete/Incomplete and Perfect/Imperfect are NOT the same thing.

To usefully apply game theory, one does not need perfect information. If the opposite were true, it would not be applicable anywhere. Information can be substituted by reasonable/rational beliefs. Experience and profiling is therefore important. A simultaneous game is always based upon beliefs regarding other players anyway.
My point is what Goldfan pointed out in his post. All I'm saying is the fact that you have incomplete information AND imperfect information makes it incredibly hard to apply Game Theory to pokemon. There are two main traits in pokemon that make Game Theory difficult to apply:

1. Metagame breaking pokemon. If pokemon X randomly started carrying move Y to hurt its common counters, even the most rational decision (the move that minimizes the chances of you getting screwed) will get you nowhere. For example, using your first example of Gengar vs Azelf, lets assume that your team's best switch-in to the lead Azelf was Heatran (which is not a bad switch-in considering that Psychic FireBlast and Explosion are resisted by Heatran). If that lead Azelf carried HP Ground knowing that most opponents switch to Heatran, then despite the fact that you chose what appeared to be the best move, you still got punished as a result of the sheer lack of information.

2. Prediction mind games. This is basically the whole mindfuck situation of you predicting his prediction of your prediction of his prediction of your prediction...
 

Mr.E

unban me from Discord
is a Two-Time Past SPL Champion
Don't interject me into your... thingies, especially not with blatant lies. I'm as liberal as they come with risk-taking. Luck is constant among the entirety of the game, not necessarily me as a single player. I think someone else gets most of my good luck.:chaos:

I really should have posted before everyone else moved to more-theory-than-PKMN posting, but oh well...

I usually go ahead and take the super-effective attack the first time anyway, before I know what else they have. It often is an unnecessary risk to do before getting some information on the opponent's team. A better matchup doesn't necessarily mean resistance, so you might as well lead with your strongest attack. (e.g. SpecsMence attempts to Flamethrower the predicted Steel switch-in and just ends up dinking off Blissey). It could be a different resistance than you expect. (e.g. Up against Starmie, Heracross uses Stone Edge to catch a Flyer on switch. Lucario comes in, oops!) Occasionally you'll even catch them over-predicting and flat-out blast them with the hit, especially if it's a pokémon that can survive an SE attack.

To usefully apply game theory, one does not need perfect information. If the opposite were true, it would not be applicable anywhere. Information can be substituted by reasonable/rational beliefs. Experience and profiling is therefore important. A simultaneous game is always based upon beliefs regarding other players anyway.
It's why Gengar and Lucario are so dangerous, among others. They're so successful in so many different strategies with so many different movesets that assuming anything about them, before you see what they're actually running, is extremely risky and liable to lose the game for you.
 
So by that classification, pokemon would be the same game-type as Jan-ken-po. And perfect play for Jan-ken-po is to choose your move randomly, with as little pattern as possible.

Could this be applied to pokemon?
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top