Nash Equilibrium in Product Feature Games using Python

Nash’s famous point of equilibrium where each player of a bimatrix game(i.e. situation/competition/arrangement) found application much beyond the American bar where its seed was planted (at least in the myopic pop culture lens). Game Theorists argue that it is a legitimate model to define payoffs and structure strategies (mixed or pure) in order to reach a point where players do not have an incentive to play in any other way. In this article, we will be rethinking the product feature matrix as a starting point for a 2 player game (using the NashPy library in Python) between sub-teams that have tied in a weighted scoring model — that measures features or other initiatives against one another by assigning scores across a number of key criteria such as cost, revenue potential, or risk for each initiative.

Hereon, a player is a decision-making entity, strategies are actions, and payoff, a numerical expression of a preference order over outcomes. These days, a PaaS or SaaS product will often represent a Prioritization matrix as shown below:

As seen, based on the weighted scoring, it can be inferred that the Team will prioritize creating Mobile Mockups. However, there are often cases in such raw quantification of attributes where 2 initiatives (Mobile team and Web Team) are tied in scores. Under a limited set of time and resource constraints, it becomes the responsibility of Product personnel to ensure that both tied initiatives are strategized in order to achieve maximum payoffs for each player (in this case, the Mobile and Web Teams).

The Problem statement would be to address Mobile Mock-Ups and Accepting new forms of payment as a 3 X 3 Game with 3 strategies each as shown below

This matrix can be read in a fashion wherein, Team Web uses strategy 1 and Team Mobile uses Strategy 2, the payoff is 1 for Team Web and 0 for Team Mobile. Assuming a set of strategies as above, we encounter a problem whose solution lies in the application of the Fictitious Play Algorithm where 2 players play a game based on an initial starting point of belief and averages of the strategies adopted by the competing player in the past. To know more, look up Stochastic and Naive Fictitious Play Documentations.

To give you a feel of what is happening, here’s how it works. Team Web will pick one of its strategies at random first, followed by using Team Mobiles average strategy decisions to produce the best possible response. The algorithm is as follows:

This particular Fictitious Play translates to the code below

where A — Team Web Payoff Matrix & B — Team Mobile Payoff Matrix

the result of this code is the point of convergence of the probabilities of row strategies at the coveted Nash equilibrium. This looks like:

the probability converges at roughly 0.33

If we were to calculate the NE for this 3X3 game using the Lemke Howson algorithm, we would get the same result for this 2 player Zero-Sum Game i.e. [(array([0.33333333, 0.33333333, 0.33333333]),
array([0.33333333, 0.33333333, 0.33333333])),
(array([0.33333333, 0.33333333, 0.33333333]),
array([0.33333333, 0.33333333, 0.33333333])),
(array([0.33333333, 0.33333333, 0.33333333]),
array([0.33333333, 0.33333333, 0.33333333])),
(array([0.33333333, 0.33333333, 0.33333333]),
array([0.33333333, 0.33333333, 0.33333333])),
(array([0.33333333, 0.33333333, 0.33333333]),
array([0.33333333, 0.33333333, 0.33333333])),
(array([0.33333333, 0.33333333, 0.33333333]),
array([0.33333333, 0.33333333, 0.33333333]))]

So each of the product teams can reach NE if they use each of their strategies 1/3rd (0.33) of the time instead of trying to maximize their own respective payoffs to suffer the prisoner's dilemma. In this way, the collective performance of the product team would not suffer and resources will be optimally utilized (in theory, at least).

To those of you new to Prisoner's Dilemma, it's a simple mathematical representation of how both above prisoners will be better off just being silent. Here is a video you must refer to:

This line of thinking finds wide applications in modern situations/games. Designing Product Design and Service Systems by this approach can be nuanced yet useful.

Words of caution for Game Theory Library applications:

  1. Choose Algorithms that best suit your problem from the NashPy/Axelrod library documentations.
  2. Be aware of functional predicaments of non-convergence and iterations in evolutionary games.
  3. Start simple with Product Feature Matrices and score using tons of methodologies out there, weighted scoring, Kano Model, MoSCoW analysis, and value VS complexity, to name a few.
then again, what is work?

Lastly, it’s fair to say that a game-theoretic framework is generally simplified and considers a situation where players choose actions from among predetermined alternatives. Thereby, various aspects are eliminated and abstracted. In addition, unrealistic extreme assumptions such as perfect rationality and complete information are imposed. Yet, within such an abstracted description, game theory tries to derive its theoretical equilibrium and to understand the mechanism of its decision-making situation. Games can be represented between 2 parties or even between a team and Nature, to account for external events.

Having been denounced as unrealistic at a time, Evolutionary games find expression in large populations and must be theorized in order to extract models that not only learn from Big data but also, structured payoffs. After all, humans aren't Chance Devices, or are we?

Data Analytics & Machine Learning @ Duke | Tech Writer