Thursday, February 1, 2018

Basics of Equation Based Population Simulations

The other day I did a fairly informal workshop / sharing session on equation based gene-culture models.  This was mainly for high school social studies teachers and biology teachers who wanted some exposure to one side of quantitative genetic/cultural evolution techniques.  It was quite fun, and I was really surprised at the turnout.  I had expected 0 or 1 and ended up with a fairly large crowd compared to average session sizes.

A twitter acquaintance asked for some basic resources on the topic, so, with a bit of filler background,  and no formal digging for standard texts on the topic....

There are a couple of different ways to do population simulations.  One way is agent /actor based simulations.  Think "Sim City".  The original was, of course, The Game of Life.  I remember playing that back on our apple II+ as a kid. NetLogo is a modern tool. Sometimes the Santa Fe institute or @ComplexExplorer have MOOC's on the topic. I hear Coursera has some basics too.

The basic idea is to code a cell with some "properties" or rules for how it will interact with neighbours. This gave rise to Schelling's classic 1971 simulation of housing segregation. There's a nice looking explanation and front end controlled simulation here.  You can find raw data files here.

Another approach is to use equations to simulation macro-variables. In practice, this usually means playing around with recursively formatted excel spreadsheets and then doing some simple calculus.  This lets you show where the equilibriums are, and, presumably keeps the "riffraff" from publishing work in this area without sufficient mathematical background to have "trust-worthy-enough" insights. Plus, it just makes the stuff look smart enough to warrant journal space...

The equation based approach doesn't let you get too complicated. But, for better and worse, you tend to stay on top of what is happening.

For population stuff, I would probably start with a fairly simple equation based approach.  Here is my excel sheet based on how D.S. Wilson explains the averaging fallacy in gene's eye vs. multi-level selection.

The basic idea is to set up a group where altruists contribute to everyone's benefit at their own expense. Does altruism grow or decay? What fitness costs are needed for populations to grow without bound, to peak then decline, and to crash from the get-go.  Wilson's point was to show how altruists can decrease in frequency in two groups yet be increasing in overall frequency in the population as a whole.  In economics this is known as Simpson's paradox.

This is where I started my session - forcing people to try and enter in some formulas into a spreadsheet, before I had to bail them all out with an already completed example (I guess people aren't as familiar with excel as I had thought....).

In my session this led to some discussion.
  • How the simulation gets us looking for hard evidence about balance points.  What is the real "cost" range of altruism?  What is the real "benefit" to a group of altruist's contributions?
  • Do we just need altruists at the start of a group, or do we need them all the time?
  • Do you need migration to sustain self-selectable altruistic (sub-)groups? What level of migration is needed? (i.e. Takano, 2015, Nowak 2004)
Naturally this leads into questions about how altruism levels stabilize or increase in populations.  I related this to the idea of polity size evolution.  Basically Gobekli 10kya in Turkey gives us our first nice data point about polity evolution in relation to religion and chiefdom sized civil society. Religion played an important role.  

We used this as a jumping point to discuss in-group out-group competition. What is necessary to get groups co-operating rather than competing? You can have trade. You can also have momentary parties where people suspend the application of some of their morals onto other groups.  "Relax, lets drink and not worry they didn't do the prayer right...". Will you eventually need rules to figure out what to do when Fred gets drunk and hits Alfonse from another tribe?  Maybe a religious festival has certain rules that aren't quite the same as what we would normally do at home when a foreign trader did the same thing?

At this point you probably need an intro primer on Multil-Level Selection.  Wilson's New Scientist article is good.  The evolution institute also has lots of resources.  Don't buy into the geneticist's hype about how bad MLS is. The discussion is mainly technical ontology about whether evanescent human groups are stable enough to be considered biologically real, and what approach is most parsimonious.  Okasha has the best book mediating the battle.

At this point you probably want to see some concrete work on models.  Richerson, Cordes, Boyd have a tonne of articles you can find.  

The Naturalistic Approach to the Theory of the Firm is the start of a short series of related articles that provides a good starting point.  Here is my messy excel sheet recreating their work.  Play around with leader (entrepreneur) reach and some of the other variables.  
  • Can you get a steady state population without a collapse? 
  • What conditions are need for unbounded growth?
  • Where is the transition where leader effects are taken over by peer effects?
  • How does this relate to ideas about altruism we've just looked at?
  • What happens if you combine two groups together at different points in their growth curves?
  • Does adding levels of hierarchy to increase leader bias reach make much of a difference?
From this field, one of the big conclusions is that large group sizes are only enabled by loosening moral norms. You need to allow corruption and freeloading.  You get a bigger group with strengthens your position with between-group competition.  But, the dynamics which enable this, pretty much guarantee your society will implode.  This is why you get the idea that there are long periods of back-and forth between polity sizes before the conditions necessary for an evolutionary transition (coordination, conflict minimization, extreme dependency) are expressed in enough of the population to enable a solution which increases stability at a larger group size.

If you start getting really advanced you will stumble upon Cavalli-Sfroza's groundbreaking book on Cultural Transmission.  Lots of people cite this book, but I doubt many have actually read all of it, and even fewer have reproduced many of the equation based simulations they outline.  I'm one of them. Recreating all their sheets is slow work.  For obvious reasons, the Boyd McElreath book is much more popular and much more accessible.

No comments:

Post a Comment