We use cookies to provide the best site experience
Okay

Game theory basics

Economist, scientific Director of the graduate FINTECH, Director of research Thalamus Lab, Ranepa
Chapter 1. Introduction and game theory
Alexander Didenko
After reading this longread you should know:
— the concept of games and their types (classification)
— types of equilibrium
— visualization methods and solutions
— the use of a game-theoretic apparatus for the analysis of blockchains

Types of games and their descriptions

“If it was a matter of hunting a deer, everyone well realized that he must remain faithful to his post; but if a hare happened to pass within reach of one of them, we cannot doubt that he would have gone off in pursuit of it without scruple"
Jean-Jacques Rousseau, French philosopher
Generally speaking, the stag hunt game goes back to Rousseau's work «A Discourse Upon the Origin and Foundation of the Inequality Among Mankind» quoted above; with this game Rousseau illustrates the difficulties in coordinating and establishing public institutions (by the way, note: hunters operate in untrusted environment like the islanders from the previous longread; if they trusted each other, they would always return from the hunt with a deer in their hands). And this game, along with the famous Prisoner's Dilemma, is the most famous introductory example in game theory.
It is often said that the game is a model of conflict. This is true and at the same time not true; sometimes a conflict in the game is present in a very veiled form. For example, although it seems that the hunters from our example do not directly conflict, however, each of them acting not so cleverly can leave the other without dinner. The hunter has an internal conflict between personal and public interests. That is why this same game can also be considered as a model of a situation requiring coordination: if the hunters were confident in each other, or if at least one had the opportunity to quickly convince a partner to follow the «deer» strategy, both would benefit. Therefore, a game is a model of conflict or coordination and sometimes both of them.
We will return to coordination issues, but for now our task is simpler: it is convenient to start the story about games in general and about various forms of recording them in particular with the game «Deer Hunting». So the game can be described in different ways, namely, as:
Game in extended form
That is as a tree or, in a scientific terminology, a directed graph. Sometimes in sequential games players make moves one after another, and therefore, they may be able to know at least some of each other's moves; in other cases they make moves simultaneously. If players move simultaneously, they are uninformed about moves of others at decision-making moment.This is equivalent to sequential moves of uninformed hunters in our game. If players' moves are not observed by other players, the tree is «sliced» by dotted line symbolizing that there is no information flow between nodes. The leaves of the game tree in our case will be pairs of numbers indicating the payoff of each hunter.
Game in normal or strategic form
That is as a matrix: in our example the first hunter is responsible for the rows of the matrix, and each row of the stag hunt matrix is one of the choices or strategies available to him; the second hunter is responsible for the columns, and each column is one of the strategies available to the second hunter. There will be four elements in our matrix according to the number of combinations of all the strategies of the two hunters; each element is a pair of numbers already known to us from the leaves of the tree from the description of the game in extended form. There are a lot of examples of stag hunt matrices on the Internet; see, for instance, this one. As matrices are two-dimensional, it might be difficult to represent it in normal form game of 3+ players.
Game represented by its characteristic function
This is for advanced users. Those who are interested can learn about it in Wikipedia.
There is a couple of other important taxons in the world of strategic interactions. Let's name a few of them. First, a game can be:
Cooperative
That is when there is some external party in game which guarantees enforcement of agreements made between players. Although in reality enforcement results are always stochastic, in strategic interaction framework we assume it to be 100% guaranteed. Hence, by the rules of the game players are allowed to enter into contracts (or to form alliances and take binding obligations), and players know it. In cryptoeconomic systems cryptography can provide such guarantee.
Non-cooperative
That is when «every man for himself». Players can implement their strategies, or they might communicate with each other and try to enter into agreements fixing their obligations about strategies. But unlike cooperative game, players decide to cheat or not. All obligations in non-cooperative games are non-binding. Stag hunt, for example, by default is non-cooperative: players can agree on joint strategy in advance, but if stag is «stochastic», i.e., non-guaranteed, and game is played only once, then it might be rational for a hunter to cheat and hunt a hare if such opportunity appears. By the way, if we look at cooperative stag hunt, how the situation with equilibrium will change? Further we will see that even in non-cooperative games trust between parties might emerge depending on other parameters of the game.
Second, a game can be:
Symmetric
That is when payoff matrix, or normal form game representation, is symmetric. Stag hunt and prisoner's dilemma are symmetric: we can assign rows to hunter 2 and columns to hunter 1, and nothing would change in payoffs. Players are equal in this respect.
Asymmetric
That is when there is a unique set of strategies available to each player, and/or payoffs are asymmetric. In some strategic interactions players are substantially in different situations, and asymmetric games stress this fact. In Chapter 2 we will see examples of asymmetric games.
Third, a game can be:
Zero-sum
That is when sum of payoffs in each leaf of a game tree, or sum of payoffs in each cell of payoff matrix, equals zero. Stag hunt is zero-sum game, while trust game, which we will see several paragraphs below, is not.
Non-zero-sum
That is when there is at least one leaf in game tree or payoff matrix for which sum of payoffs does not equal zero. In non-zero-sum games there is either some leak of utility, or external source of «free» utility.
And finally, a game can be:
Perfect information
That is when each player knows all moves of all other players. Standard example of perfect information game are chess and rock paper scissors. When a game tree of perfect information game is drawn, there are no dotted lines crossing it: information is available at all nodes, to all players.
Imperfect information
That is when some or all information about moves of the other players is closed. Stag hunt and prisoners dilemma are imperfect information games. As you remember, dotted lines symbolize that players at nodes are isolated from information about decisions of others. Sometimes instead of dotted lines node is circled with dotted circle.
We can take another important thing from the «Stag Hunt»: solution concept. In the video, I discussed what scenario (or scenarios) the game will play in general, how the players will argue, what they will take as a result. It seems that «there is no other way», but generally speaking, there can be several principles for constructing such scenarios. These principles are called decision concepts or equilibrium. There are many of them in game theory. The Nash equilibrium discussed in the video is one of the most commonly used solution concepts.
Nash equilibrium is a situation in which none of the players can increase their winnings by unilaterally changing their decision. In other words, a situation in which the strategy of each player is the best response to the actions of his opponent.
Nash equilibrium
Nash equilibrium has its own particular subtypes; and there are other types of equilibria besides Nash equilibrium. In order to analyze cryptoeconomic systems, most importantly is to understand Nash equilibrium in mixed strategies and perfect for subgames as well as sequential equilibrium, zero-determinant equilibrium, Stackelberg equilibrium and average payoff equilibrium. The overview of these types of equilibria with applications in blockchains and references to the literature is observed by Liu et al. (2019).
In the articles on game theory you will often come across a few more terms. One of them is a strategy profile (good explanation of the term can be found here and here). The second is tuple which is also defined in the book by Umbhauer (2016) and Wikipedia.

