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…]

On Asian student groups

Back in my college days, I participated in queer Asian student groups. When I’ve told people about this, many of them have had a kind of negative or suspicious reaction. Why is there a need for students to subdivide themselves out by race like that? One or two people have also compared it to the idea of having a student group for White people, which sounds problematic.

This is similar to reactions that people have to Pride parades, or Black history month. Where’s the straight pride parade, they ask? Where’s White history month? I’m assuming readers already understand why there isn’t a White history month, and I’m just listing out standard arguments as a reminder: Because Black people are an oppressed group, and White people are not. Because White people come from an incoherent collection of distinct backgrounds such as German, Italian, Polish, etc. Because every other month is already effectively White history month.

The funny thing is, the same arguments don’t quite work for these Asian student groups. My university had more Asian students than White students. While you could say that Asian Americans face some degree of marginalization and stereotyping, the fact of the matter is, that’s not the primary reason students came together, and not the primary thing students would talk about. And if you thought “White” was an incoherent collection of distinct backgrounds, I invite you to consider how much larger Asia is than Europe.

So why was it okay to have queer Asian student groups?

[Read more…]

A toy model of media economics

One thing I’m interested in is the theoretical economics of entertainment media. For instance, we know that people have a wide variety of tastes in movies, but movie producers aren’t necessarily interested in catering to everyone’s tastes, they’re just interested in maximizing profit. You can imagine situations where this would lead most movie producers to cater to the most popular tastes, and to ignore fringe tastes.

Economists would describe this system as a kind of monopolistic competition. The problem is, monopolistic competition is super complicated and dependent on details, and I for one don’t understand it. So in order to better understand monopolistic competition, I want to build a toy model–the very simplest model that vaguely resembles monopolistic competition. The goal is not to build a realistic model, it’s more of a conversation piece.

Disclaimer: I have no education in economics, I’m more of a game theory guy.

Movies, democracies, and food trucks

Monopolistic competition is a system where different firms produce goods that are differentiated from each other. To make the very simplest model, we’re going to imagine that goods are differentiated from each other along only a single axis. For example, suppose that each movie falls along a one-dimensional spectrum from “drama” to “comedy”. And where a movie falls along this spectrum is the only thing that could differentiate it from other movies. Some viewers prefer comedies, and some prefer dramas, and some prefer dramedies.

[Read more…]

Link Roundup: September 2018

Let me start this link roundup with a couple of plugs.  First, I was interviewed by Asexual Artists, an awesome website that has lots of interviews of ace artists.  Second, in case you missed it, I published a two-part article talking about the history of asexuality in early radical feminism.

In Soviet Union, Optimization Problem Solves You – This is an old essay explaining how we might create a planned economy using math, and all the reasons why it would be so difficult.  This post was brought to my attention by Larry, who has a reply.  Larry says that to the extent this problem is intractable for socialism, it is also intractable for capitalism.  The difference between the two isn’t necessarily how the economy is computed, it’s the goal that they’re trying to achieve.

It seems like the best way to approach the problem is to break the economy down into more manageable pieces–each of which could be centrally planned–and have just a few inputs/outputs being passed between the different pieces.  This is basically what capitalism does, with individual firms being centrally planned, and inputs/outputs being passed between firms in the form of prices.  But in principle there could be other solutions, perhaps solutions that are computationally similar, but different in execution.  For example, Russian economists came up with the idea of “shadow prices” which help calculate resource allocation, but which don’t involve money actually being passed around–I have no idea if this particular idea works, but it’s a thought.

I think of myself as a socialist who lacks imagination, so I mostly complain about the current system while advocating for a familiar market-based economy with lots of redistribution.  YMMV on whether that counts as socialism.

[Read more…]

Why TERFs are (sadly) feminists

I recently wrapped a little research project that involved reading about some early radical feminists from the 60s and 70s. I felt inspired by these people who were instrumental in putting reproductive rights and sexual violence on the map, expanding feminism beyond, e.g., taxes and employment.  But in the course of my research, I also discovered that some of them have endorsed TERF positions in recent times. This is all very disappointing, and any desire I had to admire these people fizzled out rather quickly.

And that reminded me of a little thing that bothers me, when people say that TERFs are not real feminists, or are pretending to be feminists.  I’ll grant that they are “bad” feminists.  But to say TERFs aren’t feminist is to sweep problems under the rug.

In general, I am wary of defining political identities in a way that restricts them only to “good” people. For example, if we define a “Christian” as someone who is morally righteous, compassionate and loving, then what happens when we find a Christian who isn’t? To say, “They weren’t a true Christian,” is to dodge all responsibility. Rather than addressing the fact that some Christians behave badly, it ignores it, denies the very possibility of a problem, and therefore denies the possibility of a solution.

To give another example, it is a common belief that all BDSM practice is a form of sexual abuse. In response, sometimes people define BDSM specifically in contrast to abuse–something that Coyote has written about. This definition goes too far, because it denies or minimizes the possibility of any abuse among kinky people. Declaring abusive doms to not be “true” doms makes it difficult to address abuse within kink communities.

[Read more…]

Origami: Arrow Illusion, v2

Announcement: I now have a flickr account for my origami photos!  Now the images are bigger, and you can find them all in one place.  There are also lots of photos that I haven’t (yet) posted on my blogs.

Image is of two origami arrows in front of a mirror. Both arrows point to the right, but in the reflection, one of the arrows points to the left.

Arrow Illusion, version 2. An original design.  My hand is in the photo to show that this is a real mirror.

Over a year ago, I designed an origami arrow that points in the opposite direction when looked at in a mirror.  I wanted to revisit the design, and make it easier to fold, because this is basically the most popular origami thing I have ever done.  Below, I show detailed diagrams, and a sneak peek behind the curtain. [Read more…]

Seeing Job from both sides

The interesting thing about the biblical story of Job is that it permits diametrically opposed interpretations. From an atheist point of view, it’s a terrible story about how terrible God is. From a Jewish or Christian point of view, they may have multiple ways of reading it, but they certainly wouldn’t see it as a terrible story about a terrible God.

But what I really want to talk about is A Serious Man, a 2009 black comedy by the Coen brothers.  A Serious Man is a retelling of Job, and just like Job it permits diametrically opposed interpretations.  But unlike the book of Job, people on both sides can enjoy A Serious Man.

The book of Job

The book of Job is about a man named Job who has had a very fortunate life.  Satan tells God that the only reason Job praises him, is because of Job’s good fortune and wealth. God accepts the challenge, and allows Satan to take away Job’s wealth, his children, and his health. But Job still remains faithful to God. Thus proceeds a TL;DR dialogue between Job and his friends, where they argue that Job must have sinned, and should repent. At the end, God speaks to Job, and he doesn’t need to explain himself, he laid the foundations of the earth! In the end, Job is blessed with twice as much wealth as he started with, and with new children.

The book of Job is a popular target among atheists, because it’s just so easy. God is obviously a jerkass, allowing Job to be punished for a petty bet. God’s defense is like an abusive parent saying “Who was it that brought you into this world?” And the happy ending seems to brush aside Job’s dead children. I have to strain to see this story from the other side, but we’re gonna try.

[Read more…]