Most of 2020 we were inside the house but once the lockdown was relaxed, my friends and I would meet for dinner or for coffee once a month or so. Where to meet was always a proverbial question. Both the other friends were in essential services so they had to go to their offices and I was the one on whom the planning part was ‘bestowed’(which I didn’t enjoy much).

Given the knowledge of their predispositions to cuisines and their favourite areas in the city to hang out, I generally present the choices in a manner that I have to travel the least amount (evil laughter 😈 )

Both of them live in the northern part of the city so meeting in the north is **optimum** for them. I am somewhere in the central part and prefer that. Also, given that we live in a massive city, there is no dearth of good places to eat in any area of the city but the restaurants serving their favourite cuisines are located in the different parts of the city.

Question to ask : Given the predispositions to places and cuisines on a given day, what would my friends choose as a place to meet for dinner unanimously without contacting each other?

In short, the Game theory is the study of mathematical models that describe the interaction(** choosing where to meet**)among rational decision-makers(

**). Fair enough!**

*my friends here*The outcome of the Game — One method of predicting the game’s outcome is by identifying **dominant strategies** for each player. A dominant strategy is the one that is the best for a given player regardless of the choice of the other player (** whatever place suits my friends**) — so regardless of what friend #2 does, a dominant strategy for friend #1 is the optimal strategy for friend #1.

The set of dominant strategies (** place to meet**) chosen by the players (

**) is called the**

*friends***Nash Equilibrium.**It is called an equilibrium because neither of the players has anything extra to gain by changing his/her choice.

In simple words, the Nash equilibrium is a law that no one wants to break even in the absence of the police. There is no advantage for individuals to break the law, they won’t gain anything extra. People observing traffic signals and stopping/going according to the colour of the light is one such phenomenon.

We will begin by creating a **Payoff/Confusion matrix** for the various choices of my friends regarding the place to meet.

Reading the above matrix is quite simple; if friend 1 chooses ‘Northern Part’ and friend 2 chooses ‘Central Part’, then the pay off will be 1, 5(2nd row, 1st column) and it will put friend 2 at an advantageous position compared to friend 1.

We want to find the dominant strategy for each of the friend. In this case, we can observe that for both the friends, the dominant strategy is to reach the central part(first row, first column). If friend 1 changes his strategy from central to northern then his payoff will change from 2 to 1 which isn’t desirable and if friend 2 changes from central to northern then her payoff also changes from 2 to 1.

So, both of the friends choose to come to the Central part of the city. Going to the northern part is an ** ideal** outcome, but the

*ideal*is not necessarily

**.**

*optimal*Let’s see if we can reach the conclusion above (choosing (2, 2) i.e. both of them choose central part) using python. The library to use is Nashpy and is super easy to install using pip

` pip install nashpy`

Create an individual payoff matrix for each of the friends according to the payoff matrix described above.