Applying Minimax Theorem to Battling (part 1)

Several times in McGraw's forum of game theory, I believe, minimax and payoff matrices were mentioned as better forms of 'theorizing' competitive battling. This thread will hopefully elucidate on Minimax applications in general and in battling.

Application in Real Life

Before delving into application in battling, take note that minimax is used in poker, zero-sum games, economics, the stock market fluctuations, and strategic war tactics.

Introduction

Minimax theorem states that in zero-sum (total results add up to zero) games, where one player's gain is the other's player's loss, one player should try to minimize his opponent's maximum payoff, whereas the other player should try to maximize his own minimum payoff. Applied to familiar circumstances, one player should try to minimize the opponent's sweeping oppurtunities or oppurtunities to deal damage, and his opponent should try to deal as much damage as possible.

Supposedly, John von Neumann proved this was an optimal strategy no matter what strategy was used by the opponent. It is unlike prediction, where one is try to beat the other by knowing in advance what the opponent is about to do. Minimax players would take into account ALL possible actions and subsequently choose the action that would account for the LEAST risk. No matter what the opponent does, the minimax player will always mitigate the potential risk. On the other hand, maximin players would always begin to search for the action that would give the highest payoff, considering the minimax player's action.

Assuming both players are aware of each finite possibility and actions, and there are no hidden powers a player can abuse, minimax and maximin are the optimal strategies available and neither player would benefit from changing strategies.

The important thing about minimax theorem is that NO ASSUMPTIONS ARE NECESSARY.

No matter how irrational the opposing player is, the minimax theorem does not care. Probabilities, in minimax's simplest form, does not account for much, or anything at all.

Basic Application

Before stop-loss orders, sell short demands, and a pokemon match, a basic example is here to clarify matters. Take a pie, to be shared among Jack and Jill. Jack states the rules of sharing the pie; 1. Jill can cut it any way possible. 2. Jack may choose the first piece. Jill pondered for some time, and chuckling mischievously, cut the pie in half.

Jill has effectively used minimax to minimize the opponent's maximum payoff, and maximized her own minimum payoff.

A pokemon match!!

Two highly advanced minimax theorem experts are onstage, getting ready for an intense, fight-to-the-death battle. Player 1, in a rage of fury, sends out Tauros. Player 2, meanwhile, sends out the defensive Swampert. As of now, there is something of note:

As of now, gimmicky sets, critical hits and so on will not be regarded. However, they will be factored toward the end. Standard movesets will be assumed (at first).

The ferocious, Choice-Band wielding bull is ready for its first move. He has a total of 5 options which are to 1. Return, 2. Zen Headbutt, 3. Stone Edge, 4. Earthquake, and to 5. switch. As the offensive, Tauros wants to maximize his minimum reward, which is to ram his horns into at least something.

The equally grotesque representative for Player 2, Swampert, is ready for its first move as well. It, too, has 5 options: Surf, Ice Beam, Earthquake, Rest, and to switch. Swampert unfortunately is rather on the defensive as Tauros really does have the capabilities to deal a 2HKO or 3HKO at minimum.

This is where minimax gets tricky. The players do not entirely know each other's team, conflicting with the definition of minimax application. This is no worry, however. The players must merely prepare for the worst and do the best possible. Player 2 must take into account all possible actions that player 1 can possibly do. p2 knows he must switch, otherwise suffering a hardy blow from the potential Return. Gengar seems to be a nice and risky switch that can set up, but no, a Zen Headbutt looms. Aerodactyl seems nice at first, avoiding both Return and Earthquake, but ultimately falls to Stone Edge. Really, switching to Skarmory is his only choice. (Ok, let's assume p2's team is something like: swampert/skarm/gengar/aero/snorlax/starmie)

Player 1, knowing that p2 is using minimax, aims to maximize minimum gain. At this point in time, p1 is quite unaware of p2's potential action due to lack of knowledge of his team. As both players have no definite 'edge' (explained in McGraw's other thread) over another, and both players know each other as highly proficient players, p1 is subsequently aware that p2 is likely to switch to something that resists at least 3 of Tauros' moves. p1 now has two choices: 1. to attack with one of four moves and have a small chance of dealing 'good' damage, but risk losing the offensive 'advantage', or 2. to switch and scout, meanwhile hopefully maintaining the 'edge'. Before continuing let's assume another standard team to p1 (tauros/donphan/gyarados/blissey/raikou/metagross). p1, assuming he decides to switch, might opt for Raikou. Raikou probably is going to fare well against the opponent's switch in, and do decently against Swampert as well even if it does stay in.

