Topics › Society

Sugarscape with Canvas

Below is an implementation of the Sugarscape simulation I made using the HTML canvas. It shows a 50x50 grid with each square containing between 0 and 4 units of sugar represented with different intensities of green. There is an initial population of 200 agents (red circles) which move about and eat the sugar.

Sex in Sugarscape

Since the last time I wrote about Sugarscape, I've made a bit of progress. The biggest improvement is the introduction of sexual reproduction. I can therefore recapitulate more of the results of the original simulation, and test a number evolutionary ideas.

Sugarscape revisited

Screenshot of my Sugarscape simulation

I can't believe it's over a year since I last wrote about creating a Sugarscape simulation in Python and Pygame. The page attracted a fair number of views, but I suspect several visitors were looking for the teen magazine. However, at least some of the visitors were genuinely interested and a couple of weeks ago I was contacted by someone interested in recreating Sugarscape in Python.

Simulating tribal island economies

I’ve just started reading Gun, Germs and Steel by Jared Diamond, and was particularly interested by the description of how various Polynesian islands developed. As with pretty much everything these days, I wondered how I could simulate such a situation, perhaps making a game out of it (there must be a computer game that is based on this time and place – something like The Settlers).