 So On rent I'm Scott we're the host of geek nights a late night podcast for geeks if you like this at all There's flyers out there We've got videos of most of our lectures for the last many years at PAX's We probably have a video of this one up to people on the internet We'll know if we did that or not and we're here to talk about game theory Which is interesting because we talk about game theory a lot Talk about it and act like we know a lot more than we do we'll get it right up to the point We talk about the math and then we say but the rest of it isn't that important And we move on because we just read the wikipedia and now we're going to tell you what we read on wikipedia because you didn't read it And you're gonna think we're really smart We reference game theory a lot and the problem is that we always talk about how useful game theory is and it is useful In games, but it is not really about the things you think it's about you think game theory I'm going to study games you're studying games in the same sense that if you like race cars you can go and study I don't know carburetors So what is game theory game theory is actually a very recent Mathematical field that is used in a bunch of other areas. It's used in war. It's used in biology It's used in politics And really all game theory is is the idea that you can study And describe and maybe even predict the behavior of rational actors making decisions And maybe cooperating maybe competing. It's actually a fairly open field I mean almost everything you do is some sort of cooperation or competition and you're making some sort of decisions You've believed in free will at least Now game theory in terms of games is a little tricky because the math is usually not useful like really not useful You'll study all the math of the prisoner's dilemma. It's not going to help you win games So what we want to do is take all the lectures we've done for the last many years And talk about how to actually use this game theory stuff We talk about all the time and actually apply it to games and not hawks and doves fighting over who gets to eat home So game theory actually has its origins If we talk about what we're talking about with the prussians the military powerhouses of the 1700s the 1800s 1900s not so much after that. Yeah one pretty much most of our society comes from these crazy people, right? I mean just you know the art of war but not the sunsuit art of war, right our school system The idea of public education as we have it today came out of prussian military academies Yeah, I mean all war gaming period on tables So it's funny you mentioned war gaming because this is a very old picture But it's a picture of something that you might see in a tabletop library today War gaming as we know it today existed back in the in the year 1812 with a game called kriegsfield Which means war game Now this game if you saw people playing it in tabletop today It has dice and as a game master It has red pieces versus blue pieces with rules about moving around aboard It is a modern war game. You can go read the rules to this and play it today This game was used to train military officers in prussia to be better at doing military things AKA killing people Now this is very important games are used, you know, we think of games as fun But look at biology play the idea of play Generally is animals learning how to fight or survive Without the consequences of failing to fight or survive properly aka dying So we can play risk and study, you know, how war works and learn about war Without having to actually go to war and die So prussia got the idea very early on that they could train they could do military exercises And then they could go one step further and simulate battles and study how war will work on tables with funny dice And this turned into a hobby in prussia independent of its use in the military But the core thing to remember is that the games we're talking about came out of our tradition of trying to use games To simulate reality to be able to learn from our mistakes without being killed by them And it's weird that today we play games where we're not trying to sort of simulate reality with a lot I mean it gets flight simulator if you write stuff like that starcraft right when I play portorico How am I applying that in everyday life? I'm not I'm just trying to win at portorico itself The game is the means and the end Well, we move we move beyond the creche fields to the point where we're playing games purely for enjoyment But if you play games enough you'll start to understand the sort of real world ramifications and the underpinnings of these games and as a result you'll get a lot better at games Now game theory in quotes game theory with a capital g and a capital t that you you know We talk about all the time that actually didn't really exist until around the 1920s And it didn't exist in the form. We know it today until as late as the 50s It's a very new field compared to other things almost as news video games And the two johns john von neumann or neumann depending on how you pronounce it and john forbes nash who was still alive I'm not going to get into the history of game theory and like where it really came out of But these two people kind of founded the idea of modern game theory that you could take the decisions that rational actors make codify them with math and study them and figure out things about them You'll see these names all over if you study game theory people call toy game theory games von neumann games to this day Nash equilibria you'll hear that term thrown out all the time These two dudes are relatively recent to the field and this field is relatively recent to the world Now game theory at its core has some problems. It assumes some things. You all know what happens when you assume So one game theory assumes that everyone involved acts rationally and two that they're all acting in their own Best self-interest so you can see how already if you were to just go by game theory and playing all games It would fail all the time because number one and none of your opponents are going to be rational Right everyone you play against is doing dumb stuff right and they don't know they don't know what the best move is Even if it's obvious right so they do that and suddenly all your game theory goes out That guy keeps trading wood with his girlfriend because he wants her to win Well, that's the self-interest part right is that the rationally is doesn't know the best way We'll talk right the self-interest is you know some guy who's playing counter strike He doesn't want to win the counter strike which would be in his self-interest He just wants to shoot his friends in the head and team kill right and it's like game theory doesn't account for that either Now the real world too the difference between these war games and game theory Why they're distinct is that war games tried to simulate reality And then use that to teach people how to deal with reality or to figure out how reality works Game theory tries to figure out how perfect people act in a perfect world So i want to talk about these assumptions because it's very important These assumptions imply a lot of things that you might not realize The whole point of this discussion is that we're going to try to show you the practical side of game theory Game theory assumes people act rationally that means that your opponents in a game Should or could be just as clever as you That is a huge assumption If you've ever played chess and you moved your bishop out a little bit and you're kind of hoping he didn't notice And that he might move a guy there later. That's not game theory You should assume when you're playing games that everyone at the table is just as smart as you that you cannot hide the existence Of a strategy from them. They figured out that maybe you're gonna put the bomb in the back corner of strategic surrounded by bombs If you think they haven't figured that out, you're not thinking like a game theorist You're thinking like a normal gamer and you don't want to be a normal gamer You came to packs and instead of playing games or watching whatever's going on in the main theater You're here talking about game theory in this room So rational people are playing Logically they're Vulcans. They're clever. They're just as clever as you think about that Think about imagine playing settlers of katan with three of yourself Who wins? self-interest It assumes that you are trying to win the game You're not trying to let your boyfriend win the game because you expect something later You're not trying to flash your teammates. You were trying to win the game By the rules of the game Which means we have to define some game theory terms Words in game theory. There's a whole lexicon of words that have very specific meanings Utility is the character. It's what you're after in a game Right. So in a game where there's victory points, right? You're after winning But the key to winning is victory points, right? You try to get the most victory points If you don't try to get the most victory points, maybe you just try to get money and money isn't victory points You're not have you don't have a different utility than everyone else has now think about the implications in gaming If someone's trolling in a game, they're seeking a different utility from what the game told them to Hey, we're gonna play the prisoner's dilemma. He just punches you in the face. He's playing the punching game Anytime someone is not playing to win They're not playing like a game theorist their game theory suddenly breaks down It's hard to analyze that game because that player is acting irrationally Now think about that in a perfect world. Nobody acts irrationally, but you're at packs. You know what's up Yeah, so sometimes I played a netrunner deck I made right and I didn't try to win with this deck There was just this weird combo that did a silly thing that didn't actually make you win It only helped you win a little but I did it anyway just to make it be silly. I was like, ah So think about this when you're playing games If someone else doesn't appear like they're trying to win You try to figure out what they're after what the utility is And then use that knowledge to win Imagine trying to figure out when other players are acting irrationally and take advantage of their irrationality We'll talk about that more later, but just remember utility is victory points Game We're at magfest and we tried to define what a game is on a panel with a bunch of gaming industry experts And you know what people got mad in the audience when you dared to say that watching a movie might not be a game I'm not even kidding right but in game theory, right a game has an extremely strict definition in the context of game theory Right, uh, first of all a game in game theory has to have multiple players Anything that is single player is not a game in game theory end of story It's a puzzle not a game right or something else It's not a game unless it has two people because game theory is all about what decision do you make Based on the decision the other person could make if there's no other person to make a decision Then it's not a game anymore. It's just you solving the math problem the end But room and sky you're thinking what about ai one shut up Padang We want to be pedantic and really get into you know the idea of what is a man What does it mean to be sentient all those things? We're trying to be practical about this the ivory tower side of game theory is awesome But that's not we're here to talk about So think of ai if you can't distinguish it from another person fine It's a game theory game if you can figure out its ai then no it's not a game theory game Or it is and you're just gonna assume that it's a player who's dumb and follows a strategy in the real world today Every ai is not a real ai So you could know what it's going to do So it is an effect just a really really hard puzzle that is hard to differentiate whatever now humans might or might not have free will We could get into all that but yeah, are you even If the only argument you can make about anything is the low-level solipsistic. What does it mean to be allowed to shut up? The game has to be interactive you have to actually interact with the other players Or we're not talking about it if we're playing versus solitaire Whoever wins first. It's not a game theory game. We're not we have nothing to say about versus progress quest. Let's go I started Both of us The game has to involve decisions. You have to make a decision at some point Now you might have decided what you're going to decide ahead of time That's called the strategy. We'll get to that later And the game has to have payoffs and has to have victories someone has to win someone has to lose You have to get something poker if you win some money There has to be something that you can get more of than someone else or not talking about if you play tag It's like, well, when does the game of tag end? Is there a winner is just someone who's it all the time, but there's no winning ending It's not a game theory. I just read an article in the Times about a group of guys who're playing for yeah They've looked at it for like 40 years Right, so you need the game has to have sure the game has to have a winning and ending a victory A prize, you know some way to you know to end and there you go the results So and remember this in general whenever you're talking about games There are different definitions of all these words But if you want to have a serious discussion, you have to define the terms you're going to use ahead of time So you're not arguing about well, what if I play a drinking game while I'm watching a movie that makes that movie a game now shut up Strategy I use that word that word means something very very specific In game theory a strategy means I'm gonna hoodoo can constantly But if he gets close to you see where I'm going with this A strategy means you have decided what you're going to do for the entire course of the game I have a rock paper scissors strategy rock okay Yeah, I lose I lose That is a strategy a strategy means you have already made every decision you're going to make before the game starts Your decision was what strategy will I use? Well, it's not necessarily that you've decided right is that a strategy is a complete set of all the decisions right? So in chess if you said I'm gonna you know you you have a complete set this one there Then this one there then this one there then this one there and you plant You know it's got the plan for the whole game that is strategy number one And let's say you take that exact same strategy and you say well It's gonna be the exact same thing except on the last turn the pond will move one space less All right, that's strategy number two and if you figure out every possible set of moves right for any particular game That is the you know complete strategy set every move you can make and for a game like chess We haven't calculated the whole thing yet, but for checkers we may never calculate the whole thing It's not likely in our lifetime. We will we'll get to that So in street fighter if I hoodoo can one millisecond differently. That's a totally different strategy So practically you're not going to have a pure game theory strategy when you play games But you'll have a colloquial strategy. I'm gonna don't get this shit out of him and that's all I'm doing That works surprisingly well against people who don't know how to jump So the whole point of this is that there are games In game theory and if you want to study this stuff for real go to wikipedia and look for the list of game theory games There's like a hundred of them there Those games are not fun to play, but those games exist inside of the games you play every day So if you study those games You'll recognize when an analogous game like those games exist in your other games So you're playing a game while you're playing games So now remember every one of these game theory games meets the requirements of the true game theory definition of game Right, it's a multiplayer game. You make decisions. There's a payout. There's a winner Right and when studying those games and what to do with them You're assuming the rational actors people trying to win and not trying to do whatever else So the prisoner's dilemma now there's a whole old description of the prisoner's dilemma people bring this off in every talk About game theory because everyone knows it's super simple rather than using the classical definition I want to use a definition from a game who might have all played when you were young Now it's not a game theory game obviously But this you know people you'd argue this is a game It's more it's no more less of a game than a final fantasy in some senses Is the author any other player? So in this in this game You're a kid and you have a magic bike So you get invited to be in the bike race And you and another kid's gotta help play this right now So the guy comes over and says we each get a piece of paper You write apple or orange if you both write apple you both get into the bike race If you both write orange neither one of you gets into the bike race If one of you writes apple and the other one writes orange the guy wrote orange goes home Guy wrote apple gets 500 bucks and gets in the bike race And the options the game gives you are write apple write orange wink at the other player and write apple wink at the other player and write orange That is the prisoner's dilemma You are competing with someone else In some sense you can cooperate to mutual benefit or you can defect against the other person And if you do so you get a much larger payout at their expense But if you both defect you're both fucked you might see on youtube There's a clip from some british game show. I think it was like split or steal right and basically It's the exact same thing you they had two balls They had to do the split ball the steal ball if they both do the split ball Then they split this money evenly as a prize if one guy does the steal ball and the other splits The steal guy gets all the money and if they both steal they get nothing right? So this genius went on the show and was like i'm going to steal And the other guy's like what what do you mean? It's like i'm going to steal. There's nothing you can do about it I've already decided I've decided I've decided a hundred percent I'm going to steal your two choices are steal and neither of us gets anything or you split I take all the money and I will promise I will give you half of it after but you'll have to right So there's the only chance if you're getting any money at all It because i'm going to steal Is to play split and let me have the money if you pick steal neither of us will get any money I won't be able to share it with you right now threats and signaling and things like that We're going to talk about in depth in a little bit, but just on this So it turns out That there's a prisoner's dilemma written inside of el grande El grande is a game with a whole bunch of favorite games. There's a copy of it right there that Scott doesn't necessarily agree with me if you want to learn all these like sub game theory games El grande is probably the best game to learn this stuff with because it has so many these little games in it So in el grande one aspect of it is there is a rondle that is used as a secret spinner So say i'm red and scott's blue or we can switch him. It doesn't really matter If you select a territory you have a bunch of dudes like troops you can throw into that territory Scott and I could both collaborate to say yo I'll put all my troops on green you put all your troops on green We'll both benefit because our homeland we get to score it with the extra points and green screwed We knocked him out of the game now. It's a 50-50 shot. Which one of us wins in the end We could collaborate Or maybe we say we're going to collaborate and then scott attacks me anyway now green I know he's going to green for sure right? I say yeah sure and then I see well if he goes to green reds wide open I'm going red So we have to decide are we going to defect or not? Well, I defect against scott. Well, he defect against me Now this gets really interesting for a lot of reasons one We can cooperate if we cooperate We change our chance of winning in a three-player game of el grande from 33 percent Well 33.33 you get the idea to 50 percent and greens just outs nothing he can do But simultaneously I could turn my chance into almost a hundred percent if I betray scott But if scott betrays me and I betray him no green player is gonna win So it's the same thing. It's the prisoner's dilemma happening as this one tiny sub game inside of el grande If you know how the prisoner's dilemma works, you're gonna be good at el grande So in el grande if I wanted to say rim, I'm going to pick red I'm going to pick red if you pick green I will give you half of the room now. Give her watch us play games You'll see me and scott will be playing with a bunch of like listeners or fans in the table top somewhere I look at scott and I'll be like apple apple And then I betray him anyway, that's just how you do The word cooperative, you know, we're gonna define some more terms does not mean what you think it means Right. Well and game theory doesn't write you someone says co-op game You're thinking double dragon right double dragon is not a cooperative game in the game theory land in the game theory land For a game to be cooperative, right? People need to be able to form Teams and win together and both receive the result the reward. So think about this cooperative No, we're not talking about shadows over cam lotter and all these kinds of games. Don't get me started Cooperative has such a specific meaning like scott said binding coalitions In monopoly if I could make a deal with you like, yo, if you land on boardwalk, I won't charge you and the game Forces that to happen Extrinsic enforcement the rules say that is what happens then monopoly becomes a cooperative game Games are cooperative if you can make deals and those deals are in the rules of the game Now I've made deals with people in games like risk before my diplomacy doesn't work out so well, does it? So this is nothing in the game that says you have to do that. So what is it? There's nothing you're basically just talking so in el grande I can say all I want about whether or not we're going to cooperate I totally want to thank you that means nothing and if you're a good player you realize that if you're playing a non cooperative game Anything anyone says means nothing So non cooperative games if we're talking about non cooperative games, it's pretty much every goddamn game out there Almost no games actually have game theory cooperation in them especially if you can make alliances So we'll get to that in games like diplomacy or sieve you can make alliances in the course of the game You can break alliances, but it's hard to make complex binding deals like I won't attack Australia for 10 rounds I promise I will never attack you in asia as long as scott is still in the game You can make all these kinds of things and people love to make these cooperative deals But games are only cooperative if the rules say so is the real world cooperative Real world games like I'm gonna sign a contract to be at packs and do this lecture Well, it depends right on the one hand we could sign a contract, but then not do it And nothing stop physically prevents us from doing it But there is a post enforcement of the police who will come and there is extrinsic enforcement Contract law in the united states at least is effectively a cooperative game because I break the rules of the contract The government comes and does something to me And if I don't want to do what the government says then the government's guns come and do something In the end guns force me to do what I said I'll do or some compensation comes out So the world is effectively cooperative in society because we have laws we have structures If you don't cooperate in packs the enforcers will do something about it So what happens if you make a game cooperative? Why aren't games cooperative? There aren't that many cooperative games because they make games very different in doom You can form an alliance of players whenever the sand world appears and you win collectively You all just win together if you your group can win It's just three on one Maybe if the other players couldn't form a coalition imagine monopoly if you could make for real deals Imagine risk if you make for real deals So whenever you're looking at a game and someone's trying to make a deal with you consider whether or not that deal is actually binding Yo dawg, I'll totally give you wood the next time I have it in settlers But I don't have any right now if you give me a stone now I'll gladly pay you tuesday for a hamburger today. That's not gonna happen, bro I what if you never get a wood for the rest of the game? I'm gonna get wood. Are you? You have it now So let's talk a little bit about so-called cooperative games or as I like to call them bad games I don't like these games and here's why if you're playing pandemic assume no expansions assume no traders or anything weird You're all trying to win right so once not a game theory game Two there is no incentive to not share all the information you have So as a result Games like this tend to break down to the one guy who figured out how to play perfectly telling everyone else what to do That's not fun. People get mad and try to limit that communication But they're limiting themselves. They're giving them. They're basically handicapping themselves The game itself gives you no incentive to not do exactly what the smart guy said This game is really just a solitaire game But what they do is they say well, it's a solitaire game But we're gonna split up the turn into four pieces and each person takes a different part of the turn Right. There's no actual cooperation necessary at all. It's really just yeah, what I'm gonna betray Scott I said in the shadows of her kamala I said I got a bunch of good cards Then I just don't play them and we lose great. I lost too Yeah, you know, it's just a puzzle that's slightly different every time and you solve it together with your friends But usually one person can solve the whole thing because it's not that hard to puzzle But rim and scott games like shadows over kamala have a trader So there is someone you're playing against. Nope because those games if you do share all your information Either the trader is not going to share with you and you know, he's the trader and you're going to win Or sharing the information guarantees mathematically. You know who the trader is So games like this, especially games that have traders Force you with usually very poorly written rules to not share information You can't in shadows over kamala tell people Yo, I have five of this card in my hand if the rules say you can't you have to be fair I got this. I don't got this. I need a little bit of help. They're just obfuscating the fact that there's no game going on so I'm sure everyone who loves pandemics upset now. Yeah, you're fairly upset. It's tough. So signaling This is what we're talking about in game theory. There's a concept of signaling Signaling is when in shadows over kamala you say I have five of this car It's when in any game you tell the other player something else I'm going to throw rock the next time we play paper rock scissors. Are you Yes Can I trust you? You lied So there is a game theory game called the signaling game and guess what signaling means jack Signaling means basically nothing. So the problem with these games is that there's no disincentive to signal So signaling is the optimal strategy But in versus games signaling generally doesn't actually bind anyone to anything Now the question is is there ever a case where you would actually want to signal and it could benefit you So for example in paper rock scissors, is there ever a case where signaling could help me out? So only in terms of psychology only in terms of trying to wig the guy out But game theory he's just as clever as me. He knows that the only way to win paper rock scissors is to play randomly So it's not going to work. So here's a better question Can I make a threat in a game like paper rock scissors? Is there a way to threaten the other player without actually threatening to punch them with my rock? Right, it's like watch out man next turn. I'm throwing rock. You watch out. It's gonna be rock Beware So signaling is distinct from making threats Threats are a very interesting part of games because you cannot make credible threats Unless there is one of three conditions pressed one. You're playing a game more than once In small world to give you an example from a real game or vinci if you played the original I always threaten anyone who's coming on the board with the new civilization It's like if you come when you're coming onto the board this turn if you come on to my civilization I will basically lose this game and destroy you and only try to destroy you and not try to win anymore I might lose the first few games of small world because i'm doing this But eventually people learn that you actually do this And then they stop coming in on top of you And now you win because their choice is to either if they attack you they lose too Or don't attack you letting you win. So in repeat play you can make credible threats in games There's a whole mathematical theory around threats It's only works if you play the game more than once now you need to establish the precedent think about all the ramifications of that Say we play the prisoner's lemma once. I can't make a thread because whatever Say I we play prisoner's lemma 10 times Well, if I threaten look if you defect on me, I'll defect the rest of the game. I'll defect forever So maybe Scott cooperates and I cooperate all good. So now by both of us cooperating we're king making we're gonna win Is there any reason for me not to defect on the tenth turn? He can't punish me for it We know it's exactly 10 games. We know the tenth game is the last game So I should just affect on the tenth turn now. I get more points. I know he's gonna defect on the last turn Because it's just as clever as me. That's right. Nobody's gotten any smarts more than anyone else. Those were both completely rational We both know this is the last turn his threat is completely worthless So he defects on the ninth turn, but I know he knows I defect on the eighth turn You see where this goes and everybody loses The second it is the scene from the princess bride the second way to make a credible threat is psychology This isn't game theory, but psychology. You can wig people out. You can play head games with people and it totally works in the real world The third way and the reason I have a picture of a steering wheel here is an example used in the previous panel Let's say we're playing the game of chicken. Scott and her are going to be in cars Classic chicken 1950s rocker chicken. We're going to drive cars at each other Whoever swerves loses. So if we both swerve we both lose if neither one of us swerves we both die If scott swerves and I don't I get the girl So let's try to make a threat. I'm not gonna swerve I take my steering wheel and throw it out the window. I'm not gonna swerve So what has scott done? He's changed the nature of the game. He is basically by taking his steering wheel out He's removed his own agency. He didn't tell me what he's gonna. He did not signal what he is going to do He already did it I can't have no choice but to swerve and lose the game Be or to die along with scott So i'm gonna swerve scott's gonna get the girl But i'm not gonna die the decision was already made the whole like Quantum state of the game collapsed down and the game was ruined So the way to tell if signaling is good in a game or not, right? Is it will help you in a game is show someone your move if showing someone your move makes you win Singling is good in that game if showing someone your move makes you lose. Singling's bad in that game Let's do rock versus. I signal. I've already thrown the rock That didn't help me at all Throwing the steering wheel out the window totally helps me makes me win makes the only choices for him is die and lose So just keep in mind the difference between signaling and making threats and threats have to be credible in game theory If a threat isn't credible, it does not exist. It's not a threat. It's just head games So to use another game one of these toy games We're talking about a game called goose field Now this game exists in many places. It's also known as the game of pure strategy or gaps And it's a very simple game and it's like it's in al grande You take a deck of cards and you split it up. So you have three players You give each player a suit so spades hard timers Then you take the clubs you put them in the middle you shuffle Every turn you flip one of those cards up randomly It's worth the number of points of its face value You all secretly bid one card from your hand whoever played the highest card gets it in the case of a tie No one gets the card and you continue It's known to the game of pure strategy because what is your strategy in playing this game? And it might seem like a really simple game But it's actually not how am I going to with we all have the same amount of cards We all have one ace. We all have one king How am I going to get more points than the other person? So if you study this game, you'll find out that it didn't exist in a bunch of other games In fact, the game it exists in I might have signaled this Is al grande a mechanic of al grande is you have bidding cards these bidding cards determine who goes first in picking roles They also determine some other things. So the lower cards that let you go less Have more people on them They give you more stuff But the point is that you are basically bidding just like goose feel from this hand of cards to decide the order of play We played al grande so much we figured out that people tended to win if they went first in the third round Because they could move the king and the king gave them extra points So people would want to have their 13 through the whole game and play it in the third round but Because turn order determined who got to bid first and you couldn't play a card that was a tie P you would have to go last in the second to last round Meaning you had to go first in the third to last round So it became this musical chairs of bidding and it was just goose feel if we had learned about goose feel and played it and Studied it we could have won al grande Now goose feel is an actual game you can play it just grab a deck of cards Get three people and try to bid on and win the most points of cards Yeah, you might think well to get the ace I got to bid the ace, right? Well, what if somebody else right decides well, you know what for the ace I'm gonna bid the two and for the king I'll bid the ace and for the queen I'll bid the king, right? It's like yeah, I'll let someone else have the ace. I took every other single card by bidding one above Well, we could take that a step further. Okay, I won't bid on the king or the ace I'll just get the queen on down by bidding the ace on the queen and so forth, right? And eventually you're bidding the ace on the two Now it gets much more subtle than this because they're this is a game of strategy a game of pure strategy What if someone's acting completely randomly? Completely randomly they just shuffle up their goose feel cards without looking and bid Now on one hand that might seem like a very good strategy It is trivially beaten by a little more complex strategy Always play the card that is the face value of the card that came up But that strategy doesn't work against a player who's not acting randomly because if I see scott doing that I play n plus one and you can see how that escalation happens Well, I'll always beat him by one, but he knows I'll beat him by ones will beat me by two So that's cycle and that's what is the good strategy to play this game If you can figure that out you can win a lot of board games and a lot of other games that include goose feel Inside of them, but the key there. How do you figure out what someone else is doing? How do you figure out if another player is acting rationally if you can figure out that someone's dumb Or irrational you can use that to your advantage So colonel blotto I couldn't find a picture of an actual colonel whose name was blotto. I was very disappointed against me The colonel blotto game Exists in algaranda. Oh, you don't say colonel blotto is a very simple game Say you have three regions and you have 10 troops You send a number of troops simultaneously to each of those regions and the other person does the same And then you reveal whoever wins the most regions wins the game You need to win two regions out of three to win How many troops do I allocate to each region to optimally win the game? Now you could play the blotto game with people's very simple game If you study the blotto game, you'll see it exists in other games in algaranda Look at this. It looks like a bunch of troops in a bunch of different regions And lo and behold there's victory points for having the most troops in a region at a certain time Now there's a whole mechanic of getting troops onto the board. It's not pure colonel blotto But if you understand this fundamental concept of the idea of how do I allocate resources between A number of disparate places when someone else is doing the same to maximize my payout You'll find that that exists in the majority of games you play So now we're going to define some more terms because this is where game theory gets even more interesting perfect information Is a construct that exists in game theory people usually define this at the beginning of any talk about game theory But it's usually not very useful perfect information means something very specific It means I know everything that has happened in the entire course of the game up to this point I mean, you know, how many games do you play where it's like you don't know everything You know in starcraft as a fog of war You don't know what the other guy did for the past five minutes because he shot all your scouts out of this guy Right, you mean you know a little bit, you know, he has the things to shoot your scouts out of this guy But that's about it, right But if you play maybe without the fog of war or if you play chess It's like you can just rewind and look at every move that was made There is no secret thing that has happened Nobody's holding a hidden card that they've drawn that you don't know about right? There are no mysteries whatever both players have all of the information. It is perfect Now this has certain ramifications But it does not have any effect on the solvability of games A lot of people don't like the idea that games are solvable But games are eminently solvable a lot of people think that oh, yes A game like chess is solvable because it's perfect information But you can't solve games where people act simultaneously. No, you can solve those games just same There's certain ramifications of perfect information You can't have simultaneous terms in a game that is perfect information by definition If we can act simultaneously the decision that affected my turn just now I didn't know the decision that was made. I was acting without knowing the perfect information of what he did So perfect information games are completely distinct from Complete information games a complete information game is where you know all the rules Which is why we have the hockey rules up there. So if I know all the rules. I know the payoff matrix I know all the possible strategies you can use the game is a complete information game Right, you know his chest is also a complete information right you look at the board You know every single move he could possibly make on his next turn. It's equal to the number of fees He has that's how many moves well even greater than that because he could move it this way or that way So, you know, it's it is how many moves he can make you know every single possible move he can make in theory But there are games where you don't know everything the other guy could do If he's got a hand of cards and you don't know what cards are in that hand You don't know when he could do it his next turn imagine the gathering Now maybe you know the possibility of all the total set of cards He could have in his hand So rather than get into the minutia of the edge cases of complete and perfect information Consider the interesting ramifications of different combinations What's the difference between a perfect complete information game or a perfect non-complete information game? Can you think of an example of a game that has perfect information? But not complete information. You know everything that's already happened But you don't know everything that could happen. You don't know the rules And a toy example is a game where we're playing chess on a board with chess pieces We make chess moves every turn I win if I get my king Two spaces up in one space to the right if I get him to that square I immediately win Scott wins if he does some other thing We don't know what the two of us are doing. I don't know what he's after. He doesn't know what I'm after It's a perfect information game, but it's not a complete information game So think about perfect and complete and practically think about every game you play Is it perfect? Is it complete? And then think about that game in terms of other games that are the same combination of perfect and complete And you'll start to see a lot of really interesting parallels between all these games So Most people when they think about game theory They think about analyzing games solving games. You know how we got into game theory Scott I went to the RIT library and I saw a book of one of those blue library bound books And it said game theory on the side of it and I'm like I like games. It's a library This is free. I will take this back to the apartment We were really into german board games like we just learned about settlers of katon and carcassone This is in the year 2000 where some of our rico came out blew our minds So we decided that we're gonna double down on this. We wanted to win these games. So let's read these game theory books It's all about hawks and doves and old people There's lots of math So we're gonna talk about how to analyze games and how the concepts of game theory are used to analyze games And we're gonna skip the math Because we don't know it Scott usually makes that joke So let's talk about a very simple game. We've talked about a lot rock paper scissors Is there a good pure strategy for rock paper scissors a pure strategy means you've decided what you're going to do every time you play the game Is it possible to have a pure strategy in rock paper scissors that is in any way effective and the answer is no So what you want to use instead rock paper scissors is solved by having a mixed strategy Uh, my strategy for rock paper scissors is to play rock paper or scissors Randomly each one of them 33.3 repeating percent of the time Now it's impossible to actually play this strategy as a human being because Human beings cannot really generate randomness in their head very well In fact, it's one of the things humans are the worst at right It's like you might think you're playing randomly But really you're not right if you actually had a computer do it the computer There would be strings of like five or six rocks in a row They would be like some you know Homages scissors in a row over there if you have a human do what they think is random There's going to be a lot more mixing up just like rock Paper scissors maybe two scissors in a row, but never thought three usually right now humans can get good at acting randomly Is an extremely difficult skill to build And I'd recommend you try it come up with a way to act randomly If anything find someone like us and try to write a string of ones and zeros And try to make it random and we can probably eyeball it and tell you if it was randomly generated Have a computer or by you have a computer print out a random string of ones and zeros And then write a string of ones and zeros with your hand Print them both out and show them's like a you know a mathematician or a probability or a statistician They'll say that one's not random. You can just tell by looking at it. It's it's obvious But the perfect strategy solution to paper rock scissors if everyone is rational is to play completely randomly And as a pragmatic tip in many games if decisions are arbitrary It isn't your best interest to act as randomly as possible There's a lot of games where it's like, you know, you've got three things to pick from and they're all pretty equal You just the best thing you can do is shuffle them up and pick one randomly The thing is in a lot of games there might not be cards to shuffle up or a diet or roll And you have to determine randomly without a mechanism and you could be said that you know A lot of you will bring a die and like use it to help them pick randomly Sometimes that could be considered cheating. I mean, I'm gonna bring my steroids to the bike race. That's okay, right? Yeah, yeah I'll admit the steroid bike race what I will do. I'll let you into my secret heuristic We'll talk about heuristics at the end That's kind of the whole we're driving toward heuristics Is that I'll look at a watch or I'll look at a clock or something and I'll come up with some decision making matrix Like I'll always break right if the second hand is odd when I look at the clock I'm cheating basically Now We're the interesting part about practical game theory is that we're not in a perfect world. We know humans are bad at this So how do we be better than the perfect strategy against humans? Because we we're detecting that humans are going to act irrationally. There's a computer algorithm that does this It'll be any one of you add paper rock scissors Reliably and the way it does this is as you play It keeps track of every throw you did and it figures out your cognitive biases It is mapping your brain's random number generator and over time it will beat you a hundred percent of the time It is uncanny So as a person if you point it against itself, it's 33 Obviously well unless you're using the pseudo random number generator in which case it might figure out the Right if you had say a piece of cesium Creating true random numbers in one computer and just a normal like you know intel court you duo generator random numbers in the other computer Eventually the cesium would beat the court you duo over time Or you could argue that the cesium would cause the other computer to itself become Perfectly ran it would approach true randomness over time and things get tricky But we're not going to get all those details So there's an old heuristic for paper rock scissors. That's very interesting This really hits on the idea of discovering the irrationality of your opponents The heuristic that I use as I figure out how many steps away from an idiot child as the person I'm playing Assuming they are American So kids tend to throw scissors Because cutting is dangerous. I mean you're not allowed to run with scissors You're not even allowed to have scissors Yeah, they can have rocks and paper right but scissors like the most dangerous rocks like second most dangerous So I know a kid is going to throw scissors more often He's definitely going to throw scissors first. So I know how to beat him I'll just throw rock and I'll throw rock more often Now that kid's going to figure it out when he's one step away from an imbecilic child What he's going to do is think I know that everyone thinks I threw scissors first So I'm going to throw the thing that beats the thing that beats scissors So if you step through these iterations scott is about 17 iterations away from an imbecilic child So you can use heuristics like that to figure out the other person's irrationality Watch for players who deviate from perfect play and try to exploit that Uh, in fact a really good example of that in multiplayer games You've all been at that table of packs. Well, one guy's just not as bright as everyone else Not playing as well as everyone else Among smart players people who play games and are serious about him the game becomes exploit him Exploit his randomness or exploit his poor play to benefit the rest of us Yeah, and it's like someone's playing settlers or genoa or a game of trading especially right and they're really bad It's like who can rip off that guy the most Right is eventually that guy he's playing so badly But he actually ends up mattering more than the good players It's the good players is just like well, there's a bunch of pilot free resources How many free resources is going to get out of that pile? Now back to this whole idea of pure versus mixed strategies The best strategies in real games tend to be mixed strategies If I go craftsman captain every time I play Puerto Rico I become a very predictable player and it's very easy for scott to exploit that I'm basically acting irrationally by having a too predictable Of sort of mechanisms captain before you captain So I'll have a strategy like I'll play craftsman captain 80 percent of the time But 20 percent of the time I go factory Now anyone who's played Puerto Rico a lot though should be reversed factory is the game winner Factory there's like there's a good mod for Puerto Rico You switch the prices of the factory in the university and anyone who starts with an indigo gets one doubloon extra to start with It really makes the game crazy one way to solve games is brute force Just try every possible combination Now tic-tac-toe has about 20,000 unique Born piece like placements. I would hope everyone in this room is solved tic-tac-toe Now many of those are redundant, but that's not really the point connect four is somewhat more complex Checkers that's a 10 followed by 20 zeros if you don't know how that notation works 20 zeros Connect four was solved many years ago. There is an absolute solution to connect four Checkers was solved several years ago by some Canadians with some crazy computers It took 19 years and 200 computers To figure out Checkers the solution to checkers is if you play perfectly both players can guaranteeedly force a draw So the game is a draw if people play perfectly Chess is somewhat more complex. That's actually a rough estimate We don't even know how many possible positions there are in chess It is somewhere between 10 to the 43 and 10 to the 50 something And go is a go board is that that is a 19 by 19 go board go will probably never be solved Unless you have a bottom computer is some ridiculous chess will likely not be solved with the technology We have available us today. Now you are not going to brute force your games, but you can Understand games that can be brute forced and understand how complex games are and how strategies combine And just even knowing how complex a game is gives you a lot of insight Into what heuristics to use to be better at that game This is going to make a lot more sense at the very end of this lecture So just remember that brute force is basically petered out already with modern technology Common tutorial game theory Is a relatively recent and relatively deep theory of games and I learned it from my seventh grade math teacher He taught me a game called nim and nim is very simple draw some number of sticks In three or four or five columns and every turn you take turns removing some number of sticks from a column You can't remove sticks from two columns at once you have to pick a column and remove some number of sticks from that column Whoever picks up the last stick loses So you want to leave the other person with one stick left in one column So that they're forced to take that stick because you have to take at least one now It turns out common tutorial game theory Which is the idea that if there is a game and another game and you add those games together You can do fairly simple math and determine Like if I've solved this game and I've solved this game and add them together I know the solution to this game by using common tutorial game theory So for example nim with just one stick Guess what the player who goes first loses because they have to pick up that one stick Nim with two sticks is a different game and in with two sticks The player who goes first wins because they pick one stick and the second player takes another stick Nim with three sticks but first player still wins Player one wins in other words nim with one stick plus nim with two sticks equals nim with three sticks Which is player who goes first wins, right? Therefore, right? It's player goes first wins plus player second wins equals player first wins You can combine the games with a plus sign and get another game and know the answer to the third game By just adding the first two games together Now what's interesting is that some games are more Resolvable by common tutorial game theory than others tic-tac-toe is actually surprisingly difficult to express In that in that way. It's hard to solve tic-tac-toe as a person using common tutorial game theory But if you know the solution to nim if you've looked at the equation You can calculate in your head who wins no matter how big that it could be a million sticks in the first one 9,000 in the second one eight in the fourth one 40 in the fifth one You can look at it and immediately know who's going to win assuming people play perfectly Assuming people play perfectly The way to get good at games like this and all the games that are derived from games like this Is to play nim literally all of you should around packs take pieces of paper and play nim Just draw like five sticks three sticks two sticks Take turns removing some number of sticks and the last person to pick one up loses And you'll start to notice all these patterns You'll notice if the game gets to this state where there's two sticks here and two sticks here This player always wins because some game with a big number of sticks you played it a bunch a bunch of sticks are missing And now it's a new game. It's the game with only that many sticks You might as well have started with that many sticks and the answer to the big game is the same as the answer to that small game You guys eventually you're going to figure out you're not playing to get the game to the end You've memorized this list of 20 Conditions that if you get to that you win You're now just playing to get the game to that point and then the game's over because you know you win So if you're doing that and other people aren't you are way ahead of them in terms of winning this game And after you do that you'll start to you'll start to figure out like the fullness of this game Then I want you to go and read a book by Richard Garfield and some other people called characteristics of games In the back of that book. There's an appendix in that appendix He explains the math of combinatorial game theory if you figure out nim and get good at it and read that You will understand this surprisingly complex area of mathematics in a surprisingly intuitive way And you'll be better at games that involve this because you have learned That pattern recognition is the key to winning games if you can recognize The pattern that wins the game before someone else this guy's playing for the end You're playing for the pattern. He doesn't see what you're doing. You're gonna win because you're going for something He doesn't realize it's important yet more importantly Players who're playing in if you don't know how to play you're all going to do the same thing It's how humans solve problems. You are going to act randomly until you have figured out who won You do this in every game you play whether or not you realize it if you play go How many of you play go? All right, so go has Almost non-existent Heuristics both directional and positional which we'll talk about in a second as a result You don't know how to evaluate whether or not a move you're making is good or not It takes a lot of learning to even get to the point of knowing if you're doing well in go As a result, you will play randomly until you notice Oh that pattern appeared now I can circle that thing and win So every time you're playing games think about this What am I doing and the answer is almost always going to be oh I'm acting randomly because I don't know what to do So as soon as you get good at a game try to recognize what other players are clearly acting randomly And use that to your advantage. You'll know if they've solved the game or not You know what to shoot for so this is kind of we're building up to this heuristics Now I mentioned it once I'll mention it again. There's a book by Richard Garfield. You may know him You made some moderately popular games. Yeah, I don't know. You might have heard of them magic the gathering Android netrunner Uh, yeah, yeah, so this book If you're interested in games game theory at all, you should read this book every one of you should read this book We're gonna throw out if you tear it up to be in this room. You should read this book Yeah, so we're gonna talk about something called heuristics now heuristics Are part of our humans work They're part of our games work for the whole point of this because you even if you're super good at Puerto Rico I'm super good at Puerto Rico. I do some math. I do make some calculations in the course of the game I am not calculating the entirety of the game That might be larger than chess that might be more different. It isn't possible for me to do I'm not that smart. None of us are I'm using a heuristic figure out how to play the game and I'm using math to augment that heuristic This is a diagram of something called the gaze heuristic The gaze heuristic is something that human beings use and you all use it If you're running to catch a ball someone throws a ball like baseball and you're trying to catch it Maybe you're crazy and you're using differential equations and calculus to calculate the trajectory To predict where the ball will land and then you're running to that point But if you watch people they don't you someone throws a ball They're not looking at where they predicted it landed and running to it. They're looking at the ball and running They are not predicting where the ball is going humans Almost have no ability to predict where something will land based on when it was shot You're playing baseball and you could watch the guy swing and hit and then they closed your eyes And you had to go and stand in the spot where it was going to land and catch it like that It's not going to happen. You think you can predict where things will land You can't very quickly and even if you do learn how to do that Your body will not do that when you're trying to catch something it will fall back on the gaze heuristic This is built into your brain your head will walk at an angle looking at the object And keep the object at the same angle no matter what and mathematically It just so happens that if you do that the ball will end up in your hands Because you have to move forward it is forcing you to catch the ball no matter what So think about this the next time you're playing baseball Imagine realize that you're next not moving you're locking the gaze that is a heuristic It is a sort of soft or fuzzy way a rule to follow That if you follow it is pretty much guaranteed to make the ball land in your hand Or if you're doing what i've said and you're thinking about this it's going to hit you in the face It's why they say keep your eye on the ball So in games there are two kinds of heuristics Directional heuristics and positional heuristics. So directional heuristic is which direction do I go right? It's a method you are using to figure out do I do this or do I do that? You have multiple choices or some kind of decision to make the heuristic directional heuristic is How do I figure out which of the decisions I'll make which way will I go? For example, uh one that I like to use is in power grid when I'm bidding on power plants, right? I will look at the power plant and I will say all right How I need that power plant to win the game. It's a big one. I need it. I want it How much am I willing to pay for it? Well if I buy that I will have to spend this much money to buy resources this turn I put that money aside Then I say okay, how much money do I want to spend on houses this turn? I can power up to this many houses. It would be nice to buy that many It will cost this I put that money aside and the remaining money is the money I'll spend in the power plant Not a perfect strategy, but does very well very good straight offloads More complex processing from scott's brain because he just follows the rule he came up with To a fault and he puts the money aside on the table and I can see what he's yes You go like this you're like No, and I know what you're doing. That's why I went power grid. You don't win You haven't won that a while So I mean look in all games directional heuristics It's telling you which way to go. Do you want to fall off that rickety ass bridge into the deep chasm The darkness below arrives the screams of the undead. No, I'm just saying fruit right here And you know what in the game if you walk up here, you're fine. Walk up here. You die Unless you come back after drinking potion two. I don't know Anyway, I like that extra torch you guys. So think about what I said before with go go has No Reasonably useful directional heuristics for beginner players. They just don't exist So when you're playing go, you're just acting randomly by default your first directional heuristic is act randomly Your second directional heuristic is act randomly until I figure out How to win the game or act to max it like if there's victory points I'll just do whatever gives me the most victory points. That's usually not the best strategy But you know what it's better than completely random If you play a game that everyone at the table just read the rules to and no one knows how to play Best thing to do is to skip over the act randomly and go straight for get the most victory points You will win that first game 99 percent of the time now You have to construct increasingly complex heuristics to know what to do A directionally heuristic and go involves such crazy crap as how many areas of the board are still alive How many pieces are there still that are going to be played because you know how to calculate that Is the other guy working on this area of the board or this area of the board you have this whole huge heuristic in your head But you're not calculating that because if we know you can't calculate go I was going to say chess and checkers at the same time and I said go instead and scott simultaneously you want it So forcing yeah, what you're going to do is you're going to recognize patterns and go You you know these very tiny sub games just like a nim combinatorial game theory You recognize this one pattern is a win for this player This one pattern is a win for this player if this pattern exists Do this and this and this to turn it into points for you to win the game You build this lexicon of little strategies of little games And you use those to construct a directional heuristic and that is how you win games Game theory just lets you construct extremely effective heuristics without having to do the math every time In the panel before I said learn modulus math when I play games with rondels I use modulus math to figure out the cycle and then I use that cycle to populate my heuristic Knowing modulus math lets me calculate that very quickly And because we're running out of time positional heuristics, I put them last are actually more important Who's winning game? Who knows? It's almost impossible for people to actually know who's winning games Right even if you play something like carcassonne you can see there's a victory point track You can see someone's at the front of that track. They already have 50 points. No one else has anything and rings at the back I've got less points than everyone But we can see on the board that rim's farm has a whole bunch of farms in it And we could also see that he's got a guy a big meeple in a city that will likely finish and is worth like 30 points So rim is in first place So using the positional heuristic of count the points on the board is much better than look at the scoring track Which lies to you? Yep Mario Kart it lies to you. Yeah, it says Mario's in first place. No Blue shell He's not in first place guys and you might think no no he wasn't first place They caught up no he was never in first place You were just using the wrong positional heuristic So going back to all this game story stuff Theory stuff knowing where you are whether or not you're winning or losing is crucial to forming your heuristics Because for example, if you're falling behind in a game You want to act more randomly you want to attack Decreasing odds for greater gain because that's the only way to catch up You have to actually know you're behind a lot of people lose games because they don't realize they're behind Right, like, you know football team the only way you can win now guys is to do a hail mary But what if you didn't know that you were losing you looked at the scoreboard needs, right? You thought you're about to win and you're dumb But the point is that you construct these heuristics By using the pieces of the game theory games from that wikipedia page that you all need to go and look at That's this game theory games and the more of those games you study and understand It'll take you a few minutes to get the gist of some of these And you'll start to be able to construct really advanced heuristics And none of your friends are ever going to want to play games with you again Now the point is though beyond all that is that you have to actually play these games Because sure you can make the best heuristics in the world You can study the game theory memorize everything We just said you've got the perfect strategy to beat all your friends in Puerto Rico But if you don't actually play with people you're not going to be able to do that intuitively You're not going to be able to do it quickly You're going to be stuck calculating people are going to be yelling at you to take your turn You're going to lose count of the cards and then it's all over no one wants to play with you The only reason we know this stuff is a combination of reading wikipedia Reading that Richard Garfield book And playing Puerto Rico 20 to 30 times a day over the course of an entire summer Yeah, a lot of people right you don't play games enough right as I use people to come to tabletop So I can put a power grid a few times dude It was a time when I was playing power grid every day, right? Maybe twice a day right and that's you have to do something a lot to get good It's practice right but practice from one game transfers over to another So you really just play games like crazy if that is what you're into do it more a lot more And on that note I'm afraid we have to end because we'll have to go on shift as enforcers in negative two minutes. No I have an earlier shift because I'm in main theater. That's tough So we will not have time to take questions if you take one of those flyers Email us a question those flyers are really old those flyers from 2005 just ignore everything on them, but the URL We will try to put the video of the previous lecture that you all missed because you were in line for this one online And we will also try to answer your questions perhaps in video form associated with the video of this panel Or perhaps in the newsletter You can show it to your friends to make them better at games You cannot show it to them so you'll beat them again