This, so far, is an incomplete analysis of Minimax theorem. Therefore, wait for subsequent parts for more detailed, realistic and heuristic approach!
 
This is a very fascinating approach to today's competitive battling format. I should be interested to know where this goes and how it takes into account things such as accuracy, averaging the gain between 2 moves, the limit on movepools on certain pokemon, and pokemon immunities. This sort of thing is nice to see once in a while because of the more serious overtone that's being set here.

Pokemon may be cute-sy and fun, but it's not always something a child can play when it comes to competitive battling. :P
 
Good read, IMO.

Assuming both players are aware of each finite possibility and actions, and there are no hidden powers a player can abuse, minimax and maximin are the optimal strategies available and neither player would benefit from changing strategies.

While playing logically is always a good idea to a certain extent, a switch always has the potential to catch you off guard in the beginning of a battle, and luck is a definite part of the game, beyond the scope of either side in most cases.
 
I understand minimax quite well, but I don't quite get how maximin works. I mean if you were 'thinking with maximin' how would Jill cut the pie? Would she cut it 99%/1% and hope Jack picks the slither?

Also if you could explain how this applies to "overprediction" that'd be great, as even I don't really fully get it, but it is somewhat related.

One test case I had was that less proficient opponents seems to score more unexpected KOs against you due to the difficulty in predicting their moves.

I once faced a player who used a Gengar and it caused me major problems. Basically I couldn't find any logical pattern in which moves he picked to use against me, every time I expected him to use a super effective move, he didn't, but not only that he didn't use something that would be likely to come in, neither did he try to throw STAB moves in the hope of higher damage. Instead he just threw out a move and because I had no idea what that move would be I usually ate at least neutral damage. I wanted to get Celebi in (I knew it would outspeed it) but I couldn't count on using a Thunderbolt as a safe switchin, as far as I was concerned any given turn was a 25% chance of Shadow Ball. Even though in general this player wasn't all that good, just by not playing partictularly tactically they managed to effectively damage many of my Pokemon with their Gengar.
 
I understand minimax quite well, but I don't quite get how maximin works. I mean if you were 'thinking with maximin' how would Jill cut the pie? Would she cut it 99%/1% and hope Jack picks the slither?
Jack was the Maximin. By his logic, Jill was forced to be on the defensive and to come up with the solution herself that causes Jack to maximize gain and her to minimize loss. In other words, if Jill were the Maximin, she'd have been the one coming up with that.

Maximin and Minimax don't work in Pokémon unless you are aware that your foe is using one of the two. You can't minimize your losses or maximize your gain if your opponent doesn't play by the same predictability scheme as you do. It's similar to how an inexperienced battler may make some stupid weird move, but it will pay off for him in the end because the experienced battler didn't even remotely expect it and got screwed over.

And of course, just as all the current sets are made to be used with standard procedures in mind, if everyone use minimax and maximin all the sets would be remade to use the principle; They'd not be the same.

As much as you understand the principle of minimax and maximin, I can't seem to see that this would be an efficient strategy in Pokémon battling, for a few reasons.
You can't just assume your foe is using a single standard set. There are multiple standard sets, and some people use non-standard sets as well (Snatch-Blizzard-Focus Blast-Softboiled Blissey is one I use). If you're considering a single standard set, there is no way you would be prepared for this. By your logic, if you have something in that will easily live through a standard blissey's bolt-beam, you'll attempt to stat up, which greatly increases your gain and decreases mine substantially; You could not die to a regular Blissey, and there is nothing else Blissey could do to you. Of course, Snatch will screw this over. Then what do you have? Let's say you had Magnezone, which resists boltbeam. You would still expect to survive fairly easily, so your best move would be to do something else, rather than switch. Perhaps you think my best move would be to switch, so you know that the best move for you is to attack the incoming Pokémon with an attack with few resists/immunes. And then, I hit you with Focus Blast after you use a worthless electric special attack against me.