Backward induction

Nash equilibrium is called subgame perfect if any of its subgames holds Nash equilibrium. How can you find it? The algorithm for this is called backward induction. Let's look at the following non-cooperative, asymmetric, non-zero-sum, perfect information game.
By the way, could you explain all the taxons: non-cooperative, asymmetric, non-zero-sum, perfect information game? The game is non-cooperative, because even if pirates formed coalitions by making agreement on the votes, there would be no way of enforcing these agreements. It is asymmetric, as there are always proposer and voters that substantially differ in their sets of strategies. It is clearly non-zero-sum, as in all leafs the sum of payoffs does not equal zero. And it is sequential with players perfectly informed by the moves of others.
Could you draw tree of the game for pirates game then? It would be huge! Another question: what if players think about how other players play? How deeply do they think over the steps of other players. Does the player think about his vis-à-vis in relation to the player's own moves? Class games of this kind are called p-beauty contests, and its consideration is beyond the scope of this longread. The question is simpler: what if every player knows the theory of games, knows how to compose a game tree, finds Nash equilibrium and at the same time knows that other players have the same skills? Reverse induction is another example of a solution concept that is used to find the equilibrium state in games presented in extended form. For games in normal form you can apply sequential removal of weakly dominated strategies for similar purposes.

Trust, Nasreddin and the Pirates

