The hawk and dove game II

08 July 2014

Today I’ll finish desribing my implementation of an agent-based model based on the hawk and dove game. I’ll cover the game-playing and death-and-birth mechanics and I’ll show how I animated the model’s evolution. This is a continuation of the previous post which gives more background on the simulation mechanics. The complete code for this simulation is available here.


The hawk and dove game

05 July 2014

I was recently thinking that it would be fun to implement an agent-based model (ABM) or cellular automaton (CA) in clojure, so I’ve written a version of the hawk and dove game. We can think of CAs as being defined by a handfulof mathematical functions which are iterated over the cells of a grid. This way of thinking about CAs maps very nicely to a functional programming style, which is where clojure comes in. Thanks to Ben for telling me about the model and suggesting that it would make for an interesting animation.


Taking email offline II

28 June 2014

In the last post I outlined the thought process that led to my current mail setup, and I have a high-level tour of the tools I’m using, including OfflineImap and mu. I wanted to write a follow-up post that gave more details about my configuration, since it was blog posts like this that helped me get started.


Taking email offline

26 June 2014

This week I’ve got a bee in my bonnet over online tracking and data mining. I want less of it. I’m not taking a hard line—I don’t plan to delete google and facebook entirely—I just want to take back some control of my data. For example, I installed the AdBlock and Disconnect plugins for Firefox to cut down on surreptitious tracking while I surf the web, and I switched my default search engine to DuckDuckGo. I also spent a lot of time thinking about how to replace gmail as my primary email address.


Ruby and invalid byte sequences

16 April 2013

I’ve started working on a website that will aggregate different arts calendars in the DC area. I’m writing it in ruby using the sinatra framework, and part of the project involves writing scripts that will scrape websites to create atom feeds. Yesterday I ran into a problem where a file I was generating in one script was causing an ‘invalid byte sequence’ error when I tried to read it into another script, and I decided to write up the solution in case some other ruby encodings neophyte gets bitten by the same bug.


Configuration Files in Lua and Scheme

24 March 2013

One of my jobs at the Census Bureau is to help maintain programs used for record linkage. These programs are written in C and Fortran, and they’re optimized to work on Census-sized data. They’re not, however, optimized for ease of use, and this is evident in the configuration files required to run the programs. I wanted to see how hard it would be to replace these configuration files with ones written in lua or scheme and designed to be human-friendly. Here’s how that went.