I would come up with more examples, but I need to go. Minimax won't work in Pokémon.
 
I've always looked at prediction as doing the illogical thing because you "feel" what your opponent will do. Though I suppose that is also the logical thing to do if you know what your opponent will do...ignoring stuff like minimax.
 
Studying economics at university, I think the maximin and minimax theorems are based on more mathematical simulators than pokemon. Although somewhat relevant, the larger proportionate dependance on human choice and the ability to act extraordinarily as opposed to following logical mathematical operators means minimax is harder to utilise in battling. Minimax is also somewhat more applicable to defensive strategists and pessimists in terms of the human's nature, due to the fact it aims to minimize the maximum loss. Minimax also tends, for the reasons that the person using it is more careful and strategic, as opposed to being willing to take the risk and obtain maximum gain, and therefore this theory looks to reduce the opponents capabilities to win, and put them in a position to draw or lose rather than them themselves to win. Draws in pokemon are very rare, mainly due to clause which prevents a poke exploding when the opponent has only 1 pokemon left, and this would reduce the application of minimax to pokemon. Very interesting take however, I will be lookin forward to any progressions you make on this.
 
It is always good to work via a theory. But, to really catch you opponent off-guard you'll have to do moves that are (hopefully) not expected.
 
I've always looked at prediction as doing the illogical thing because you "feel" what your opponent will do. Though I suppose that is also the logical thing to do if you know what your opponent will do...ignoring stuff like minimax.
That's the interesting thing I run into.

In making any particular move, there are three things I could do:

1. Predict what the opponent will do and do something that will best "counter" that action. This is the most conventional wisdom, it works in most cases, and as an inexperienced competitive battler, this is what I try to practice the most.

2. Predict what the opponent will do based on what the opponent thinks you will do and do something that will best "counter" that action. I believe this is called "overprediction," and may not work well against less-skilled opponents. I'm on Shoddy Battle quite a bit, and I tend to avoid this strategy.

