https://github.com/chrxh/alien Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} chrxh / alien Public * Notifications You must be signed in to change notification settings * Fork 118 * Star 4k ALIEN is a CUDA-powered artificial life simulation program. alien-project.org License BSD-3-Clause license 4k stars 118 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 18 * Pull requests 1 * Discussions * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights chrxh/alien This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. develop BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 4,180 Commits .github/workflows .github/ workflows external external resources resources scripts scripts source source .gitattributes .gitattributes .gitignore .gitignore .gitmodules .gitmodules CMakeLists.txt CMakeLists.txt LICENSE LICENSE README.md README.md RELEASE-NOTES.md RELEASE-NOTES.md imgui.ini imgui.ini vcpkg.json vcpkg.json View all files Repository files navigation * README * BSD-3-Clause license ALIEN - Explore worlds of artificial life Preview 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 [?] Main features Physics and graphics engine * Particles for simulating soft and rigid body mechanics, fluids, heat dissipation, damage, adhesion etc. * Real-time user interactions with running simulations * Simulation runs entirely on GPU via CUDA * Rendering and post-processing via OpenGL using CUDA-OpenGL interoperability physics2.mp4 Artificial Life engine extensions * Multi-cellular organisms are simulated as particle networks * Genetic system and cell by cell construction of offspring * Neural networks for controlling higher-level functions (e.g. sensors and muscles) * Various colors may be used to customize cell types according to own specifications * Support for spatially varying simulation parameters alife3.mp4 Extensive editing tools * Graph editor for manipulating every particle and connection * Freehand and geometric drawing tools * Genetic editor for designing customized organisms * Mass-operations and (up/down) scaling functions Networking * Built-in simulation browser * Download and upload simulation files * Upvote simulations by giving stars But for what is this useful * A first attempt to answer: Feed your curiosity by watching evolution at work! As soon as self-replicating machines come into play and mutations are turned on, the simulation itself does everything. * Perhaps the most honest answer: Fun! It is almost like a game with a pretty fast and realistic physics engine. You can make hundreds of thousands of machines accelerate and destroy with the mouse cursor. It feels like playing god in your own universe with your own rules. Different render styles and a visual editor offer fascinating insights into the events. There are a lot of videos on the YouTube channel for illustration. * A more academic answer: A tool to tackle fundamental questions of how complexity or life-like structure may arise from simple components. How do entire ecosystems adapt to environmental changes and find a new equilibrium? How to find conditions that allow open-ended evolution? * A tool for generative art: Evolution is a creative force that leads to ever new forms and behaviors. Documentation 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: * Website * YouTube * Twitter * Reddit * Discord [?] Minimal system requirements An Nvidia graphics card with compute capability 6.0 or higher is needed. Please check https://en.wikipedia.org/wiki/CUDA# GPUs_supported. Installer Installer for Windows: alien-installer.msi (updated: 2024-08-17) In the case that the program crashes for an unknown reason, please refer to the troubleshooting section below. How to build the sources The build process is mostly automated using the cross-platform CMake build system and the vcpkg package manager, which is included as a Git submodule. Getting the sources To obtain the sources, please open a command prompt in a suitable directory (which should not contain whitespace characters) and enter the following command: git clone --recursive https://github.com/chrxh/alien.git Note: The --recursive parameter is necessary to check out the vcpkg submodule as well. Besides that, submodules are not normally updated by the standard git pull command. Instead, you need to write git pull --recurse-submodules. Build instructions Prerequisites: CUDA Toolkit 11.2+ and a toolchain for CMake (e.g. GCC 9.x+ or MSVC v142+). Build steps: mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . --config Release -j8 If everything goes well, the ALIEN executable can be found under the build directory in ./alien or .\Release\alien.exe depending on the used toolchain and platform. It is important to start ALIEN directly from the build folder, otherwise it will not find the resource folder. There are reported build issues with (updated: 2024-06-22) * GCC 13 (version 11 should work) * Visual Studio 17.10 (version 17.9 should work) * CUDA 12.5 (version 12.4 should work) [?][?] Command-line interface This 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 and the statistics (as a CSV file) as output. For example, .\cli.exe -i example.sim -o output.sim -t 1000 runs the simulation file example.sim for 1000 time steps. Troubleshooting Please make sure that: 1. You have an NVIDIA graphics card with compute capability 6.0 or higher (for example GeForce 10 series). 2. You have the latest NVIDIA graphics driver installed. 3. The name of the installation directory (including the parent directories) should not contain non-English characters. If this is not fulfilled, please re-install ALIEN to a suitable directory. Do not move the files manually. If you use Windows, make also sure that you install ALIEN with a Windows user that contains no non-English characters. If this is not the case, a new Windows user could be created to solve this problem. 4. ALIEN needs write access to its own directory. This should normally be the case. 5. If you have multiple graphics cards, please check that your primary monitor is connected to the CUDA-powered card. ALIEN uses the same graphics card for computation as well as rendering and chooses the one with the highest compute capability. 6. If you possess both integrated and dedicated graphics cards, please ensure that the alien-executable is configured to use your high-performance graphics card. On Windows you need to access the 'Graphics settings,' add 'alien.exe' to the list, click 'Options,' and choose 'High performance'. If these conditions are not met, ALIEN may crash unexpectedly. If the conditions are met and the error still occurs, please start ALIEN with the command line parameter -d, try to reproduce the error and then create a GitHub issue on https://github.com/chrxh/alien/issues where the log.txt is attached. Screenshots Different plant-like populations around a radiation source Screenshot1 Close-up of different types of organisms so that their cell networks can be seen Screenshot2 Different swarms attacking an ecosystem Screenshot3 Genome editor Screenshot3b Contributing to the project Contributions to the project are very welcome. The most convenient way is to communicate via GitHub Issues, Pull requests or the Discussion forum depending on the subject. For example, it could be * Providing new content (simulation or genome files) * Producing or sharing media files * Reporting of bugs, wanted features, questions or feedback via GitHub Issues or in the Discussion forum. * Pull requests for bug fixes, code cleanings, optimizations or minor tweaks. If you want to implement new features, refactorings or other major changes, please use the Discussion forum for consultation and coordination in advance. * Extensions or corrections to the alien-docs. It has its own repository. A short architectural overview of the source code can be found in the documentation. Credits and dependencies ALIEN has been initiated, mainly developed and maintained by Christian Heinemann. Thanks to all the others who contributed to this repository: * tlemo * mpersano * dguerizec * Will Allen * TheBarret The following external libraries are used: * CUDA Toolkit * Dear ImGui * ImPlot * ImFileDialog * boost * Glad * GLFW * glew * stb * cereal * zlib * zstr * OpenSSL * cpp-httplib * googletest * vcpkg * WinReg * CLI11 Free icons and icon font: * IconFontCppHeaders * Iconduck (Noto Emoji by Google, Apache License 2.0) * Iconfinder (Bogdan Rosu Creative, CC BY 4.0) * People icons created by Freepik - Flaticon (Flaticon license) License ALIEN is licensed under the BSD 3-Clause license. About ALIEN is a CUDA-powered artificial life simulation program. alien-project.org Topics cuda physics-engine artificial-life agent-based-simulation open-ended-evolution Resources Readme License BSD-3-Clause license Activity Stars 4k stars Watchers 52 watching Forks 118 forks Report repository Releases 17 v4.10 - Improved sensors for evolution simulations Latest Aug 17, 2024 + 16 releases Packages 0 No packages published Contributors 5 * * * * * Languages * C++ 69.9% * Cuda 26.6% * PHP 1.7% * C 0.9% * CMake 0.6% * Python 0.2% * GLSL 0.1% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.