Co-operate or not? Fletch faces a Prisoner's dilemma in Porridge Copyrighted imageCredit: BBC

The Prisoner’s Dilemma is a classic example of games theory, an area of mathematics whose foundations were laid down by John Nash.

The Prisoner's Dilemma shows that, in certain circumstances, if the members of a group trust each other, they can choose a course of action that will bring them the best possible outcome for the group as a whole. But without trust each individual will aim for his or her best personal outcome - which can lead to the worst possible outcome for all.

In the Prisoner's Dilemma two players act as prisoners who have been jointly charged of a crime (which they did commit) but questioned separately. The police only have enough evidence to be sure of a conviction for a minor offence, but not enough for the more serious crime.

The prisoners made a pact that if they were caught they would not confess or turn witness on each other. If both prisoners hold true to their word they will only be convicted of the lesser offence. But the dilemma occurs when the police offer each prisoner a reduced prison term if they confess to the serious offence and give evidence against the other prisoner.

This sounds like a good deal, confess and you get the minimum possible term in jail - although your partner will get the maximum. But then you realise that if both you and your partner confess then both will be given the maximum term in prison. So the dilemma is whether you trust your partner to keep quiet - and if you do, should you 'stitch them up' to get out of jail quicker?

Would you keep to your word? Could you trust another to keep theirs? Find out by playing our interactive Prisoner's Dilemma.