The Math of Being a Greedy Pig - Numberphile

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
locked down everyone's been playing more games right i found a game where uh i hadn't picked it up for i don't know 20 years do you recognize this brady that's past the pigs did you have a copy of this yes in its faux leather case plastic for anyone who hasn't played this game is ridiculously simple and i can't quite believe that it's a good game when it's just to roll the pigs but what i'd like to do in this video is sort of remind everyone how it works i'll show you if you haven't seen it and also we can we can do some proper mathematical modelling on this which surprised me and i quite enjoyed it so that's the plan so the pigs uh are just they're just plastic pigs and maybe i can plant them here is that on your camera okay there's a dot on one side and not on the other but there's just two of them they're plastic pigs they're not real pigs and the idea is you roll them and you score some points now this is a very exciting role there are some scores here how they land just give you some some points so according to this uh this one's called a razorback because the landlord's backs would give me five points i'm not going to go into details like the rules are here and again you just roll the pigs you score some points and that's it which does not make it a good game until you realize you do have a decision to make which is you can roll again at any point like i've scored some points i can roll again and i score some more points and i can keep rolling as many times as i like unless i roll on the next time i roll i roll this particular configuration where one dot up one no dot and that's called pig out and i lose my points so that's that's the end of my turn it's not the end of the game it's just the end of my turn and at that point i passed the pigs so you sort of stick or twist hoping not to bust out back or bust stick or twist roll or hold whatever you want it's that dichotomy the only decision you're making is actually do i roll again or does that feel too greedy so the risk is actually it's a simple decision but it's not obvious how to play well the trouble is with this game is it's really hard to analyze how to play well because pigs are notoriously difficult to predict how they land like it's not obvious to me the probability of landing like this or landing like that or the best role i think is called a leaning a leaning jowler where it's on its ear and it's chin great but i have no idea the probability of rolling that so for the sake of analysis and this is what i like to think of mathematicians doing the modeling cycle you basically let's just make it simpler so we can analyze it and then we'll come back to upgrade for the real thing so i'm going to remove the pigs for now but they'll come back and we'll replace the pigs with a single d6 regular d6 and in this game same idea you just roll the dive and whatever it lands on you score and you then choose to roll again or bank and the catch like in the other one is that this time if you roll a one at any point that's the end of your turn and you pass the dice to the next person so that's it and actually this is the original game as far as i can find it's been around for a long time it's called pig which i presume is where they got the name pasta pigs from and they just let's make some lovely pigs and boom millions of pounds later everyone's happy with the plastic pigs get but the original d6 roller one you lose your points pass it on otherwise you bank at any point let's have a game ready all right i'm actually going to have two columns for each of us and one will be a running total wanna be just the points he's going this time so uh you're going to go first here we go you ready yeah that's a four now you can roll again or you can bank it i'm gonna roll again i think you should all right but don't let me tell you what to do all right i want more points four what's good though four's a good score that's better than one i need lost so you get a zero for that turn and you're talking about zero that was greedy yeah you agreed some if i first learned this game with the dice and i called it greedy pig so you get the idea like maybe that was too much maybe you should have banked i've got a five i'm going to roll again uh three that's eight all together i'm going to roll again oh nice uh hold on 14. so i'm going to bank on 14 uh just to get the principal have another turn brady ah six nice what are you gonna do you've been burned last time but we're gonna go again hey take the rest i need more points to catch you and that's all over c still on zero um but i mean let me make one the way the game works i want to show the scoring here so i'm gonna do another turn just to rub it in your face that's a two if i bank that that round scores me two but it adds on to my accumulator so i've got 16 all together and there's variations let's go go on then get off the ground i want to catch your 16. but do you have the guts to trust your intuition about what's a good score to wait for or are you now scared because of your i should rather not i should roll up one every six goes should you is that guaranteed is it no there's a five five he's going to go again despite the evidence of whatever and there's a six that's eleven i could catch you i'm gonna go i'm gonna take the risk i'm gonna go one more greedy there it is i wish i'd rigged this it's too good oh right well i'm gonna have a go no i'm going i'm i'll play on my own i'm gonna go again and a six nine i'm gonna take a nine so that's a nine for that term but altogether mental arithmetic 25 do you want to get off the mark or are you just going to accept this is your fate this is unbelievable we're going to cut to like 20 rolls through the video there's seven altogether you're still going go one more just one more well what i like about this game with the dice even more than the pigs it's dead simple right you just but the the high stakes i've seen a classroom room of people play this and it gets loud really quickly people are shouting the dice is unfair this one like it feels like it's rigged against you i did it right and that's the luck of a dice roll that's why games with randomness are interesting you cannot predict what's going to happen what you can do is predict what you should do on average you've played the game you've done i was going to try and put it nicely done really terribly but that wasn't i think for a lack of skill like luck plays a part here so what what strategies might you have even if they don't pan out every time do you have any thoughts about a strategy to play the game well i think you were thinking of some if there's a one in six chance or i think you should do three rolls per go okay so what i'm going to call this is a roll strategy basically pick a number of roles that you think is is safe maybe three rolls is a good idea and if you're still in after three you're saying bank maybe that is sensible but as soon as you pick that as a strategy the next question is maybe four would be better or maybe 20 rolls would be better i suspect both of us think nah the chance of you getting one there is like it feels like it's gonna outweigh any benefit so we have an instinct about a role strategy but the question is for what value of n does the role strategy work best now i'd like to analyze this one in a minute but there's there's another way of playing instead of picking a rod do you know what i'm going to say a point strategy yeah so like i'm going to call it a score strategy maybe you just pick a target to get to so let's say i pick 10 and then i just keep rolling however many rolls until i get at least 10. and it seems like i won't always get 10 exactly you might get 11 because i want a nine hour two or something that seems better now to me yeah why i think i agree because scores and points is what wins the game absolutely there's our goal here and we actually haven't talked about how to win the game which is a bit of an error in any game the game is compelling even when you don't know that but traditionally the game of pig you pick a target to get to first to 100 wins now you could do 10 ro 10 turns each and that'll be a different game but the thing with mathematical modelling like that complicates things and in fact playing against each other complicates things too because you already said i'm going to try and beat you now if i'd done well you take more risks that's how games work and they should work that's what makes them interesting but a modeling point of view you need to go way back so this is why i made the comment about playing on my own if you just consider i'm just going to play on my own which is a bit of a strange sad game to play lockdown appropriate perhaps you can then answer the question of how do i maximize my score and then you start applying that to the game situation so i think we should analyze these two options the but the other strategy option is to uh just play until you feel lucky so let's analyze a role strategy even though we think that maybe the score strategy is a healthier way a few things about dice uh there's an average score on dice that's helpful to know although it's slightly different because rolling a one doesn't get you anything if you roll a die in this game two things can happen that are critical one is you roll one and you're you're out for that turn or you score some points so let's split into those two um i'm gonna do a calculation that mathematicians call an expectation so what do you expect and there are two outcomes one is a one-sixth chance of rolling the one and we'll get zero points for the entire term now quick mental math for you what's the chance of you not getting that one five and six excellent so five six at the time will score some points and to cut a long story short i could do like one sixth of the time you get a two once at the time you get three we're just going to average it so actually if you ignore the one the average points you score if you score anything is four because the average of two three four five and six so five six at the time you're going to score four points on average in fact if i add these two together we've got the probability times the outcome plus the probability times the outcome this is what they call a classic expectation calculation this tells me what i would expect to score after one roll so and this bit is just zero right so on average i would expect to score five sixths of four or three point three so that's my expectation after one roll and i don't think it's too difficult to do a two roll strategy the chance that you're still in after two rolls you've got a roll not a one on the first roll and not a one on the second roll and on average if you're still in after two rolls well if you're still in you're gonna get four points from the first roll on average and four points on average from the second round it's actually eight but when we calculate it we're going to get something less than eight but i'm just ignoring the zeros if i'm out i've got nothing so the expectation for two rolls is this 5.5 recurring so two rolls is better than one roll and i think we could have predicted that can we generalize now i think i think we should jump straight in number five viewers are ready to generalize we're gonna go straight to n rolls instead of just doing three and four and working our way up so i think you can see how this works it's gonna be if you're still in after end rolls we need to be not rolling ones n times in a row so that's the chance of me still being in and on each turn i'm going to be scoring four points but i've got n of those terms so this is my formula for my expectation after enrolls uh and if you graph this you get a graph that's like this it's a nice non-trivial shape and it definitely has a peak and uh what did you pick three rolls well i have news for you the peak happens at five and six in fact the peak happens between the two now you you can't roll between but this graph like if i plotted it just as integers five and six give you the highest thing it's just over eight they expect now you can't roll five and a half times anyway if you analyze the role strategy it says the best expected score is five or six roles and that feels quite intuitive you were worrying right at the beginning about there's a one in six chance of getting that one and it seems to back up that slightly naive understanding of like maybe i should only roll six times five or six apparently on average gives you the same expected outcome so what should i do in a game five or six uh i think probably five because it's the same expectation for less risk and that's that's what this graph is not showing us is that six on average will get you the score the same but in practice it will quite often give you a higher score and also more often give you zero so they sort of balance out so i think five is maybe saner but it's still a problem with the role strategy because it's not taking into account like if you did really well on the first three roles you're more tempted to say i want to keep that safe and the royal strategy will never pick that very sensible thing up so i think even though we can analyze it and five or six turns out to be good advice if you're gonna follow it it's not great for how to play game because it's not taking into account that lucky streak when you roll three sixes and everybody does take it into account and the maths can take it into account we've just we've done a naive strategy but this is what modelling is like you do a simple pass through and then you think right let's go back around the modeling cycle upgrade it so let's go for a score strategy and i suggested maybe aiming for a score 10 might be good and i'm curious about your instincts about this is ten a good thing to aim for do another piece of paper yeah i do i think for the score strategy it it's surprisingly difficult to calculate the expectation if i aim for a score of ten i think we all know like sometimes i will get ten or a bit more than ten and sometimes i get zero so the average is going to be probably a bit less than 10. so intuitively we can guess that it's a bit less than 10 but if i aim for a score of 50 i'm very unlikely to get it so most of my turns are going to be zero but once in a while boom i get 50. so where does the average go then it's really not intuitive and it's really hard to calculate but what we can do is figure out what the best score to aim at is by considering individual scores not getting the expectation just getting if i'm on a score of 10 what will happen if i choose to roll again so let's try 10 as our example so aiming for 10 means if i get anywhere above 10 i will bank if i'm on a score of 10 let's ask what happens next so just like before one-sixth of the time you're gonna get zero five sixth of the time i'm gonna score some points and on average that's gonna be four points except i've already got ten so i think if i'm on a score of ten and i choose to roll again my expectation of the next role this is not saying what will i eventually get but if i'm on 10 on a roll again this is my expectation and it'd be four plus 10. so we could calculate this zero is obvious again i get 11.6 okay now what does that mean well 11.6 is higher than 10. for me that means if i want to score a 10 and i don't roll again i'm going to get 10. like that's obvious if i do roll again on average i'll get 11.6 so it sounds to me like i should roll again like it's higher so if i try another score let's try 30 if i'm on 30 the calculation is dead simple 5 6 of the time the zero i'm going to ignore i'm going to get 4 plus 30. so i can calculate that and already the instincts are kicking anything maybe i've been a bit greedy if i try and wait till i get 30 and indeed i get 28.3 and that is less than that so if i bank on 30 i've got 30. if i roll again on average i'll end up with 28. so my point is that somewhere these scores will equalize and i think at that point we've got an indication of a good target score to aim at but before we do the calculation i mean number five viewers are probably got their paper ready to go let's try a couple of simulations so i've got a jojoba simulator for greedy pig here it's actually simulating a strategy so up here i've got aim for 10. and let's i'm just going to click start and it will start aiming for 10 and banking if it ever gets it just repeatedly starting from zero rolls yes and so you can see some bars appearing so if i get 10 or more it gives me a bar and there's a couple turns i got zero and it's going to go off into the distance here um and the yellow line is what i'm scoring on average all the turns it's tried it and you can see it's it's a bit lower than 10. so there's the occasional zero roll but quite a lot of the time i'm getting 10 or more but the zeros drag that line down a bit and you can see on average i'm getting about seven and a half points um so this is the calculation i didn't do before this is the holy grail of like what is the expectation if i aim for 10 i will get about 7.98 and i know that that is accurate um although it's actually a little bit high and i need to do thousands of these rolls to get in to get properly and what i'd love to do is find a theoretical way of doing this more on that later because what this didn't take into account was that the probability that you even got to 10 in the first place exactly it's like if you're on 10 and you roll again then it's a good thing but hey how likely is it that you get to 10 and that's a difficult calculation but what we can do is test other strategies so let's stop and reset this if i aim for a really high one i'm actually going to go higher than our 30 like they're going to go up to 50. and i think we know it's probably a bad way to play the game so just take a moment what we're going to expect here once in a while we're going to see a bar that goes up to 50. like i have to change the scale it's going to go really high but when i say once in a while it's probably really rarely going to happen so i'm going to start it before it takes us ages most of the time we're going to get zero and what's also annoying in this is it takes ages to run a turn because it's basically rolling a dice lots of times to get up to 50. and i'm a bit nervous we're never gonna get a score we're we're already at nine to ten turns and i've not scored 50. oh there we go i've got 50. uh so that was like one in 10 chance of doing you see my average has is terrible it's like three per turn because only once if i scored loads of points and the rest time got zero let's see if you get another one there is oh yeah i mean this is we're just going to play this for the rest of the video is that okay i'm totally i'm obsessed there are two things here first of all the our instinct is backed up by the simulation the average is low even though you're being super optimistic it just doesn't work out in your favor i'll shout if we get another one don't worry um but i wanted to go quicker so i need to write a better piece of script i should do it in python probably rather than jojoba so we don't get the visuals clogging up and slowing the thing down and nobody would play like this but we already know that probably somewhere between aiming for 10 and aiming for 30 is a good score you've got two 50s early on and you haven't got any sense what are the chances i'm so gonna get a 50 in real life yeah if you film that i will i will yeah i'll be impressed let's just try one in between if we wanted to guess somewhere between so i'm going to stop it and we'll aim for i don't know something like 19 let's see if that works any better so i'm just going to set this going and if you aim for 19 like sometimes you're not going to get it but i've got a couple there and i'll draw and already my average is about five or six i've got three in a row there yeah that was nice um and you see that the average is is kind of bouncing around a lot you need a lot of data for this to smooth out it's quite surprising how long it takes to sort of regularize here so there's got to be a better way and we can go back to our calculations to find it i mean 19 feels about right the average is pretty good 7.8 7.4 maybe it was as good as 10 i have a feeling that when we're aiming for 10 we were getting a bit lucky um more tens than was expected because 10 isn't very high and maybe you should wait longer so we're going to solve the equation to find out the best and gainful back to the the actual mass the crucial thing is we want to find the score where if we roll again we've kind of reached the balance point it's not higher and it's not lower so i'm going to change the score we're on for n generalizing and we want to solve this expression that's my expected score if i roll again you can see how the the numbers have sort of changed and we want it to be bigger than the score among so this is a lovely sort of gcse uk 16 year old qualification inequality to solve so we're just going to go ahead and solve it and you can you can check my maths and correct me mess it up ready i'm going to multiply both sides by 6 and that's positive so we're okay with that that gives me 6n there i'm going to multiply out this bracket to get 20 plus 5 n greater than 6n take away 5 n from both sides 20 greater than n i'm going to swing this round that's my headline and the whole thing was that i was claiming this line this is describing when i should roll again when my expected score is bigger than what i'm currently on and that translates into you roll again if n is less than 20 which means that 20 is where you start getting too risky to risk rolling again and 20 is a good score to aim at and if we tried 20 on here i guarantee we'd get a pretty good average but it takes a long time so what i did um so i was playing right before you're playing pretty well the um aiming like you can see how this matches the role strategy five roles on an average score of four gives you a score of 20. so they kind of at least they agree with each other even though i think this is a better way to play because if you get 20 early bank it and if you get if you roll lots of twos stay in a bit longer because it's not worth like banking out too early so i think this is almost for the simple game you're not playing against someone else aim for 20 is a good piece of advice on playing pick i realize we can't translate this to past the ps yet because i don't know the prophecies of picks but we'll come back to that a couple of other things to show i've got a lot of data on this i've asked a lot of school kids to play this game and give me some data so i'll show you the graph of what they've aimed for a bunch of different target scores this data is from over a thousand students trying this game like when we're doing lockdown we we run this as an online session and everyone was like submitting their data on google forms i've got the graph and you can see different target scores along here and their average score and you can see that it's kind of backing us up here there's some surprises so aiming for a low score doesn't do well on average but it doesn't do disastrously thing is if you aim for a score two quite often you're gonna roll a six one and six at the time in fact and so you're gonna do a lot better than actually getting two but it doesn't like balance the risk and reward whereas aiming a bit higher gives a better average but over here it's just really messy and i think this is an artifact of data just not enough data so i hinted at earlier what we really want is not a thousand school kids we want millions of roles probably done by computer simulation so i challenged my innermouth parker and dusted off my python and wrote a simulation so i'm just going to show you the simulation of a million roles for each target score strategy and we'll see if it backs up our theoretical one this is a glimpse of my code i don't think i'm going to put it on github because it embarrasses me when people comment on my lack of comments in code but here's the video that it produced um this is after one turn i did i did do a million uh but just to stay like after one turn at each of these you can see that a score of 40 did right it's got over 40 points it fluked it most of the other high targets are zero so that is not there and i've got a little podium first second third and that's going to move as we go the first 20 turns go quite slow and then it will speed up so here's a million rolls of the game of pig and you see like even after five turns there's a whole region that's never scored anything and maybe that's because it's too risky but the 36 is doing inexplicably well let's carry on a bit more so now we're on let's get up to 20 tons and i think everything's pretty much off the mark by then but like it's such a mess there's no way i could pull out any sort of reliable data so i'm just going to let this go we'll go all the way up to a million it does go a bit quicker and i love how spiky the graph is and how it settles down after a thousand turns it's already better than the data we've got i don't know how reliable the students were at the data python is doing better although it's using pseudorandom numbers so gotta trust that already the shape is settling down and we can see that 20 is doing pretty well although it's not on the podium for some inexplicable reason aiming really high on average does okay it's just that most of the time you're getting nothing so it's really depressing 20 is now on the top of the leaderboard we've done 200 000 turns 21 and 22 doing well and close behind but the first observation is that it's not a lot better than aiming for 21. but at least the mass is being backed up by the simulation there's a weird artifact at the beginning these two first bars are level uh i'm not going to comment on why i think i do know why but people might want to have a think about that and after a million turns i think we're there now 20 did win in my simulation which i'm very relieved about closely followed by 19 and 21 uh in the other order in fact but all the others nearby did pretty well so in fact this is backing up if we actually aim for around 20 you're gonna do all right and maybe start to get a glimpse of how to play the game against a player better because if you know 20 is roughly where you want to be you then compensate with the other story like are they way ahead of you in which case risk a bit more are you way ahead maybe back off a bit now i did do the calculation for the actual expectation so this is experimentation if you want to calculate what you expect happen if you aim for 20 you need the probability of getting to 20 in lots of dice rolls and it's ridiculously complicated it's a partition problem how many ways can you add up numbers to get to and these are the numbers from two to six in fact uh and it this explodes really quickly um so so did you roll ten twos or did you roll four or five and you very quickly if you start counting just the ways of getting to six even it's quite big the number of ways of doing it so i ran a script on python to try and calculate some of this it got to 22 by running over a weekend and i couldn't get it to go any further now it's probably inefficient coding but the size of the problem made me chuckle because there's a much easier way just run a million simulations and like mathematicians being allowed to do what they call monte carlo simulation it just makes me smile is that there's an easier way just try the thing and computers help us do that so i did plot the expectation calculations so this these dots are the theoretical values now i'm really pleased that they match now that i got a 22 i claimed the the dots after 22 or 23 are a fiction from me i made up the curve that i think roughly followed it in fact i used the roll calculation to get an approximate curve of what's going on and i think they're a bit high based on the the actual simulation so that's the game of pig aim for 20. trouble is when you play against a real player your instincts changed right and you're already commenting i want to i want to catch up with you because when you're aiming for a target that's quite low like a hundred if there's some vagary that's advantaging you you're having a lucky day i need to adjust my strategy to try and catch you and if for example i'm on let's say 90 and you're on i don't know 40 like conceivably happen and it's your turn next what instincts would you have go big yeah like go big or go home because if you give me another turn i'm probably gonna win like the game is probably over for you but you have a chance you must take it so aiming for 20 would be stupid you'd end up on 60. bank and i win so you go for something crazy like could you get 60 points to steal the win and that's why the game gets exciting but mathematically analyzing that is hard because you've got three variables i think you've got the score you're on which we kind of talked about but then you've got the score the other person's on which does affect how you play and the target you're aiming but let's just say that's 100. so then what some mathematicians in america did is realize that you can analyze this it's todd neller and clifton presser and i dropped them an email to ask them about this game and they found a way to definitively answer the question of what's the best way to play the best way to play is to bear in mind the 20 and like that their opening line is like we all know the 20 is the best way to play and then they're like how do you take into account this is background the cycle how do you upgrade the model to take around the psychology of playing against a human how close to winning are they and this is a process called value iteration what they realize is that every position like your score versus their score versus uh what you're currently rolling has like a value which is basically how likely are you to win from that position but each of those values depends on which other positions you can get to and how valuable those positions are they're all interconnected they set up a vast system of equations and this process called value iteration is where you you pick a random value for all of those positions and you force them by running it through a calculation again to converge on what the values must be until it's close enough so you don't get precise answer but you get a converging iteration and they basically ended up with a three-dimensional graph of how to play the game and to cut long story short let me show you the graph this looks daunting right so but let's just talk about the i'll show you another viewing of it but there's there's your score along here and the opponent's score along here so it's always done from player one's point of view and the vertical axis is the turn total that you're currently on the one you have control over and the rest is in the bank uh here's another view of it from the other side um first of all there's this weird like the first thing you notice is playing and that's because if you're on a score of 90 there is no point in you rolling more than 10 because you finished the game if you want to go on 80 roll for 20. right so that is 100 minus x actually that that's sort of the line of that plane that's why there's that sort of starting obvious thing but then it's surprisingly bumpy and non-smooth and all over the place and there's some overhangs and that's just weird so let's look at one little cross section here so i'm going to pull out the cross section of when the opponent is on a score of 30. so imagine you're playing against me brady i'm on and 100 is a win 100 is a win and if you're on zero and i'm a 30 what would you do go big why because i need to make up lost ground and so you can see there's this line here the black line is indicating like what you should aim for and it's just a there's a dotted line at 20 which we know is like default behavior sensible but you should aim higher than 20. not a lot higher because you don't want to lose it all but aim a bit higher to catch up and the gray region in the background saying that that score is likely to happen if both players are playing optimally and then there's a region where it's white but there's still a black line it's all above 20. and if you're on a score of 30 and i'm on a score of 30 what would your instincts be stick to the normal strategy right and that's because the black line is bang on 20 at that point what's surprising is that in between when you start looking right like it starts to go up and down so sometimes you should be aiming higher than 20 because you're behind but if you are really far ahead i don't know if you're on a score of 60 i'm on 30 what would you do what this algorithm is saying is that you're far enough ahead that you can back off the risk so aim for below 20 in fact the line is about 18. uh what's strange is that as soon as you get uh to about 60 there's another overhang here which means that first of all i think the first line is crossed you should bank at about 16 you're far enough ahead don't take the risks cruise to the finish but if you didn't stop at 16 and you start getting a big score there comes a point when you're on 95 should you keep going the risk of losing it is outweighed by the fact you might win on the next roll so there's the overhang kicking in it's like actually if you keep going even though we told you to stop then it starts to make sense ah just go for it now if you're way ahead you can see it goes all the way down you can aim for like a as lower score as about 10 in this case if you're on about 75. after that you go about past 75 you're like just go for broke no you're too close to finish and i love that that all that psychology which we have an intuitive feel has been solved mathematically to back it up and fair play to todd and clifton who wrote the math to do that and have this lovely preaching of beautiful three-dimensional graphs which i just i just love this animation and what it also means is kind of the uh to bring this full circle is that they've done the analysis on the simple game they can do the analysis on the real game all that's missing is the probabilities of how these pigs roll i mean we could do it if they hadn't done it but a school in america had a school project at one point but the whole class i think they had a week off work they rolled these pigs thousands of times and recorded what positions they landed in and todd and clifton were like our work is done plug those numbers into our value iteration thing and they've got a 3d graph for how to play past the pigs so i'm not going to give the secrets away too much you can go and read their paper i think it's a nice bit of digging but there's an optimal there's sort of the basic thing to aim for based on the scoring here and taking into account how close to the finish you are how close to the finish your opponent is here's the graph of past the pigs it's slightly differently colored but i just really like it there's some other subtleties going on with two different layers here but first thing to notice is it's quite a similar looking graph to our game but it is at different values same axis though that that's uh player two score here player one score there and the vertical is your turn total and what they've done they're also on their website you can go and find this out follow the link to the paper they've also analyzed all the other variants there's loads of variants like maybe you lose on a six instead of on a one hey we can figure out strategy for that now uh all the variants of other sort of marketed games with different variations too i really like this it's like a triumph of mathematical modelling based on a game that we can all understand and we have some instinct about and there's like lots of iterations of how much better can we train our intuition with a bit of mathematics some of it's high school maths gives you a first glimpse some of it's more than high school maths but is is graspable and the paper's about it and uh todd and clifton have programmed especially with another colleague of this they're programmed an online pig player so you can go and play against the optimal pig player online and see if you can beat it well there's no chance i'll beat it brady your luck may change then again it may not this episode was supported by kiwico get one of these boxes of genius delivered to your doorstep and channel your inner engineer now i know these are mainly for a younger demographic but basically you can choose your box from the site as you can see here and everyone's catered for even me i always think i'm bit of a numpty when it comes to making stuff like this but seriously even i could handle it and i kind of felt a real sense of achievement putting it all together it's fun but it also pulls back the curtain on all sorts of science and tech art mathematics engineering all that good stuff now i'm being a little bit greedy doing it myself but i can see how a subscription to kiwico would go down very well with numerous members of my family could be a birthday present taken care of here and a special offer get fifty percent of your first month by going to kiwico dot com slash number five the url is there on the screen and also down in the description and there is my animation machine not bad not bad at all [Music] so you can look at a different version of the game instead of a d6 one is a d8 and instead of losing on a one you could say lose on anything else i'm gonna say you lose on a one or two
Info
Channel: Numberphile
Views: 743,056
Rating: undefined out of 5
Keywords: numberphile
Id: ULhRLGzoXQ0
Channel Id: undefined
Length: 33min 5sec (1985 seconds)
Published: Wed Apr 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.