Strategies for Zero Sum and Non-Zero Sum games in Game Theory

mathematical solution with examples

Mehul Gupta
Data Science in your pocket

--

As we already had a brief discussion on what Zero Sum & Non-Zero Sum games are in my last post, it's time we take a deep dive into these two concepts & discuss the maths as well.

Note: Do read out the 1st part for a better understanding

Zero Sum Games

for a refresher, the magnitude for total gains + loss =0 by players in zero-sum games. We will be discussing different strategies to solve Zero Sum Games.

Pure strategy

When a player takes the same decision/action again & again is called a pure strategy. For example:

In Stone-Paper-Scissors, player ‘A’ always goes for ‘Paper’.

Pure strategy, mostly, can put you in a losing cause. Give it a thought, Assume you are playing ‘Stone-Paper-Scissors’ with your friend ‘X’ following Pure Strategy where you would be choosing ‘Stone’ every time.

After playing a few rounds, your friend ‘X’ will figure out that you are always showing up with ‘Stone’ & hence he/she will change their strategy to ‘Paper’ & hence start winning every single time.

Do you see the perils? Pure Strategy is easily decodable

So, what should we do?

Mixed Strategy

As the name suggests, it chooses between multiple actions based on some probabilities rather than sticking to one action. So, considering our Stone-Paper-Scissors example, one might choose between the 3 options following some probabilities a,b, and c. The advantage we get is Mixed Strategies are hard to intercept hence the opponent can’t redesign his/her strategy according to yours !!

Before we move ahead, we must know a few concepts

Dominant strategy: A strategy is called dominant for a particular player A if its outcome for all possible situations(any action taken by the opponent)is better compared to other strategies available to him.

Indifferent state: When a player has no clear choice to choose out his action. All the actions appear equally good to move ahead

Payoff matrix: It's a matrix representing payoffs (results) for each player given possible strategies combination. The below example explains things better:

https://learning.oreilly.com/library/view/the-complete-idiots/9781615640553/xhtml/chap003.xhtml#p_89

So in the above example where ‘America’ & ‘Japan’ are two players, the payoff matrix depicts different duration in days required (fewer days, more beneficiaries to attacker & vice-versa). How to read it?

If America chooses the strategy “Attack South” & Japan chooses “Sail North”, the time taken is 1 day. Similarly, if America chooses to “Attack North” & Japan goes “South”, the time taken is 2 days.

Also, if noticed carefully, we have a dominant strategy for Japan where Sailing to the South is always beneficial compared to sailing to the North as the outcome by sailing to South for Japan is either same(2 days when America attacks North & Japan Sails either North or South) or better (3 days when America attacks South & Japan sails South but 1 day if japan sails North).

Equilibrium

It’s that particular pair of strategies adopted by the players (one strategy adopted by each player) such that no one player can improve his/her result until the opponent changes his/her strategy.

Confusing? do read the blog on Nash Equilibrium for a better understanding

Mixed Strategy Equilibria

The solution to most zero-sum games lies in Mixed Strategy Equilibria i.e. Choosing from multiple possible strategies using some probability distribution. The only problem is what should be different probabilities with which different actions should be chosen.

We have a simple mathematical solution for that. Let’s pick an example first of all:

The above scenario depicts the battle between a batsman & a bowler in cricket in a Zero Sum Game (as gain + loss =0 for every possible state). The payoffs for the bowler & batsman respectively have been mentioned in the payoff matrix given the delivery bowled by the bowler (bowler’s action) while the shot selection by the batsman (batsman’s action)

We will try to find the mixed strategy equilibrium for batsman & bowler given the above condition.

Steps (for any one player):

  • Fix action by an opponent
  • Consider the probability of one action as ‘x’ & for the other as ‘1-x's for the current player.
  • As we have 2 actions, equate the terms we get by fixing opponents' actions for the 2 possible actions.

Example

Considering the bowler’s perspective:

Let probability for inswing=x, hence for outswing=1-x

So, if batsmen play “offside”, the batsman payoff can be

= -4*x + 10(1-x)

Why? if you look closely, Once the batsman decides his/her action, the payoff depends on the action taken by the opponent. -4 when the bowl is inswing else 10. The above term gives an average payoff one can expect.

& if he plays legside= 1*x + -10*(1-x)

Now, we would be equating the two payoffs

  • -4x + 10–10x = x -10 +10x
  • 25x = 20
  • x = 4/5

hence, the bowler should bowl inswing with a probability of 4/5 & outswing 1/5

Non-Zero Sum games

As discussed last time, Non-Zero Sum games are the ones where the summation of gains + loss following different combinations of strategies by different players is different unlike zero-sum where following any combination of strategies, the summation of gains + loss is always 0.

Nash Equilibrium

A very popular concept on which I already dedicated a post sometime back, Nash Equilibrium helps us determine equilibrium in Non-Zero Sum games.

Do read in detail about Nash Equilibrium in my previous post here.

Pure Strategy Nash Equilibrium

Pure Strategy Nash Equilibrium is the strategy combination where both players go with the best reply action

What is the best reply action?

It's the strategy some player X chooses that gives him/her the best outcome given player Y has already chosen his/her strategy. Hence, you already know what the opponent has chosen & you pick up the best strategy considering his/her action.

Mixed Strategy Nash Equilibrium

In some cases, you might not know your opponent's action beforehand. In that case, you need to choose your strategy based on some probability to reach equilibrium using mixed strategies. Also, in most of the games, as discussed, pure strategies don't work as the opponent can change his strategy in between the game.

How to decide over the probabilities, let’s see the below example

Similar to the above example, we again are back with a bowler & batsman but with different payoffs. As the total gain + loss given a particular state is not constant throughout the game, it is a Non-Zero Sum Game.

We will try to find the mixed strategy nash equilibrium for batsman & bowler given the above condition. The process remains the same as we had for Mixed Strategy Equilibrium for Zero-Sum games

Assume bowler bowls inswing with probability =x & outswing with probability = 1-x

Then, if the batsman plays offside, his expected payoff is

1*x + 10*(1-x)

& if he plays legside, than = 5x + (1-x)*1

Equating the two payoffs

x + 10–10x = 5x + 1 -x

9 = 13x

x = 9/13

So, the bowler should bowl inswing with a probability of 9/13 & outswing by 4/13. Similarly, we can calculate the value of x for Batsman as well.

With this, it's a wrap. In my upcoming posts, I will be further deep diving into Game Theory concepts.

--

--