You are currently browsing the tag archive for the ‘game theory’ tag.

**Does it Pay to be Nice? Game Theory and Evolution**

Golden Balls, hosted by Jasper Carrot, is based on a version of the Prisoner’s Dilemma. For added interest, try and predict what the 2 contestants are going to do. Any psychological cues to pick up on?

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:

**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.

**IB Revision**

If you’re already thinking about your coursework then it’s probably also time to start planning some revision, either for the end of Year 12 school exams or Year 13 final exams. There’s a really great website that I would strongly recommend students use – you choose your subject (HL/SL/Studies if your exam is in 2020 or Applications/Analysis if your exam is in 2021), and then have the following resources:

The Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and each area then has a number of graded questions. What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial. Really useful!

The Practice Exams section takes you to ready made exams on each topic – again with worked solutions. This also has some harder exams for those students aiming for 6s and 7s and the Past IB Exams section takes you to full video worked solutions to every question on every past paper – and you can also get a prediction exam for the upcoming year.

I would really recommend everyone making use of this – there is a mixture of a lot of free content as well as premium content so have a look and see what you think.

**Does it Pay to be Nice? Game Theory and Evolution**

Golden Balls, hosted by Jasper Carrot, is based on a version of the Prisoner’s Dilemma. For added interest, try and predict what the 2 contestants are going to do. Any psychological cues to pick up on?

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

**IB Revision**

If you’re already thinking about your coursework then it’s probably also time to start planning some revision, either for the end of Year 12 school exams or Year 13 final exams. There’s a really great website that I would strongly recommend students use – you choose your subject (HL/SL/Studies if your exam is in 2020 or Applications/Analysis if your exam is in 2021), and then have the following resources:

The Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and each area then has a number of graded questions. What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial. Really useful!

The Practice Exams section takes you to ready made exams on each topic – again with worked solutions. This also has some harder exams for those students aiming for 6s and 7s and the Past IB Exams section takes you to full video worked solutions to every question on every past paper – and you can also get a prediction exam for the upcoming year.

I would really recommend everyone making use of this – there is a mixture of a lot of free content as well as premium content so have a look and see what you think.