Skip to content

Running Experiments

Paolo "Nusco" Perrotta edited this page Sep 12, 2015 · 14 revisions

The key to running experiments are the --fast and --save options.

--fast

narjillos --fast

This runs the program in Fast Mode: there are no graphics, and the calculations are executed in parallel (depending on how many cores your CPU has). It's quite fast, especially if you run it on multiple cores. So you don't have to wait many hours for evolution to do its job: you can get some interesting results in a few tens of minutes.

--save

narjillos --save

Saves the experiment to an .exp file ten minutes after starting it, and then updates the file every ten minutes after that. The name of the file is something like 774012997-0.5.0.exp, where 774012997 is the experiment's random seed and 0.5.0 is the version of Narjillos.

If you interrupt the experiment for any reason, you can pass the name of this file as an argument to narjillos and pick up the experiment from the last saved state. This allows you to run very long experiments.

This switch also saves historical data, such as the whole DNA ancestry tree and statistics on the number of narjillos, amount of food, and so on. The history is useful for lab analysis.

My workflow for long experiments

  1. I start an experiment and let it run for at least the first 10 minutes:

     narjillos --fast --save
    
  2. After a while, I kill the process and look for the .exp file that it left behind, named something like 774012997-0.5.0.exp.

  3. I load the file in normal (non-Fast) mode to get the graphics and see what is happening:

     narjillos 774012997-0.5.0
    
  4. If I decide to continue the experiment then I exit the program and pick up from when I started using Fast Mode:

     narjillos 774012997-0.3.0 --fast --save
    
  5. I go back to 2.

At some point I usually stop the experiment and analyze its historical and genetic data.

Run narjillos --help to see other command-line arguments.

Clone this wiki locally