This project encompasses converting mathematical formulas and calculations into code and heavily focuses on design. I’ll start off with a brief overview of the science behind the simulation itself.
Theory
Imagine a single skin cell on a zebra. How does the cell know whether it should be white or black? Simply puts, the cell takes into account the value of the surrounding cells. If it’s surrounded by several black cells, then more than likely it should be black, right? Over time the cell keep looking at the cells around it, and the system changes. Eventually, the system will reach a pattern where it doesn’t change anymore. When this happens, the system has converged. Overall this is the basic theory behind pattern formation, on which the Activation/Inhibition Cellular Automaton is based.
This project is designed to investigate how varying parameters in the mathematical equation affects the pattern formation. For example, there is a parameter that influences how many cells away actually influence the current cell’s decision to be white or black. A larger number means that cells farther away are considered, while a smaller number means the converse. By varying a total of six parameters in the experiment, one can see the effect that these parameters have on the system.

Purpose
The Xcode project, aica, is written to perform a few different tasks. First off, you can quickly run a set of sample experiments that will produce some interesting converged systems. By interesting, I mean that the images representing the patterns are visually intriguing, as well as mathematically. AICA also allows a user to quickly run one experiment with a set of parameters, or run a larger set of experiments with different parameters from file.
In designing this application for my Biologically Inspired Computation course, I needed quantitative measurements describing what is happening in the system. These measurements are calculated once the system has converged and are not very pretty equations, involving lots of summations, logarithms and probability. I’m not going to delve into the mechanics and descriptions of these calculations, even though that was part of my report.
Design
I needed this to perform the basic tasks outlined above. In addition, I also wanted to have better statistics, so for each set of parameters ran (an experiment), I might want to run this several times and take the average of the calculated values describing the system. I classified each of these as a “trial”. So, the application structure is beginning to look something like this:
- Controller code for interacting with the interface and managing the experiments to be ran
- An experiment, which will run several trials and average the results, creating an Excel file with data
- A trial, which runs until convergence, writing image files for each step in the simulation
Feel free to look through project. There are two PDF files accompanying, containing the original project description and theory behind the simulation as well as a more technical document providing hints for writing the summations and mathematical equations as C code. This also contains some specific Cocoa programming techniques of interest to newbies, including using a NSProgressIndicator, Objective-C properties, NSNotifications, sheet programming, using NSSavePanel and NSOpenPanel, as well as creating directories and files using NSFileManager.
Get Started Now
Overall, if you have any comments or questions about the project, I’d love to hear from you. Even if you aren’t specifically interested, you should download the Application itself and give it a quick test run. Universal build, Leopard only. I also included some more sample files for systematically varying the parameters as I used in my project and used to draw conclusions about the behavior.
AICA Simulator (Leopard Only)
Source Code and Project Files