Etc. (Mathematica)

Until around 2015, most of my research with simulations was done using Mathematica. Here are some notebooks, add-on packages, and other resources which I have either written or contributed to which you might find useful.

Add-on packages

The LocalInteractions package for Mathematica. A great many of the simulations performed in my book, The Structural Evolution of Morality were done with this software. It provides a number of functions for creating local interaction models. The models run quickly because the simulations are done in Java, with J/Link used to communicate between Mathematica and the simulation.

PrSAT: A Decision Procedure for the Probability Calculus. (by Branden Fitelson — I just helped out with generalising the code to handle N variables.) This package defines a function to check whether an arbitrary set of statements in the probability calculus is satisfiable.

Single notebooks

  • A way of using Mathematica's dynamic capabilities to provide endnotes. (This version of the code was extended and polished by Mike Honeychurch.)
simplex-sm The interactive replicator dynamics. This notebook uses Mathematica’s dynamic capabilities to display the evolutionary trajectories for the three-strategy continuous replicator dynamics. When you click on a point in the interior of the simplex, it determines the initial conditions selected, solves the differential equations, and then plots the evolutionary path. world-map-sm An interactive map. This shows how to use Mathematica’s dynamic capabilities to create a map that displays the name of a country when you move the mouse over it. Useless, yes, but cute. life-sm The game of life. This shows how to combine Java with Mathematica. The simulation of the game of life is done purely in Java, but the display and control of the program is done in Mathematica. A 500×500 grid (which is shown) actually runs very fast!

squiggle