You are currently browsing the tag archive for the ‘game theory’ tag.
Does it Pay to be Nice? Game Theory and Evolution
If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!
Game theory is an interesting branch of mathematics with links across a large number of disciplines – from politics to economics to biology and psychology. The most well known example is that of the Prisoner’s Dilemma. (Illustrated below). Two prisoners are taken into custody and held in separate rooms. During interrogation they are told that if they testify to everything (ie betray their partner) then they will go free and their partner will get 10 years. However, if they both testify they will both get 5 years, and if they both remain silent then they will both get 6 months in jail.
So, what is the optimum strategy for prisoner A? In this version he should testify – because whichever strategy his partner chooses this gives prisoner A the best possible outcome. Looking at it in reverse, if prisoner B testifies, then prisoner A would have been best testifying (gets 5 years rather than 10). If prisoner B remains silent, then prisoner A would have been best testifying (goes free rather than 6 months).
This brings in an interesting moral dilemma – ie. even if the prisoner and his partner are innocent they are is placed in a situation where it is in his best interest to testify against their partner – thus increasing the likelihood of an innocent man being sent to jail. This situation represents a form of plea bargaining – which is more common in America than Europe.
Part of the dilemma arises because if both men know that the optimum strategy is to testify, then they both end up with lengthy 5 year jail sentences. If only they can trust each other to be altruistic rather than selfish – and both remain silent, then they get away with only 6 months each. So does mathematics provide an amoral framework? i.e. in this case mathematically optimum strategies are not “nice,” but selfish.
Game theory became quite popular during the Cold War, as the matrix above represented the state of the nuclear stand-off. The threat of Mutually Assured Destruction (MAD) meant that neither the Americans or the Russians had any incentive to strike, because that would inevitably lead to a retaliatory strike – with catastrophic consequences. The above matrix uses negative infinity to represent the worst possible outcome, whilst both sides not striking leads to a positive pay off. Such a game has a very strong Nash Equilibrium – ie. there is no incentive to deviate from the non strike policy. Could the optimal maths strategy here be said to be responsible for saving the world?
Game theory can be extended to evolutionary biology – and is covered in Richard Dawkin’s The Selfish Gene in some detail. Basically whilst it is an optimum strategy to be selfish in a single round of the prisoner’s dilemma, any iterated games (ie repeated a number of times) actually tend towards a co-operative strategy. If someone is nasty to you on round one (ie by testifying) then you can punish them the next time. So with the threat of punishment, a mutually co-operative strategy is superior.
You can actually play the iterated Prisoner Dilemma game as an applet on the website Game Theory. Alternatively pairs within a class can play against each other.
An interesting extension is this applet, also on Game Theory, which models the evolution of 2 populations – residents and invaders. You can set different responses – and then see what happens to the respective populations. This is a good reflection of interactions in real life – where species can choose to live co-cooperatively, or to fight for the same resources.
The first stop for anyone interested in more information about Game Theory should be the Maths Illuminated website – which has an entire teacher unit on the subject – complete with different sections,a video and pdf documents. There’s also a great article on Plus Maths – Does it Pay to be Nice? all about this topic. There are a lot of different games which can be modeled using game theory – and many are listed here . These include the Stag Hunt, Hawk/ Dove and the Peace War game. Some of these have direct applicability to population dynamics, and to the geo-politics of war versus peace.
If you enjoyed this post you might also like:
Simulations -Traffic Jams and Asteroid Impacts
Langton’s Ant – Order out of Chaos
Essential Resources for IB Teachers
If you are a teacher then please also visit my new site. This has been designed specifically for teachers of mathematics at international schools. The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus. Some of the content includes:
- Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics. These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
- Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
- Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
- A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.
There is also a lot more. I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!
Essential Resources for both IB teachers and IB students
1) Exploration Guides and Paper 3 Resources
I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission. Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator! I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams. The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.
How to Win at Rock, Paper, Scissors
You might think that winning at rock, paper, scissors was purely a matter of chance – after all mathematically each outcome has the same probability. We can express the likelihood of winning in terms of a game theory grid:
It is clear that in theory you would expect to win, draw and lose with probability 1/3. However you can actually exploit human psychology to give yourself a significant edge at this game. Below is a report of a Chinese study on the psychology of game players:
Zhijian and co carried out their experiments with 360 students recruited from Zhejiang University and divided into 60 groups of six players. In each group, the players played 300 rounds of Rock-Paper-Scissors against each other with their actions carefully recorded.
As an incentive, the winners were paid in local currency in proportion to the number of their victories. To test how this incentive influenced the strategy, Zhijian and co varied the payout for different groups. If a loss is worth nothing and a tie worth 1, the winning payout varied from 1.1 to 100.
The results reveal a surprising pattern of behavior. On average, the players in all the groups chose each action about a third of the time, which is exactly as expected if their choices were random.
But a closer inspection of their behavior reveals something else. Zhijian and co say that players who win tend to stick with the same action while those who lose switch to the next action in a clockwise direction (where R → P → S is clockwise).
So, for example if person A chooses Rock and person B chooses Paper, then person B wins. Human nature therefore seems to mean that person B is more likely to stick to a winning strategy and choose Paper again, whilst person A is more likely to copy that previous winning behaviour and also choose Paper. A draw.
So you can exploit this by always moving anticlockwise i.e R → S → P. To look at our example again, person A chooses Rock and person B chooses Paper, then person B wins. This time person A follows his previous pattern and still chooses Paper, but person B exploits this new knowledge to choose Rock. Player B wins.
You can play against a Wolfram Alpha AI player here. This program will track your win percentage, and will also adapt its behavior to exploit any non-random behavior that you exhibit. Even though you may not be conscious of your biases, they probably will still be there – and the designers of this simulator are confident that the program will be beating you after about 50 games. Have a go!
There are some additional tips for winning at rock paper scissors – if you are in a single game competition then choose paper. This is because men are most likely to choose rock, and scissors are the least popular choice. Also you should try some reverse psychology and announce what you will throw. Most opponents will not believe you and modify their throw as a result.
Rock, Paper, Scissors, Lizard, Spock
You can of course make the game as complicated as you wish – the version above was popularised (though not invented by) The Big Bang Theory. The grid below shows the possible outcomes for this game:
And of course, why stop there? Below is a 15 throw version of the game
If you’ve honed your strategy then maybe you could compete in the a professional rock, paper, scissors tournament – here you can watch the final of a $50,000 Las Vegas competition.
If you liked this post you might also like:
Game Theory and Tic Tac Toe – Tic Tac Toe has already been solved using Game Theory – this topic also brings in an introduction to Group Theory.
Does it Pay to be Nice? Game Theory and Evolution. How understanding mathematics helps us understand human behaviour.
Does it Pay to be Nice? Game Theory and Evolution
Game theory is an interesting branch of mathematics with links across a large number of disciplines – from politics to economics to biology and psychology. The most well known example is that of the Prisoner’s Dilemma. (Illustrated below). Two prisoners are taken into custody and held in separate rooms. During interrogation they are told that if they testify to everything (ie betray their partner) then they will go free and their partner will get 10 years. However, if they both testify they will both get 5 years, and if they both remain silent then they will both get 6 months in jail.
So, what is the optimum strategy for prisoner A? In this version he should testify – because whichever strategy his partner chooses this gives prisoner A the best possible outcome. Looking at it in reverse, if prisoner B testifies, then prisoner A would have been best testifying (gets 5 years rather than 10). If prisoner B remains silent, then prisoner A would have been best testifying (goes free rather than 6 months).
This brings in an interesting moral dilemma – ie. even if the prisoner and his partner are innocent they are is placed in a situation where it is in his best interest to testify against their partner – thus increasing the likelihood of an innocent man being sent to jail. This situation represents a form of plea bargaining – which is more common in America than Europe.
Part of the dilemma arises because if both men know that the optimum strategy is to testify, then they both end up with lengthy 5 year jail sentences. If only they can trust each other to be altruistic rather than selfish – and both remain silent, then they get away with only 6 months each. So does mathematics provide an amoral framework? i.e. in this case mathematically optimum strategies are not “nice,” but selfish.
Game theory became quite popular during the Cold War, as the matrix above represented the state of the nuclear stand-off. The threat of Mutually Assured Destruction (MAD) meant that neither the Americans or the Russians had any incentive to strike, because that would inevitably lead to a retaliatory strike – with catastrophic consequences. The above matrix uses negative infinity to represent the worst possible outcome, whilst both sides not striking leads to a positive pay off. Such a game has a very strong Nash Equilibrium – ie. there is no incentive to deviate from the non strike policy. Could the optimal maths strategy here be said to be responsible for saving the world?
Game theory can be extended to evolutionary biology – and is covered in Richard Dawkin’s The Selfish Gene in some detail. Basically whilst it is an optimum strategy to be selfish in a single round of the prisoner’s dilemma, any iterated games (ie repeated a number of times) actually tend towards a co-operative strategy. If someone is nasty to you on round one (ie by testifying) then you can punish them the next time. So with the threat of punishment, a mutually co-operative strategy is superior.
You can actually play the iterated Prisoner Dilemma game as an applet on the website Game Theory. Alternatively pairs within a class can play against each other.
An interesting extension is this applet, also on Game Theory, which models the evolution of 2 populations – residents and invaders. You can set different responses – and then see what happens to the respective populations. This is a good reflection of interactions in real life – where species can choose to live co-cooperatively, or to fight for the same resources.
The first stop for anyone interested in more information about Game Theory should be the Maths Illuminated website – which has an entire teacher unit on the subject – complete with different sections,a video and pdf documents. There’s also a great article on Plus Maths – Does it Pay to be Nice? all about this topic. There are a lot of different games which can be modeled using game theory – and many are listed here . These include the Stag Hunt, Hawk/ Dove and the Peace War game. Some of these have direct applicability to population dynamics, and to the geo-politics of war versus peace.
If you enjoyed this post you might also like:
Simulations -Traffic Jams and Asteroid Impacts
Langton’s Ant – Order out of Chaos
Essential resources for IB students:
1) Exploration Guides and Paper 3 Resources
I’ve put together four comprehensive pdf guides to help students prepare for their exploration coursework and Paper 3 investigations. The exploration guides talk through the marking criteria, common student mistakes, excellent ideas for explorations, technology advice, modeling methods and a variety of statistical techniques with detailed explanations. I’ve also made 17 full investigation questions which are also excellent starting points for explorations. The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.