So, we talked about how animals including humans can evolve to be kind, to be altruistic towards genetic relatives and the influence that this has on our psychologies. But our kindness and altruism isn't limited to those we share genes with. We're also kind to non-kin. So, looking at non-humans, we see animals groom themselves, they give warning cries, they share in the task of child care, they share food, and so on. Certainly, in both everyday life and in the hunter-gatherer life of our past, we're kind to one another, we form groups, we help one another. In your everyday life, you're probably connected to people, to friends, to romantic partners who you don't share genes with and yet you have a mutual inclined relationship with. You're actually also probably to some regards kind to strangers and how that comes about is a different story, but we're going to stick to friends. So, one way of thinking about the relationships between friends is in terms of what the biologist Robert Trivers has called reciprocal altruism. There's a principle where we're more likely to help those who help us. If you scratch my back, I scratch yours and there's mutual benefit. Suppose we need to drag in something, maybe a carcass, from one place to another and we both benefit from having it moved, but neither one of us is individually strong enough to move it. If we work together, we both benefit. Or, to take a more difficult case, suppose whenever I get a surplus of food, I give you some and whenever you get a surplus of food more than you can eat, you give me some, we both benefit from this. But there's a problem. The problem is, the problem of cheating. What if I helped you on Tuesday and you don't help me back on Wednesday? We're actually back to the free rider problem. In an animal context, imagine the case of warning criers. So, some animals, if one of them in a group sees some predator approaching, will give off a loud cry to warn everybody else and that benefit of the group. Overall, everybody is best off if the creatures in that group give warning cries. But, you know who would really be best off? Somebody who took advantage of the warning cries, who will listen to them and responded, but actually didn't give them themselves. Imagine a gene that led animals to both give warning cries and respond to warning cries and a second gene that led an animal to respond to warning cries, but not give warning cries, the selfish free rider gene would outproduce the more generous gene. It would have all of the benefits and none of the costs and pretty soon, the whole group would be worst off. So again, we see a similar case where the reciprocal altruism appears to be untenable. There is however a solution. Reciprocal altruism can evolve if animals can punish cheaters, can punish free riders. Punishment can be actually whacking them in the head or causing them pain or killing them, but it could also be shunning them. In a situation where animals need to interact with other animals to survive, shunning is a powerful punishment. So the claim is, that you find this kindness among non-kin, among non-related individuals. If the animals have evolved a corresponding mechanism for punishment, which requires a lot of psychological apparatus, a lot of cognitive machinery, these animals have to recognize cheaters, they have to remember who they are and hold this memory across time, and had to be motivated to punish. One very general way to see the situation and to see how the situation can be solved is what's known as a prisoner's dilemma. So, here's the logic of the prisoner's dilemma. It's incredibly cool, but we need to walk through it. So, imagine you and a friend commit a crime and you're arrested. You and your friend are put into separate rooms, you are prisoners, and a police officer comes up to each one of you separately and he says, "Look, you have two options. You can cooperate with your friend, which means you say nothing, you don't squeal on your friend, you don't blame your friend or you can defect," and the police officer says, "Do you defect?" You say, "Yes, we did it and it was all his fault." So, if you cooperate with your friend and your friend cooperates with you, you both get a fairly mild sentence. You get one year in prison. They can't pin the whole crime on you, but they have some other evidence and so on. If however, you squeal on your friend and your friend keeps his mouth shut, you go free. You just walk away. If you cooperate with your friend and he squeals on you, you're in big trouble man. Your friend will walk away and you will spend the rest of your life in prison. If you both squeal on each other, you'll each get a very long prison sentence. So, the police officer says, "So, look at this and be aware that your friend is looking at the same sheet and making the same choices." Well, of course, in real life they don't actually explain to you prisoner's dilemma. This actually is not so different from what actually happens when people are arrested for crimes, often for serious crime. They really will be put in a separate room and be told, "Look, give up on your friend and you'll get a lesser sentence," and they'll say, "I tell you, your friend is getting the same offer. Whichever one acts first wins." It's a matter of trust, really. If you trust your friend and you know he won't defect on you, and he trust you and know you won't defect on him, you both cooperate. But he says, the cop says, "I want you to observe something really interesting about your options. Suppose he cooperates with you, what's the best option for you? What will turn out best for you?" Well, if he cooperates, that's the top two squares, your best thing for yourself is to defect. That's the upper right corner, then you walk away. Suppose he defects on you, well, what's your best option? Your best option again is to defect. You will get 20 years in prison, but it's just better than life in prison. So, when faced with this option, you say, "Fine, I defect and I want to squeal on my partner." He gets the same option and then he squeals on you. So, this is a weird and unhappy outcome. Here's a way to phrase the prisoner's dilemma more abstractly. The best case is to defect while the other person cooperates. The worst case is to cooperate when another person defects. The best over all is if each cooperate and the worst over all is if both defect. The puzzle is, as a police officer has reminded you, regardless of what your opponent does, it would be better off defecting, but if both people defect, both are worse off. Now, once you start hearing about a prisoner's dilemma, you see it everywhere. Imagine my wife and I decide to divorce. We each struggle separately with the option of getting an expensive and carnivorous divorce lawyer. So, plainly I think and she thinks, if we don't, if we just go to mediation, we'll split our money, we'll both do okay. But then something occurs to me. If I choose yes to getting a carnivorous and expensive divorce lawyer and she chooses no, I'll get everything. She'll lose everything, very tempting. Also I worry, if she gets a lawyer and I don't, I lose everything and she gets everything. Faced with the logic, it seems inevitable that we both get expensive lawyers, we have a lengthy court battle and we don't both do pretty badly. You have two countries and they're deciding whether or not to build up their weapons and their military, which are very expensive. They both decide, no, and they say, "Ah, it's okay, not bad." But then, it occurs to them that if one country chooses yes and the other one chooses no, the one who chooses yes really gets everything, they could invade the other country and the one who chooses no is in a very bad situation. So, faced with this logic, they both choose yes and then they both do pretty badly. Prisoner's dilemmas are everywhere. Now, there may be no solution to the one-shot prisoner's dilemma. Where you deal with another individual who's a stranger, you just interact once and you make your choice. But now imagine that you get to play the prisoner's dilemma game over and over and over again with a certain individual, what's the best strategy? What's the best strategy for the maximum payoff? You could even think about this for a moment. Would you always defect? Would you always cooperate? Would you be random? What would you do? Many years ago, the scholar Robert Axelrod put together a competition. The competition involved people participating by bringing computer programs, establish different strategies for solving the prisoner's dilemma and the idea is that each of the programs would play multiple games. What's really cool is that the winning program was extremely simple. It was actually four lines of computer code. It was the simplest program that they had. It worked on a principle that was developed by Anatol Rapoport. It worked on a principle called tit for tat. It just had two very simple rules. The first is, the first time you meet a new program, cooperate. The second is, after that, do on each trial what the other program did on the previous trial. You see, this has a genius to it. It's nice, it starts friendly, it's not a sucker. If it starts friendly and you defect on it, it will then defect back, but it's forgiving. Once you're nice, it's going to be nice right back. It basically rewards niceness with niceness and meanness with meanness, and it's transparent. The logic of it's clear enough that it's easy to figure out how to work together for mutual gain. If I'm going to play with a tit for tat machine for a long series of games, I will just cooperate all the time because I know my cooperation will be rewarded with cooperation. What's really cool is, evolutionary psychologists have pointed out that our social emotions, how we heel for other people, seem to be calibrated to different aspects of the prisoner's dilemma. So, we feel gratitude and liking for people who cooperate with us, which motivates us to be nice to them in the future, we feel anger and distrust to those who betray us, which motivates us to betray or avoid them in the future, and we feel guilt when we betray someone who cooperates with us. This motivates us to behave better in the future. Here it is lined up in terms of the different parameters of the prisoner's dilemma options, which is, I think a beautifully elegant way of how evolutionary considerations and game theoretic considerations and evolution of cooperation can actually provide some really interesting insight into the nature of our emotions and the nature of our psychology more generally.