Evolutionary Prisoner’s Dilemma sim

This is a small programming project I worked on in 2013-2014.  Although I wrote a blog series about it at the time, this is not a repost of that series.  Instead, this is a repost of the explanation I wrote earlier this year, when I uploaded the project to github.  If you liked this article, you might also enjoy this interactive game, although I had nothing to do with that one.

The Prisoner’s Dilemma is an important concept in game theory, which captures the problem of altruism. Each of the two players chooses to either cooperate or defect. Cooperating incurs a personal cost, but benefits the other player. If both players cooperate, then they are better off than if they had both defected. In a single Prisoner’s Dilemma, it seems that it’s best to defect. However, if there are multiple games played in succession, it’s possible for players to punish defectors in subsequent games. When multiple games are played in succession, it is called the Iterated Prisoner’s Dilemma (IPD).

The best approach to the IPD is highly nontrivial. In 2012, William Press and Freeman Dyson proved that there is a class of “zero-determinant” strategies that seem dominant, and which would lead to mostly defection. However, Christoph Adami and Arend Hintze showed that the zero-determinant strategies are not dominant in the context of evolution. Understanding this issue could elucidate why humans and other creatures appear to be altruistic.

How the simulation works

  1. We have a population of 40 individuals. Each individual has 4 parameters that govern how they play IPD.
  2. Each individual plays IPD against 2 other individuals in the population, and their fitness is calculated from their average score.
  3. One individual dies, and another reproduces. The probability of reproduction increases with fitness, and the probability of death decreases with fitness.
  4. All the parameters of the individuals are mutated by small amounts.
  5. Steps 2-4 are repeated a million times. Each repetition is called a “generation”.

[Read more…]

Sexual economics, a theory in need of reworking

This is a repost of an article I wrote in 2015.  It’s just some good old-fashioned making fun of pseudoscientific nonsense.

Recently, my attention was caught by the idea of the “sexual marketplace”.  Specifically, there’s a theory of sexual economics created by Baumeister and Vohs.  If you’d rather not read the paper, the Austin Institute* made a fancy video about it:

*Apparently, it’s a think tank run by Mark Regnerus.  Yes, that Mark Regnerus.

[Read more…]

An altruistic Prisoner’s Dilemma

This is a repost of an article I wrote in 2015, with a short postscript added.

Jeff Kaufman talks about an ethics trade that he sometimes does with a friend.

I have a friend who is vegan for animal welfare reasons: they don’t think animals should be raised for food or otherwise suffer for our benefit. On the other hand, they used to really enjoy eating cheese and miss it a lot now that they’re vegan. So we’ve started trading: sometimes I pass up meat I otherwise would have eaten, and in exchange they can have some cheese.

This is a win-win for the vegan, since they get to have some cheese, and there is no net harm to animal welfare.  It is not clear what’s in it for Jeff though, except for his idiosyncratic preference to have such trades.  I am not sure this is an interesting scenario by itself, since, in general, any trade is possible with sufficiently idiosyncratic preferences.

Therefore, I propose a similar scenario, which I’ll call the vegan/omnivore dilemma.

[Read more…]

Muddling the Dunning-Kruger Effect

The Dunning-Kruger Effect states that people with the lowest competence tend to overrate their competence, but people with the highest competence tend to underrate themselves. This was shown in 1999 paper by Dunning and Kruger.1 Here’s one of the figures from the paper:

A graph showing people's self-assessed ability, and actual test score. The bottom quartile gives themselves a rating in the 60 percentile, and the top quartile gives themselves a rating in the 75 percentile.

This figure shows results from a test on humor. People are scored based on how well their answers agree with those of professional comedians, and then they are asked to assess their own performance. There were similar results for tests on grammar and logic.

The Dunning-Kruger effect has entered popular wisdom, and is frequently brought up whenever people feel like they’re dealing with someone too stupid to know how stupid they are.  But does the research actually mean what people think it means?

Before reading into this subject, I must admit that I had a major misconception.  I thought that people’s self-assessment was actually anti-correlated with their competence.  I thought someone who knew nothing would actually be more confident than someone who knew a lot.  (This leads to an amusing dilemma: Should I choose to give myself a lower rating, because it would that increase posterior probability that I’m more competent?2)

But it is not true.  People who know nothing are less confident than people who know a lot.  People who know nothing are overconfident relative to their actual ability, but they are still not as confident as people who have high ability.

[Read more…]

Authorial intent is magic!

This is a repost of an article I wrote in 2015, although I changed the title.

The author is magic

Death of the Author” is a famous 1967 essay by Roland Barthes regarding the interpretation of literature.  He argues that the intentions and context of the author are irrelevant when interpreting the author’s work.  At most, the author provides a single interpretation, which must compete with all other interpretations.

Intent! It’s fucking magic!” is an influential 2010 essay by Kinsey Hope regarding the moral judgment actions.  There’s a common circumstance wherein a person tries to justify their mistakes by emphasizing their good intentions.  The essay snarkily observes that good intentions have the strange and magical power to erase all harms.  “Intention isn’t magic” has become a common saying among activists.

Though the two essays live in completely different contexts (literary criticism vs moral discourse), I would argue that the sentiments behind each are substantially similar.  Indeed, in the modern age, when we increasingly look at popular works of fiction through moral lenses, and when “actions” often consist of tweets or other comments, it is questionable whether they even live in different contexts.

[Read more…]

What is an apology?

This is a repost of an article I wrote in 2014.

There are countless cases in the news where a public figure does something wrong, and we all collectively ask, “Why don’t they just apologize?” or “Why don’t they apologize the right way?”  In the mean time I’ve often thought, “Why does anyone apologize ever?  What is an apology aside from a collection of emotions with no rational analogue?”

An apology is a sort of script.  Alice wrongs Bob.  Bob demands an apology from Alice.  Alice apologizes.  Bob forgives Alice.

OR

Alice refuses to apologize.  Bob is angered and seeks other means to punish Alice.  He could deny her trust, deny her social status, or even punish through legal means.

But what’s in it for Alice?  What’s in it for Bob?  As far as Alice is concerned, the outcome of apologizing is clearly better than that of refusing to apologize.  As far as Bob is concerned, punishment may provide either a psychological or game-theoretic value–why should any of that change just because Alice arranges some words in a particular way?

[Read more…]

Sleeping Beauty and Quantum Mechanics

This is a repost of an article I wrote in 2014.  Note that Sean Carroll also wrote about this, and he’s an author of the cited paper.

My newest favorite philosophical dilemma is the Sleeping Beauty problem.  The experiment goes as follows:

1. Sleeping Beauty is put to sleep.
2. We flip a coin.
3. If the coin is tails, then we wake Sleeping Beauty on Monday, and let her go.
4. If the coin is heads, then we wake Sleeping Beauty on Monday.  Then, we put her to sleep and cause her to lose all memory of waking up.  Then we wake her up on Tuesday, and let her go.
5. Now imagine Sleeping Beauty knows this whole setup, and has just been woken up.  What probability should she assign to the claim that the coin was tails?

There are two possible answers.  “Thirders” believe that Sleeping Beauty should assign a probability of 1/3 to tails.  “Halfers” believe that Sleeping Beauty has gained no new relevant information, and therefore should assign a probability of 1/2 to tails.  The thirder answer is most popular among philosophers.

This has deep implications for physics.

[Read more…]