 Okay, so we want to predict how human individuals behave and we can think of different situations where these apply. So you have a different situation in which people may interact with another person or more persons and each of these persons is confronted with a strategic decision because the outcome does not only depend on what he does but also on how the other people behave. Okay, and so in some sense what you have to do is to predict how other people are going to behave and behave in an optimal manner. Okay, so this is what game theory is about. Okay, so how do you formalize a game? One way of thinking about a game is you look at the prototype system of a game which is chess. Okay, so in chess you have the players and there are some rules and these rules have to do with what actions, what possible actions can each player do at each point in time and with information what does each player knows at each point in time. Okay, and then what agents choose is actually strategies and a strategy is a contingent plan of action. So for example if you think about chess, so players do not choose just actions independently at each time but they follow a particular strategy or for example for the openings, there are different codified strategies and a strategy is a contingent plan of action which means it's a sequence of actions that depend on the action of the other players, the previous action of the other players and depend on also on the information that the agent has. Okay, so a strategy is a function in a very high dimensional space and then you have also to define the outcomes, so when is it that the game ends and what are the payoffs that each player receives when the game ends. So one important, very important thing that you assume is what is called common knowledge. Common knowledge is what everybody knows and what everybody knows that everybody knows and what everybody knows that everybody knows that everybody knows. So it's something that is common knowledge. Okay, and what we assume is that the rules of the game and the strategies and the outcomes and the payoffs, this is all common knowledge. So everybody, every player knows what the rules are. Okay, then also we assume that each player assumes that the other players is rational and they are rational themselves and they know that the other player knows that they are rational and they know that the other players knows that they know that the other player is rational, etc, etc. Okay, so rationality is common knowledge. So this is very important so and under this, so a game theory is essentially a theory that predicts how players will behave, how players will play this game under these assumptions. Okay, so let's see how it works. So this is a very simple game which is called matching pennies. There are two players, player one and player two. So player one chooses the side of a coin whether it's head or tail and player two also chooses the side of the coin whether it's head or tail and player one wins if the two coins are different, if the two sides of the coins are different and player two wins if they are the same. Okay, so one way of representing this game is what is called an extensive form game. An extensive form game can be represented as a graph where you have the action nodes, so the nodes where each of these nodes, one of the two players have to take an action then links correspond to the possible action that an agent can take. So here is player one, he has to choose whether his coin will be head or tail and then depending on two, it's time for player two to decide whether this coin will be head or tail and then depending on this each of them will receive payoff and here this is the payoff of player one which is minus one because the two coins are the same and this is the payoff of player two. Okay, so as you can see, so this is the way in which you can represent any game. Of course you can also represent chess in this way but you will have a very very complex graph. Okay, so the strategies are as I told you are contingent plans of action, so in this case a strategy for player two will be to play head if the other guy, player one played head and to play tail if player one played tail. So you see that a strategy is a plan, is a way to respond that depends on the action of the other agent. Okay, now in this case we assume that player two knows, so information is also important, here we assume that player two knows what player one chooses before he makes his choice but you could also think about actually matching pennies game is typically played simultaneously, so where player two does not know what is the choice of player one. Okay, so in this case in game theory, in extensive form game theory, one represents this fact that agent two does not know whether he's in this position or in this position by drawing these information sets. So these information sets you should think of them as a cloud of fog that makes it impossible for player two to understand whether he's at this point or at this point. Okay, so these are extensive form game but then given an extensive form game, you can figure out what are the possible strategies and then you can represent the same game in terms of what is called a normal form game and the normal form game is this form, so you have a set of strategy SI that as I told you are the plans of actions and you list all of them and then you list all of them also for your opponents here this S minus I means the strategies of all the other opponents so you have a set of possible strategy for agent I and then you can build the set of all possible strategies for all the other players and then the strategy of the opponent will be an element of this set and so you can fully define your game by defining directly what is the payoff for each player I if you play strategy SI against strategy S minus I okay and this is a real function corresponds to these numbers here. Okay, so this is essentially how you define a game in game theory so this is a celebrated example which is called a prisoner's dilemma and you can think this is a formalization of the situation of Bonnie and Clyde which was in the first slide and the story goes that say if player one and player two imagine that player one and player two are say court and they are charged of having committed a crime so player one has the possibility of to confess to the police and to say that the other guy player two did commit the crime and or to stay silent okay not to say anything not to confess in this case the strategy C is not to confess as the strategy D which is called the defect to defect and C stands for cooperate I mean cooperate with player two so the GD is the one where player one confesses okay so and if they both don't confess they stay in prison for for a while but then they are missed if player one confesses and player two does not then he will get free he will be free but player two will go in jail for a long period say nine years okay but if they both confess they both will go in prison for say six years so you can represent in this simple case this play this game in normal form with this table where in each cell you put the first number is the payoff of the first player given the strategy that the first player chooses and the second player chooses and in the second number you put the payoff of the second guy okay okay so now you can think clearly that if you look at this situation well it is clear what they should do because if they both do not confess if they both cooperate they would just spend one year in prison on a small amount in prison and then they will get free but actually what happens in this case is that whatever player one does it is always best for player two to defect or to in this case to confess because imagine that player one does not confess so he cooperates then if he cooperates player two would get minus one but if he defects he will get zero so it is better for him to play defect okay then what if player one defects then if he cooperates he would get minus nine and if he defects he would get minus six okay so whatever player one does player two will be better off by defecting and the same is true for player one so the the outcome is that in spite of the fact that this would be the best outcome for both of the player because they are rational they will end up playing this they will end up in this situation okay and this is because this strategy c is dominated by strategy d because whatever the opponent does strategy d always gives a higher pay off so one idea of finding out how players play games is to look at dominated strategies and to eliminate these dominated strategies and and then the prediction would be that what remains is what players will play and you can do this process alternatively and look for some strategy which is dominated by some other strategy and and eliminate it eliminate them alternatively and in this way you can think of solving the game so maybe it's a good time to ask if there are questions yes professor can i uh can you hear me it's okay so i i saw the i saw the lectures earlier and i'm loving them i think they're really mind-blowing at least in my estimation so regarding the prisoner's dilemma for instance but also other things that we discussed about it struck me as a bit odd that we've now i'm this is maybe a naive question maybe i'm getting a bit ahead of myself but we never once mentioned the concept of a trustworthiness trust and it seems to me that by introducing this a lot of the okay so i know uh carlo so uh now we are talking about bonnie and clive they love each other okay and they say and they can promise to them to each other uh look i will uh um i will never betray you i will never confess okay yes but when they get into uh when they are caught and they talk to the police uh should they really trust the other guy or not i mean if they are really rational and this is the assumption that we are making then uh no matter uh what uh uh what they promise to each other yeah but they behave they will behave in this way i mean the the issue of trust is something that we will come back uh um uh uh we will come back because it's a very important one yes and also yeah it struck me also that well the argument for bonnie and clive that seems to be true but i think it can only hold up in isolated single um instantiation like in single games because if the games are iterated then this this sort of argument cannot work because if i work with someone and i snitch on them uh exactly yes exactly you are precisely right so we are talking about a single stage game a situation where player one and player two imagine they didn't meet before and they will never meet again okay okay and then in that case everything that player one says to player two in this kind of game uh should not be trusted okay there is no reason why uh player two should trust player one or vice versa so it's not credible okay yes okay okay so everyone is a bit psychopathic in these uh scenarios okay thank you so uh concept of trust there is a question from Ayush Gautam uh are all concepts concept like trust considered irrational i assume rational decision take only the possible possible outcomes into account so uh let me turn this question the other way around so um so in game theory you'll uh try to find whether uh there are incentives that support trust so so is trust uh uh supported by incentive so imagine that uh say um uh i may tell you look uh either you give me 100 euros or i will jump out of the window okay and uh and of course you should not trust me because uh i mean jumping out of the window is against my own interest okay then of course i mean i'm not considering all the psychological dimension the fact that i may be crazy etc etc but if you just think of a rational behavior then you should not trust me okay sorry there was another question uh so now there is a there is a rajat uh asking why are uh and precisely why they are not using backward induction okay so this is going ahead i mean backward induction is uh one other strategy in which you can solve um in which you can solve games like uh uh this one for example um i mean if you start from the from the top of the tree you can find out what is the best option for player two and then uh figure out uh uh what what is the payoff that uh uh player two will will get in this point uh and in this point and then you can figure out what player one will do okay so this is called backward induction now in uh prison as dilemma things are very easy because uh there is a dominated strategy so you don't need to use uh uh backward induction and if you use backward induction you get uh at the same situation at the same outcome so uh players cooperate and they are charged for what they were called for okay so you are answering to um another question so uh other questions let me see so it's but what is minus six minus six yes so you have been asked answered by people so we think about these numbers here as being a payoff say you can think of this as a monetary reward or as a uh uh yeah anything anything else okay okay so uh very good so um so the problem with uh iterated elimination of dominated strategies uh is that it doesn't work always so and so what john nash did was uh at a certain point to uh formalize what is a good notion of a solution for a game and this solution is called nash equilibrium so and you say that uh a strategy profile profile means that this is a this this s is uh is a list of strategies for each of the players this is a nash equilibrium if for all players and for all strategies of all these players the payoff of player y if he plays another strategy which is different from the strategy he plays in the nash equilibrium cannot be larger so this means that uh each player has no incentive to deviate from uh a nash equilibrium strategy okay uh does the early presented game concept apply for games with low amount of payoffs when the game is based on a morality question based on experience which participation with this game uh these uh types of game it's easy to select a morality uh correct decision if the payoff difference is not large especially a monetary so with respect to this we will come to that uh uh about uh discussing about uh say uh morality at the moment we are not considering morality we are just considering what should rational uh players do okay okay so uh nash equilibrium is a situation uh such that uh no players has incentive to deviate from this uh uh setting okay and uh one way in which you can find this nash equilibrium is by uh finding um uh the best response so you you define the best response of agent i to the strategy of her opponents as the strategy that maximizes is easy utility or her utility given the strategy of the other so this is the best response okay and uh uh if you think a little bit about it so the nash equilibrium is equivalent to say that uh my best response uh so i should play the best response to the best response of my opponents okay or in other words that the nash equilibrium is a fixed point of this best response correspondence of this best response mapping okay and so uh for example in the prisoner's dilemma you see that well the best response for player two is always the fact is the fact and the fact whether uh player one plays c or d and the same is true for player one so that uh uh you see this is a fixed point of the best response uh uh correspondences okay very good so now uh i want you to uh play a game uh just look at this game and find what is the uh nash equilibrium then you should go to this site and uh you should insert this code and uh submit your answer so let's see uh whether you've got the concept of nash equilibrium right so i'll uh wait until we have collected the uh enough uh responses okay so we are uh at the moment we are 118 you see i want to see at least 50 responses i think probably you also need to add the screen has disappeared hello hello the screen has disappeared yes let me put it again um no uh what is it okay here it is so here is the game so uh i still see five answers only so come on only five answers you can do better okay six answers come on seven okay you are thinking very hard on this problem so 12 13 come on okay so uh okay now you i think you can go sorry it's the first time i'm using this thing okay we have uh uh just two answers for the moment uh uh now okay so seven answers things are a little bit changing so let me stop when there are 20 answers we are 15 okay so maybe uh what i can do is uh to share with you if i can share with you the results okay so uh i think uh we are uh so let me summarize for you what the results are we have 34 answers so the correct answer is this one is three three because this is the best response you see if player one plays b uh then uh player two the best option for player two is to play r okay and if player two plays r then the best response for player one is to play b so this is the Nash equilibrium so this got uh 44 percent of the votes okay so at least the major i mean almost the majority of you got it right then there was a large part of you 36 percent said that the Nash equilibrium is this one but you see that say if uh for example player one plays top this strategy t then player two would be better off by playing c okay so this is not the best strategy of player two and if player two plays l player one would like to switch to to five okay so this is not a Nash equilibrium although the payoffs are larger than in the Nash equilibrium then uh professor yeah but if player one plays top and player two plays center then player one wins so why would player two prefer c no because uh because then t is not a best response sorry c is not a best response to t so the best response of player two if player one plays t is l oh yes okay but if player two plays l player one would like to play m okay okay and if player one plays m player two would like to play c and if player two plays c player one would like to play uh t okay okay so and you are in this uh in this loop okay so there is no uh there is no uh Nash equilibrium in this sense okay is it clear yes yes yes yes thank you okay so thank you very much for uh this uh uh exercise i think uh you uh since you liked it then uh i think uh we are going to uh go to the issue of um okay so this was the right response and these are the best responses you can see that there is no fixed point here now uh let's go to another simple exercise which is the ultimatum game and this brings me to the issue of morality okay so now um the the ultimatum game is as follows so there are two people so Alice and Bob Alice is uh has the possibility to get 100 euros and uh and the choice she has to make is is to give an amount of this to Bob now Bob uh can decide either to accept or to refuse so if Bob refuses then uh they will both get nothing but if Bob accepts then uh he will get what Alice gives you and Alice will keep the rest okay so you should think again that Alice and Bob are rational and uh that they never met each other and they will never meet again they are not brothers and sisters they are not uh wife and husband or anything uh and this is the payoff of uh uh uh i mean it is the payoff matrix okay this is the game so the strategy of Alice uh goes from zero one to up to hundred this is how much she decides to give to um uh to Bob and the strategy of Bob is either to accept or to refuse so again think about what is the Nash equilibrium and then go to uh Slido and submit your answer okay so very good so we have five answers 18 answers okay this is very interesting okay so um okay so uh we have uh almost 33 answers but i think the result is very clear okay so the vast majority of you thinks that uh the uh Nash equilibrium should be 50 50 so Alice should give to Bob uh 50 euros and keep 50 for herself 66 percent think that this should be the rational outcome now uh actually the Nash equilibrium is uh uh is when Alice gives zero to Bob and uh Bob uh uh accept because essentially you see in this situation where Alice what is the best response of Alice what is the best response of uh Bob if uh um if Alice gives zero well the best response is both accept and refuse okay so that this uh uh as a matter of fact this is uh a Nash equilibrium okay so the best response of uh of Bob is always to accept whatever Alice offers uh whatever Alice offers because whatever is better than nothing okay is this clear now you see the tension between what is uh rational and what is fair you may say well this Nash equilibrium is not very fair okay because Alice is uh very stingy so it is not behaving properly okay so indeed if you do experiments like what we have done on the ultimatum game you find out that uh um most of the people will not play the Nash equilibrium and there is a lot of people who have been uh uh thinking about why is it that people do not play uh the Nash equilibrium aren't they rational aren't they play rationally and uh there are a lot of uh uh answers to this one reason is that uh actually when we are in a strategic context we do not really think hard about how to behave but we apply social norms and as a social norm being generous is uh is a good social norm that because essentially and we have learned this because of reciprocity so because if I'm kind with you you will be kind with me and if I'm kind uh with a person in the street uh person in the streets uh will be kind with me this is a norm of the society okay so but this has nothing to do with uh with uh with rationality or it needs uh different explanation uh if you want to explain this behavior that is not explained by uh rationality excuse me yeah please uh in this game does bob uh know about the deal he knows about the amount of money yes that is common knowledge that so he knows he knows yes so you would think uh that uh bob uh uh refuses because uh he gets offended or because uh he wants to punish Alice so these are not uh rational behaviors um but if if the if bob knows about the amount it is very probable that's refusing the um the deal when Alice gave him nothing yes so so indeed the indeed the issue is uh the issue is exactly this so that uh in this type of situation Alice should not assume that bob is rational and so she should not behave in a rational manner okay so that probably uh she should think uh well maybe if I give him 10 he will not refuse uh I see and uh so if I give him uh say then of course maybe Alice can frame these offer in a particular way and and bob will accept I don't know but the point is that if Alice knows that bob is rational and bob knows that Alice is rational then uh bob should not get offended by Alice's behavior because she's behaving rationally and uh and he should accept even if he gets uh uh zero I see okay thank you the issue is uh really game theory deals with uh uh describing the behavior of rational uh individuals okay but there are situations where uh it is not reasonable to believe that people are behaving rationally okay I I have a question yeah please can bob use this this model to actually bargain about the money Alice gives her for example if she gives me under 15 I always say no yes so this is the same as in the as in the prisoner's dilemma no so bob could threaten Alice and say if you give me less than 50 I will refuse okay then Alice may offer him uh 49 should bob refuse or not I mean he should not accept sorry he should not accept if she gives her 49.9 he should not accept yes but this is not rational this is not rational and it is not I mean if Alice knows that bob is rational and bob tells tells him uh look I'm not going to accept anything below 50 then uh Alice should not uh find this statement credible okay it is not credible because it is in the uh it is against the interest of bob himself to behave in this manner thank you excuse me professor so I only um I can understand totally the argument that well something is better than nothing but so if I would if I would have guessed I would have maybe put uh 1 and 99 because uh I don't see I don't know I don't know I don't see why 0 and 100 so the the box with 0 and 100 is rational but the the the box with 1 and 99 is irrational well I don't I don't know if the best is not the best response sorry it's not the best response of Alice uh to the strategy a of bob if Alice thinks that bob is playing a the best response of Alice is to play 0 okay could you repeat that please I was I was if Alice if bob is playing a the best response of Alice is to play 0 oh yes yes yes yes okay yes and so the fixed point of the best response is 0 100 okay I get it when when you have to compute a Nash equilibrium in a game like this you have to look at the fixed point of the best responses then you can think whether this makes sense whether this you can make all the speculation but the Nash equilibrium is defined in this way and this is the way in which rational agents rational individual will behave okay I got it thank you awesome okay so very good so in the lecture notes the in the lecture that you find on the website there is also this discussion about the tragedy of the commons which is essentially the same situation as the prisoner's dilemma but in a different context when there are many agents and again is a situation where many players interact and the social optimum is very different from the Nash equilibrium so rational individuals end up over exploiting a system and at the end of it getting an outcome which is much worse than what they would get at the social optimum and this is essentially what happens whenever you have problems which involve common goods okay common goods are goods that essentially everybody can use and and everybody can exploit okay and but if everybody does so then this the quality of this good deteriorates and and nobody there is no provision of this good by individuals okay so this is a very interesting example and very relevant for economic behavior say for example climate change is is one of these problems no where essentially carbon emissions so the atmosphere is one and essentially everybody has incentives to emit because of industry production but if everybody does so then the the atmosphere will get very bad and we will get global warming and okay and we will have a lot of problems okay so there is a situation where essentially the Nash equilibrium the individual behavior rational individual behavior leads to very bad outcomes okay okay so now you can think about well the Nash equilibrium that we define is always unique and the answer is clearly no and one example of this is what is called the battle of the sexist so this is the game between two persons and she wants to go to the opera and he wants to go to boxing max and but they love each other so they better go hang out together than just one go to the opera and the other goes to boxing okay so the payoff matrix can be something like this and so if this is she she prefers to go to the opera to the boxing and and he prefers to go to boxing and to the opera and you see that there are two Nash equilibria one is where both go to the opera and the other is where both go to boxing okay and so there is another situation where you see that Nash equilibrium as we have defined it does not always exist and this is the situation of matching pennies so in matching pennies is well the problem we have defined at the beginning then you see that if I play head then the best response of player two is to play tail but the best response of player one is to play tail then head tail etc etc so there is no fixed point of best responses then you ask why is this situation so there is no Nash equilibrium here okay but what you can realize is that when this is I think you should expect this because this is the same situation as when you have a penalty kick in football okay so the the player has to choose whether to kick on the left or on the right and the goalkeeper has to decide whether to go on the left or on the right okay and the goalkeeper wins if he goes in the same direction as the player and the player wins in the other situation okay so what is the best strategy for the player in this case well it should behave in a way that is as random as possible so he should not he should play this he should kick this penalty in a way that the goalkeeper has no clue of whether he's going to go on the left or on the right okay and he did the this is the idea also in this matching pennies so that you should introduce the random randomized strategies these are called mixed strategies and a mixed strategy is not in but a probability distribution on the possible strategies okay so these strategies now are called pure strategies and these are probability distribution called mixed strategies so you can define a mixed strategy of an agent the mixed strategy of the opponent and you can generalize the notion of the payoff matrix to the expected payoff okay so this is the expected payoff under mixed strategy sigma i again mixed strategy sigma j okay and likewise you can generalize the notion of the best response it's just the the best response to a mixed strategy sigma minus i is what maximizes the expected payoff okay and then you can define and now what an ash equilibrium is it is exactly the same as before it's essentially an ash equilibrium is is a situation where whatever you play you cannot increase your expected payoff okay and then the final thing so okay so this is an example of matching pennies how you compute this for matching pennies and maybe let me discuss this and then I'll just flesh the result the main result okay so how do you compute the ash equilibrium in mixed strategies so imagine that you have matching pennies and player one plays head with probability r and tail with probability one minus r player two plays head with probability q and tail with probability one minus q okay so then what you have to do is to find out what is the expected payoff of player one if you place a mixed strategy r against a mixed strategy q and and you you do this by computing what is the expected payoff of playing head against q or playing tail against q and what you find is essentially that this is two r minus one times two q minus one and this is the opposite of what player two gets okay so given this function here you can find out what is the best response for player one if he plays against q okay and you find that this has this shape so the best response of player one against q is this line here is essentially playing playing r equal to zero so playing tail as long as player two plays head with probability less than one half because then he will get this one with a higher probability and then to play tail with probability to play head sorry with probability one if q is larger than one half and the best response is exactly this line this yellow line here okay you can do the same for player two and find what is the best response of player two against r then you plot the best response of player two on this axis and against r on the other axis and here you get another line like this and you find that the fixed point is exactly at the point one half one half which means that the two players should randomize and this is the only Nash equilibrium okay so and to finish with this essentially so Nash proved in 1950 that any finite normal form games admits at least one Nash equilibrium in mixed strategies so if you have a finite game there will always be a Nash equilibrium in mixed strategies okay so this is what I wanted to tell you about today so as an exercise you can compute Nash equilibria all the Nash equilibria in the battle of the sexes and I think we have to stop here maybe if there are a couple of questions we can address them let's see what is in the chart uh so there are still discussing about the ultimatum games uh I think this discussion can be endless so is there any burning question I remind you that you can find these things discussed more in detail on the website and um but if there is some burning question then we can address them or otherwise take a little bit of break professor I have a question yes please um I was just wondering what happens when our concept of rationality instead of relies on optimizing for the individual becomes objective for the communal okay okay so this is so what I'm discussing here is actually called non-cooperative game theory okay non-cooperative because essentially players do not cooperate okay there is another branch of game theory which is called the cooperative game theory which is the branch of game theory that turns you how you should for example design a treaty a treaty between different parties between different nations for examples no and um and that is a different subject that I'm not uh uh discussing here so what we are discussing here is non-cooperative uh games thank you thank you for the answer for the question because this is very important professor yeah I have a question uh I remember studying national equilibrium in the context of networks is there a difference between national equilibrium in networks and in this context of game theory or is basically the same thing or is there a plus in studying with networks or something like that okay so um so the so the so this is the definition of games that you find in books of game theory okay so this is how a game is defined then there has been a lot of say research and a lot of work by different people by studying games on networks okay and um now the so the so when I mean if you really um so uh putting games on network means that you have the you have to define this pay off matrices and these strategies uh for agents on the network okay and um which is which is not very uh so I mean what they what they would like to say is that as you have seen is that already in a simple situation the mathematics can be very complicated okay so if you uh and you can extend what I've been saying here to any complicated situation but the question is whether you will be able to compute national equilibrium of nodes okay in many cases people have studied the simple processes like for example you can study what is called the voter model so the voter model is a model of opinion uh dynamics and you can study it on the on the network on a network okay so this is not a game I mean it's not a it's not a model that you can really define as being a really a game because um if you think about it uh well there is no utility function there is no rational really rational behavior uh behind it okay so um yeah so I I don't know whether I have done something or I made more confusion no I think I think it's it's it's clear right now thank you okay so uh for mixed strategies the national equilibrium is now dependent on the probability q of using a strategy yes so the national equilibrium specifies what is the mixed strategy so by the way the strategies s is a particular case of a mixed strategy when q is equal to 0 or q is equal to 1 okay so mixed strategy when you go from strategy to mixed strategy you enlarge the space of possible strategies okay but the original strategies are are still there okay so I think we need to take at least five minutes break before uh with us uh lecture so thank you very much and uh we'll uh meet again tomorrow