Running "Tierra": Tom Ray's Artificial Life Simulation

This article provides a step-by-step guide to running Tom Ray's artificial life simulation, Tierra.

Introduction

Artificial life Tierra is a system where digital organisms reproduce in memory space using CPU time as energy. Developed in the 1990s by Thomas S. Ray, it remains a well-known model.

Now, it's time to run Tierra.

A video demonstrating Tierra's execution is available here:

Note: This article was translated from my original post.

Environment

This guide assumes a Linux (Ubuntu) environment.
The system used in this article is:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:    20.04
Codename:   focal

Step-By-Step Guide

The source code distributed on Tom Ray's homepage has several issues and does not run smoothly as-is.

The code used here has already been patched for Linux compatibility.

github.com

If you want to see the original source code, check the v6.02-original branch.

Tierra execution can be divided into two main stages:

  1. Running Tierra itself
  2. Running the front-end (Beagle)

Let's go through them step by step.

※ Technically, there are two front-end options: basic and Beagle. However, only Beagle worked properly, so we'll use that.

Running Tierra

First, execute the following commands to run Tierra itself:

# Install required libraries
sudo apt install libncurses-dev libxt-dev libxaw7-dev x11-apps

# Clone the source code
git clone https://github.com/bioerrorlog/Tierra.git

# Build
cd Tierra/tierra
./configure
make clean
make

# Generate the gene bank (gb)
cd ./gb0
../arg c 0080.gen 0080aaa.tie
../arg x 0080.gen aaa
cp 0080.gen 0080gen.vir

# Run Tierra
cd ..
HOSTNAME=localhost ./tierra si0

If the terminal keeps executing processes like the example below, it was successful.

Terminal running Tierra

Explanation of Commands

# Install required libraries
sudo apt install libncurses-dev libxt-dev libxaw7-dev x11-apps

# Clone the source code
git clone https://github.com/bioerrorlog/Tierra.git

This part is the initial setup. It installs the necessary libraries and clones the Tierra source code.

# Build
cd Tierra/tierra
./configure
make clean
make

# Generate the gene bank (gb)
cd ./gb0
../arg c 0080.gen 0080aaa.tie
../arg x 0080.gen aaa
cp 0080.gen 0080gen.vir

This section generates the Tierra executable and configuration files.

The gene bank contains genome files that are initially seeded into the memory space (called the "soup") where Tierra operates. Here, the default 0080aaa genome is used.

# Run Tierra
cd ..
HOSTNAME=localhost ./tierra si0

This command launches Tierra.

The HOSTNAME environment variable is set because this version of Tierra supports Net mode (which allows it to run over the internet). Since we are running it locally, we set it to localhost.

The si0 argument passed to ./tierra is a configuration file for the soup. It defines various parameters, such as the mortality rate.

Running the Front-End (Beagle)

Once Tierra is running, the next step is to launch the front-end (Beagle).

Open a new terminal and run:

# Build Beagle Explorer
cd ../Bglclnt/
make -f Makefile.Bgl clean
make -f Makefile.Bgl

# Launch Beagle Explorer
HOSTNAME=localhost ./bgl-GUI_X11-Linux

This builds and runs the Beagle client. The HOSTNAME environment variable is set for the same reason as mentioned earlier.

If a window like the one below appears, it was successful:

Tierra front-end window

Exploring Tierra

Once both Tierra and the front-end are running, feel free to experiment!

Tierra is famous for its colorful display showing genome lengths of individual digital organisms. You can view this by navigating to Window > Overview in the Beagle interface.

Additionally, you can display soup statistics, inspect the genome of specific creatures, and more.

For details, check out my video:

Conclusion

This article summarized the steps to run artificial life Tierra.

Although Tierra is a well-known artificial life model, there are surprisingly few guides on actually running it.

After obtaining Tierra's source code, I encountered numerous bugs and had to fix them. I greatly benefited from earlier contributions while debugging.

I hope this guide helps others who want to try running Tierra.

[Related Posts]

en.bioerrorlog.work

References