Before we proceed, read this article about game theory and evolution of trust, play this game, and then:
Draw game tree and game matrix
Or, in scientific language, represent game in normal or strategic and extended forms
Try to find an equilbrium
Determine the place of trust game in taxonomy presented above
Trust game
Trust game is non-cooperative (cheating is allowed), symmetric (payoff matrix is symmetric), non-zero-sum (there is win-win in one of the leafs), imperfect information game.
Show the answer
Answer 1
The answer and discussion — different options are on the following pictures
Nasreddin game
Up to this point we studied abstract representations of strategic situations which theoretically could be found in real life. Can we reverse engineer strategic interaction and design a game deliberately to help solve some problem? Let's try to approach the answer. First, watch the video, then represent game in strategic and normal forms and think: what Nasreddin could advise traders?
Show the answer
Nasreddin was laconic: «Swap donkeys», he told the merchants. He clearly realized the main problem of this situation — the merchants were motivated (a) to hide the true speed of their donkeys, and (b) to find out the speed of another donkey. Controlling his donkey the merchant at least partially achieves his motivation. And since they both achieved motivation, the situation is not resolved in a positive sense. Nasreddin takes a step further than Rousseau: he does not analyze the situation as a game but designs a game to change the situation.
Answer 2
If you accept that merchants make only one decision, the game demonstrates the wonderful heuristics used in game design. What will happen if we accept that traders make a decision once a second?
It seems that we have «game inside the game»: while traders play their «silly game of revelation the slowest donkey», Nasreddin plays his own game, where he himself has completely different goals and several strategies, or in our case advice. Each Nasreddin's strategy is a game itself, which he advises traders, and has its own tree resulting in different consequences for traders. Looking ahead, we will call Nasreddin mechanism designer; all the third week we would dedicate to mechanism design.
Pirate game
Now, let me add that if Nasreddin offered cryptographic guarantees that the owner of the slowest donkey would really get his prize, he would be the creator of real cryptoeconomic system. For example, each trader would deposit some amount in the smart contract, which upon receiving message from some oracle (let's pretend that oracle problem is successfully solved in Nasreddin's world) would automatically send the prize to the winner. Loser would have no possibility to avoid payment at all. If both traders deposit money on some escrow account, chances are that losing party would try to bribe escrow account holder or attack the system the other way. You may think that if oracle problem is not solved, all the reasoning above worth nothing as it is irrelevant in practice. Well, think about this: oracle problem is itself a problematic situation that could be solved by a mechanism designer.
Consider a different situation. Two pirates, say, Dormidont and Serapion, found an indivisible treasure. In order to decide who gets it, they suggest tossing the coin. The problem is that each pirate has his own coin, and they do not trust each other, they do not believe that the coin of the other is «fair» (that is having equal chances for «heads» and «tails»). How can Dormidont and Serapion share treasure without killing each other, even if both coins are «sawed»? Hint: start from thinking about strategies available to pirates. Is it similar to the case of Nasreddin? If not, are there any similarities?
Show the answer
Again we have «game inside the game» situation here: there is designer which proposes some scheme to pirates; and there are Dormidont and Serapion who just take the scheme. Note that pirates (according to them) are not inclined to strategise, to seek for optimal strategy. They demonstrate reluctance to delegate decision to stochastic Nature just as was in the case of Nasreddin and traders.
In fact, fair division is achieved when each of the pirates really delegates decision to Nature, and at the same time when both of them know for sure that the other party did the same. Again as was in the previous case, each pirate controls half of the Nature and is not motivated to achieve real stochasticity.
What can we do here? For example, we can modify the coin toss game like that: each pirate tosses a coin; if both coins fall on the same side («heads-heads» or «tails-tails»), then Serapion takes the treasure; if both coins fall on different sides («heads-tails» or «tails-heads»), then Dormidont takes the treasure. It is easy to prove that scheme would provide real stochasticity in case if one, or both, coins are deliberately unfair.

