Skip to content

A C++ implementation of Nils Aall Barricelli's computations worlds as described in his 1954 paper Esempi Numerici di Processi di Evoluzione

License

Notifications You must be signed in to change notification settings

tim-taylor/barricelli54

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

barricelli54

A C++ implementation of Nils Aall Barricelli's computational worlds as described in his 1954 paper Esempi Numerici di Processi di Evoluzione. The program regenerates each of the figures shown in the paper.

Compilation

The source code is a single C++ file barricelli.cpp that lives in the src directory. It should be compiled with a C++20 (or later) compiler.

For Linux users, the compile script in the base directory should compile the source code for you. The output is an executable file barricelli54 that lives in the base directory.

Use

Once compiled, the program can be run with the command:

barricelli54 [-c] n

where n is the figure number to be reproduced, and the -c flag, if present, specifies that output should be in CSV format. If the -c flag is omitted, the output is space-separated and padded so columns of digits are aligned.

Converting CSV files to images

To convert the CSV files generated by the barricelli54 program into PNG images that match the style of those presented in Barricelli's 1954 paper, the csv2img.py script is provided in the base directory.

This can be run as follows:

python3 csv2img.py [-b] my_csv_file.csv [label_specs...]

where my_csv_file.csv is a CSV file such as those generated by barricelli54. The -b flag, if present, specifies that grid lines should be included in the output. One or more label_specs can optionally be specified to print labels above and/or below the generated image at specified positions. See the csv2img.py file for details of usage.

The script produces a PNG file with the same basename as the specified CSV file (e.g. my_csv_file.png).

A Bash script gen-figs-with-labels is provided that generates Figures 8-11 with the labels as they appear in the 1954 paper.

About

A C++ implementation of Nils Aall Barricelli's computations worlds as described in his 1954 paper Esempi Numerici di Processi di Evoluzione

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published