3. Do something that will surprise the opponent and catch him/her off guard. (Boa1891's Blissey is an example of this.)

Of course, as this would suggest, it all starts with your Pokemon choices. This could be a reason why people say team strategy is of great importance in DP.

I admit, even I could use a little help with that. So follow Stat32j's advice--not only for scouting your possible opponents, but also for constructing your team.
 
To expand on what I said earlier, in Pokémon, Minimax simply goes in a circle, and there is no definate move with the most or least risk. In your example, you said both people know the other is using Minimax! So then, when the first person decides that the best move to minimize their damage is to switch, they must know that the opponent also realizes this. This means the opponent's game will then be to find out what is best to do while you switch. In this case, you know that the opponent will switch. In this case, you know that by logic, you are safe to use any move; You are then the Maximin, while your foe is switching and becomes the Minimax. The best move is obviously Surf, of course, because the foe is more likely to be neutral to Surf than weak to Ice Beam, and the likelihood of a flying type is not low.

It would continue, then, that the opponent would know this thought process as well; as such, he would know Swampert would stay in, and that Surf is his most likely move, so he would purposely switch to something water-resistant; OR, he'd stay in with Tauros.


The problem with Minimax, as I was trying to say before, is that options are unlimited. The number of choices that contribute to the end outcome of a Pokémon match are beyond the scope of a regular man's thought processes, and there is no way to be able to maximize your minimum, or minimize the foe's maximum, effectively. Yes, you can do it; but does that mean it is a good strategy? I would like to see anyone try to use Minimax against my team. They'd get crushed. The ONLY time it'll work in Pokémon is against another Minimax utilizer, and even then the battle only works if luck is in your favor. The further ahead you think, the different your move will be; But no matter how far you think ahead, your opponent still thinks ahead to a different point, meaning your thought processes are moot and that is based merely around luck and prediction. End story.
 
Minimax would play horribly in practice. You can call it playing conservatively.

If you know the opponent has Gyara/Electivire, you are never going to use Thunderbolt when executing the minimax problem, even if Gyarados isn't switching out. This is so that you minimize your opponent's gains. You will opt for a less effective attacks because you are playing so conservatively.

Assuming both players are aware of each finite possibility and actions, and there are no hidden powers a player can abuse, minimax and maximin are the optimal strategies available and neither player would benefit from changing strategies.

Is there a mathematical proof of this? That is quite a bold claim indeed. Now I wouldn't be surprised if the optimal strategy was a mixed strategy, because Nash proved that a strategy (mixed or otherwise) is optimal for both players, and neither player would benefit from changing strategies. For example, in simple rock-paper-scissors, playing 33% for each option is the optimal strategy, and neither player can benefit if the other is playing the optimal strategy.

But it seems like Maximin and minimax search for a single strategy, not a mixed one. Correct me if I'm wrong of course.
 
Hmm...it's a really interesting theory, but it gets screwed up by all sorts of variations in teams, movesets, EV spreads, etc. And by the fact that at any given time, there will almost certainly be things that you don't know about your opponents team and your opponent won't know everything about your team either.

Of course, Pokemon wouldn't be very fun if it was just a game of calculations and probability that could be beaten by theory alone. Still, an interesting read, I'd like to see the second section.
 
Since there's only two strategies their either has to be an optimal strategy everyone will play or both strategies will be equal. Either way it all ultimately results in a draw.
 
Since there's only two strategies their either has to be an optimal strategy everyone will play or both strategies will be equal. Either way it all ultimately results in a draw.

Well, precisely it means that in the long run, the expected outcome is that both players win 50% of the time, ceteris paribus.

I like your writing style wretchedhalo, keep it up. It would have been a good idea to claim the first few replies in this thread to edit in subsequent parts at a later juncture.
 
Well, precisely it means that in the long run, the expected outcome is that both players win 50% of the time, ceteris paribus.

I like your writing style wretchedhalo, keep it up. It would have been a good idea to claim the first few replies in this thread to edit in subsequent parts at a later juncture.
So you're confirming that as everyone has said, this makes for an even more luck based game than before, while also taking out the fun...?
 
So you're confirming that as everyone has said, this makes for an even more luck based game than before, while also taking out the fun...?

Luck is a non factor in the long run. In the short run, Pokemon has always involved a significant element of luck. Nothing has actually changed.
 
I did not have time to clarify the usage of minimax last night and decided to do it for later. Of course, no theory can be applied to pokemon exactly. There are always exceptions when it comes such a complex game. I will try to shortly address all the concerns listed.

1. you can pertain to the theory as much as a player deems necessary. it doesn't really mean typing into a calculator and figuring payoff matrices and finding the 'perfect' move. intuition is sometimes based on minimax

2. boa1891: i did say i would address luck, non-standard sets in the long run, i just didn't much time. and really boa if you really want to go ahead and claim minimax as 'not working', substitute is probably something you've forgotten in your magnezone/bliss example.

3. the point i'm trying to make about predicting minimax players to the catch is that THE MINIMAX PLAYERS WILL NEVER FAIL TO PREDICT YOUR PREDICTION. (well, unless it's at the beginning of the match) trying to predict a minimax player is just being a maximin player.

4. boa (again): minimax is not a bloody circle. i just didn't bother with a payoff matrix. it just reaches an EQUILIBRIUM. there is a SINGLE optimum choice availible (or at least one where changing strategies is unfavorable). of course there is stealth rock, spikes and shit like that but that will be addressed later as well.

of course boa i am not saying you can't 'crush' me in battle but never deny the almighty power of minimax!!

5. dragontamer: yes, 'mixed strategies' are viable as well. the strategy played is 'mixed' because of so many different possible outcomes. one will have to change his style sooner or later.

there you go.
 
In any game, if two people with exactly equal skill play each other, the result will be 50/50.

But overall, most of these mathematical solutions to pokemon are so far beyond the scope of any human, that they mostly just seem to advise using common sense.

Have a nice day.
 
It would be 50/50 if the game wasn't 50% luck based.

