ALIEN is a CUDA-powered artificial life simulation program.
ALIEN is a CUDA-powered artificial life simulation program.
Artificial LIfe ENvironment (ALIEN) is an artificial life simulation tool based on a specialized 2D particle engine in CUDA for soft bodies and fluids. Each simulated body consists of a network of particles that can be upgraded with higher-level functions, ranging from pure information processing capabilities to physical equipment (such as sensors, muscles, weapons, constructors, etc.) whose executions are orchestrated by neural networks. The bodies can be thought of as agents or digital organisms operating in a common environment. Their blueprints can be stored in genomes and passed on to offspring.
The simulation code is written entirely in CUDA and optimized for large-scale real-time simulations with millions of particles. The development is driven by the desire to better understand the conditions for (pre-)biotic evolution and the growing complexity of biological systems. An important goal is to make the simulator user-friendly through a modern user interface, visually appealing rendering and a playful approach.
Please join our Discord server as a place for discussions, new developments and feedback around ALIEN and artificial life in general.
Demo video: Emerging Ecosystems | Winner of the ALIFE 2024 Virtual Creatures Competition
| NVIDIA GPU (CUDA) | AMD GPU (HIP or SCALE) | |
|---|---|---|
| Windows | nightly build or build from sources | nightly build or build from sources |
| Linux | build from sources | build from sources |
| Cloud instance | Docker image, headless | not available |
NVIDIA: compute capability 7.5 or higher, i.e. GeForce RTX 20 series or newer (list of supported GPUs). AMD: RDNA2 or newer.
For running ALIEN on a rented cloud GPU, see Running in the cloud.
A documentation for the previous major version, which introduces the reader to the simulator with tutorial-like articles, can be found at alien-project.gitbook.io/docs. Please notice that many of the information therein are no longer up to date. The latest version includes a brief documentation and user guidance in the program itself via help windows and tooltips.
Further information and artwork:
If you use ALIEN in a scientific publication, please cite:
Heinemann, C.: Artificial Life Environment. Informatik-Spektrum 31, 55–61 (2008). https://doi.org/10.1007/s00287-007-0205-1
@article{Heinemann2008,
author = {Heinemann, Christian},
title = {Artificial Life Environment},
journal = {Informatik-Spektrum},
volume = {31},
number = {1},
pages = {55--61},
year = {2008},
doi = {10.1007/s00287-007-0205-1}
}Note that this paper describes the beginnings of what has become ALIEN. The current simulator differs substantially from the system presented there. You are therefore equally welcome to cite this repository instead of the paper or alongside it: https://github.com/chrxh/alien
If you adopt ideas or concepts from ALIEN without using the software itself, that is fine but please just mention ALIEN and link to this repository.
Download and unpack https://alien-project.org/files/alien-develop.zip, which is built every night from the develop branch. It contains two executables:
alien.exe for NVIDIA GPUsalien-amd.exe for AMD GPUs (RDNA2, RDNA3 and RDNA4)Start it directly from the unpacked folder, otherwise it will not find the resource folder. If the program crashes for an unknown reason, please refer to the troubleshooting section below.
For long runs without local hardware, a nightly image containing the headless command-line interface (see below) is published on Docker Hub as chrxh/alien:nightly. It holds cli and its resource folder. There is no GUI in the image.
On a rented GPU instance (for example vast.ai), enter chrxh/alien:nightly as the instance image and filter the offers for a GeForce RTX 20 to 50 series GPU. Upload your simulation file to the instance with scp, then connect via SSH and start it by hand:
cd /opt/alien
cli -i example.sim -o output.simLocally, with an NVIDIA GPU and the NVIDIA container toolkit installed:
docker run --rm --gpus all -v "$PWD":/data --entrypoint cli chrxh/alien:nightly -i /data/example.sim -o /data/output.sim -t 1000Windows and Linux are built the same way, using the cross-platform CMake build system, the Ninja build tool and the vcpkg package manager, which is included as a Git submodule.
Getting the sources
Open a command prompt in a suitable directory (which should not contain whitespace characters) and enter:
git clone --recursive https://github.com/chrxh/alien.gitThe --recursive parameter is necessary to check out the vcpkg submodule as well. Submodules are not updated by a plain git pull, so use git pull --recurse-submodules instead.
Prerequisites
sudo apt-get install ninja-build libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libgl1-mesa-dev libglu-devNVIDIA GPUs (CUDA)
On Windows, just run build-windows-ninja.bat from the repository root. It sets up the MSVC environment and locates Ninja and CMake from your Visual Studio installation automatically.
On Linux, or on Windows from a Developer Command Prompt, invoke the CMake preset directly:
cmake --preset ninja
cmake --build --preset ninja-releaseThe executable is written to build-ninja/Release/ (alien.exe on Windows, alien on Linux) and has to be started from there, otherwise it will not find the resource folder.
AMD GPUs (HIP)
The HIP path builds the same sources for AMD GPUs in place of CUDA. On Windows: build-windows-ninja.bat HIP, which writes to build-ninja-hip/Release/ and covers RDNA2, RDNA3 and RDNA4.
On Linux:
cmake --preset ninja-hip -DCMAKE_HIP_ARCHITECTURES=gfx1100 -DCMAKE_PREFIX_PATH=/opt/rocm
cmake --build --preset ninja-hip-releaseCMAKE_HIP_ARCHITECTURES selects the target architecture (gfx1100 for RDNA3, gfx90a for CDNA2 / MI200). If omitted, it is auto-detected from the GPUs of the host. CMAKE_PREFIX_PATH lets find_package(hip) locate the ROCm installation when CMake uses the vcpkg toolchain. Adjust it if ROCm is installed elsewhere.
AMD GPUs (SCALE)
Alternatively, the unchanged CUDA sources can be compiled for AMD GPUs with SCALE (Linux), whose nvcc is a drop-in replacement for the NVIDIA one:
cmake --preset ninja -DCMAKE_CUDA_COMPILER=/opt/scale/bin/nvcc -DCMAKE_CUDA_ARCHITECTURES=gfx1100
cmake --build --preset ninja-releaseThis repository also contains a CLI for ALIEN. It can be used to run simulations without using a GUI. This is useful for performance measurements as well as for automatic execution and evaluation of simulations for different parameters. The CLI takes the simulation file, along with its parameters and the number of time steps, as input. It then provides the resulting simulation file as output. For example,
.\cli.exe -i example.sim -o output.sim -t 1000runs the simulation file example.sim for 1000 time steps.
Please make sure that:
No open issues yet, or sync has not completed.