Focal point

The time has come to talk about coordination games. This type of cooperative, symmetric, non-zero-sum, imperfect information games is often mentioned in the literature on distributed ledgers and blockchains and, specifically, in the context of oracles and digital currencies.
Additional links to this video
Blog post in Buterin's blog looking at oracle problem from coordination game framework
«Coordination in the use of money» by Luis Arauj and Bernardo Guimaraes. You might find it way too technical for your current level, but it is still worth reading
Economists from Austrian school of economic thought write a blog about coordination problem
«So why does this work? Essentially, for the same reason why the prisoner example above worked; the truth is arguably the most powerful Schelling point out there. Everyone wants to provide the correct answer because everyone expects that everyone else will provide the correct answer and the protocol encourages everyone to provide what everyone else provides. Criminal investigators have been using SchellingCoin for centuries, putting prisoners into separate rooms and asking them all for their stories on what happened at a given event, relying on the fact that it's easy to be consistent with many other people if you tell the truth but nearly impossible to coordinate on any specific lie.»
Vitalik Buterin, Ethereum Foundation
Impossibility of establishing a perfect «distributive ledger» leads to an engineering solution. They need to choose different structural and architectural data storge elements, network topology between them and other nodes, nodes motivation schemes, cryptographic protocols, and — the most important — consensus protocols. In the end, it is the consensus protocol that defines many final characteristics of the ledger including its functional characteristics and scalability as well as other architectural decisions which adjust with your consensus.

What to read next:

Place emphasis on different types of the market, Grim Trigger Equilibrium and detailed analysis of Bitcoin mining game.
Informal and simple introduction to Nash Equilibria and Schelling Points.
The whole book «Wisdom of Crowds» is published at WordPress blog; this particular chapter tells history of Schelling point mental model.
Iconic problem from evolutionary game theory and a type of games in game theory which is at the same time a subtype of coordination problem. Useful mental model when thinking about interplay between information (news) and cryptocurrencies prices.
Another Wikipedia article about classic game-theoretic model used very often in the context of blockchains. I will provide you links to several such papers below.
Research paper by Joshua A. Kroll, Ian C. Davey and Edward W. Felten. Place emphasis on how authors model Goldfinger attack with game-theoretic methods and on more conceptually important thing — the authors' look at Bitcoin as a system of tree equilibrium.
Research paper by Shaohan Feng, Wenbo Wang, Zehui Xiong, Dusit Niyato, Ping Wang and Shaun Shuxun Wang. Learn how backward induction technique is used in research paper. Also, place emphasis on Stackelberg game analysis.
Research paper by Zehui Xiong, Shaohan Feng, Dusit Niyato, Ping Wang, Zhu Han. Another example of Stackelberg game use in blockchain context. This paper is also interesting, because the authors do not develop new cryptocurrency, but instead develop new blockchain aside from digital money context.
Research paper by Nicola Dimitri. Remember, in Bitcoin, as well as in our fictional Rai system from the first long read, parties with higher urgency to pay would offer miner higher transaction fees. Nicola Dimitri analyzes this situation as auction game and comes to an interesting conclusion concerning optimal block size.
Another research paper by Nicola Dimitri. In this paper he uses game-theoretic approach to model miners game as paid contest. His results concern interplay between mining costs and monopolies formation which is important security issue in many blockchains even not connected with cryptocurrencies.
Research paper by Nicolas Houy. Another approach to analyze mining as a game with insights concerning mining incentives and block space market offer.
Research by Yoad Lewenberg, Yoram Bachrach, Yonatan Sompolinsky, Aviv Zohar and Jeffrey S. Rosenschein. Bitcoin miners unite in pools to increase probability of winning in mining game. Paper analyzes this situation as cooperative game and draws conclusions concerning schemes that pool members may use to share mining rewards.
Made on
Tilda