Also I'm finding that applying minimax to Pokemon is dramatically over-simplifying the problem, people usually *rougly* stick to an offensive/defensive strategy, but something as simple as pulling of a Dragon Dance or striking successfully with a Focus Punch can be enough to make your opponent play differently in order to deal with the situation at hand, after all trying to wall a DD Gyarados typically isn't the best tactic.

If these strategies rely on knowing your opponents strategy then their application to Pokemon is sorely limited.

3. the point i'm trying to make about predicting minimax players to the catch is that THE MINIMAX PLAYERS WILL NEVER FAIL TO PREDICT YOUR PREDICTION. (well, unless it's at the beginning of the match) trying to predict a minimax player is just being a maximin player.

Sounds pretty flawed to me, just because you are playing conservatively and know a lot of information about your opponent doesn't mean you can actually make a move that will minimise their gains. If your opponent has 2DD Gyarados out and also has a Claydol and Rotom left, you have a Poke with EQ/Thunderpunch/Return/Waterfall that is faster, at this stage no partictular move is guaranteed to minimise their gain, Waterfall is the only move guaranteed to damage, but it will also allow Gyarados to DD again, which is probably worse than making it switch out and hurting either of the other two badly.

4. boa (again): minimax is not a bloody circle. i just didn't bother with a payoff matrix. it just reaches an EQUILIBRIUM. there is a SINGLE optimum choice availible (or at least one where changing strategies is unfavorable). of course there is stealth rock, spikes and shit like that but that will be addressed later as well.

The idea of one optimum choice just sounds wrong to me. Like with a Choice Band how do you know which move its best to be locked into when each move is going to be resisted by exactly two opposing Pokemon, and do the same damage to the rest?
 
TSPhoenix, in the Gyarados example, you have to consider which is worse: doing 0 damage and being vs. a Claydol while your Pokemon out knows waterfall, or letting Gyarados get another DD or hit you with a 2 DD Attack. I think we can agree that Claydol is much less threatening.

There is more to this than the very next turn.

For instance, if you have a frail team and they have a DDTar (DD, EQ, Crunch, Taunt) that can be faster than your whole team after 1 DD, then your best case scenario is losing. Therefore, losing any amount of Pokemon and not doing damage for any amount of turns is a superior lower probability to win than letting Tyranitar get a single DD is.
 
I don't think this is really helpful for competitively playing. From what I gather, it's a guide to playing "predictably." If your best bet is to switch to Skarmory, then I can use that to my advantage and predict and bring in Infernape. The other thing is that there aren't 5 options - there are n_moves + n_pokemon - 1 possible options, where n_moves is the amount of useable moves depending on your status and PP and n_pokemon is the amount of pokemon alive. In addition, if one of the moves is say, U-Turn or Baton Pass the amount of options increases another n_pokemon - 1.
 
You're kind of abusing the term minimax here. o_O

There are two statements I'll take issue with:

3. the point i'm trying to make about predicting minimax players to the catch is that THE MINIMAX PLAYERS WILL NEVER FAIL TO PREDICT YOUR PREDICTION. (well, unless it's at the beginning of the match) trying to predict a minimax player is just being a maximin player.

This is "technically" true, but misleading. You're making it sound as if the minimax player will always be able to predict what you're going to do. This isn't true; if you have multiple undominated strategies, you will be forced to play a mixed strategy, and therefore you will not always "predict" your opponent. Yes, you're playing at an optimal equilibrium, but this doesn't give you some mystical knowledge of your opponent. Think Rock-Paper-Scissors.

4. boa (again): minimax is not a bloody circle. i just didn't bother with a payoff matrix. it just reaches an EQUILIBRIUM. there is a SINGLE optimum choice availible (or at least one where changing strategies is unfavorable). of course there is stealth rock, spikes and shit like that but that will be addressed later as well.

There is a single optimum mixed strategy, but not a single optimum choice. Again, Rock-Paper-Scissors.

If I'm misreading, my bad, but be careful with the terminology...
 
Isn't this really just common sense? You're obviously trying to do as much damage to your opponent while taking the least amount of damage yourself. I think you're using your head too much, most of your pokemon skill comes from your gut instincts(prediction). The only time I really do math is when odds are important, like do you go for a freeze with ice punch or go for the KO with a CH cross chop?
 
Back
Top