The source code necessary for re-evolving the CDO blueprints reported in our paper can be found at: github.com/skriegman/reconfigurable_organisms
The instructions for actually building an organism from a CDO blueprint are also entirely open-source in the form of our PNAS paper and its supplementary materials.
The source code and build instructions are distributed under an Attribution-NonCommercial Creative Commons license.
We recommend starting with this Science Buddies tutorial for VoxCAD. The first step links to a Windows installation of VoxCAD. If you do not have Windows, you can instead download a GUI for Mac and Linux, and then continue with step 2 of the procedure.
We recently developed new software to simulate xenobots which is much more powerful.
The software has two parts:
viz: draw and visualize simulated xenobots.
sim: gpu-accelerated simulation.
You can manually design xenobots by drawing them in our graphical user interface
voxcraft-viz,
which was originally forked from voxcad.
On Win10, you can download the software
here.
On linux you can install with snap
sudo snap install voxcraft-vizOn macOS follow these steps to install viz (you'll need Homebrew):
brew install cmake
brew install boost
brew install qt5
brew install glfw3
brew install xquartz
brew install freeglut
brew install mesaThis will take a while...
git clone https://github.com/voxcraft/voxcraft-viz.git
cd voxcraft-viz/
mkdir build
cd build/
cmake -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 -DCMAKE_BUILD_TYPE=Release ..
make -j 10Copy the executable voxcraft-viz somewhere in your $PATH, for example /usr/local/bin.
cp voxcraft-viz /usr/local/bin
Done!
Type voxcraft-viz into your terminal to launch the viz.
You can draw a custom robot in voxcraft-viz using your mouse and then press play to watch its behavior.
<iframe width="100%" height="400" src="https://www.youtube.com/embed/jvxQjlrLgQo" frameborder="0" allowfullscreen></iframe>voxcraft-viz can also be used to replay the behavior of robots that have already been simulated elsewhere: their history.
You can download one of these prerecorded history files
and replay it in voxcraft-viz:
<iframe width="100%" height="400" src="https://www.youtube.com/embed/ytQ7dj3yE8M" frameborder="0" allowfullscreen></iframe>voxcraft-sim simulates voxels in parallel on a gpu.
The simulations are headless (without graphics)
but a history file can be recorded that traces the behavior of each voxel within a simulation.
This history can then be replayed in either voxcraft-viz or Unity.
Create a new notebook and go to Menu->Runtime->Change runtime type, select GPU.
Then, copy and run the script from this (readonly) example
notebook.
It will produce a.history which can be played in voxcraft-viz to visualize the simulated behavior.
History files can also be rendered in the Unity game engine.
<iframe width="100%" height="400" src="https://www.youtube.com/embed/z0f-I2rZGDU" frameborder="0" allowfullscreen></iframe>You can download this Unity demo project here.
If you have access to Nvidia graphic cards you can compile voxcraft-sim from scratch.
The most difficult part is installing
CUDA 10.1.
Once you have CUDA 10.1, the rest is easy:
sudo apt-get update
sudo apt-get install -y git cmake libboost-all-dev
git clone https://github.com/voxcraft/voxcraft-sim.git
cd voxcraft-sim
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCUDA_DEBUG=OFF ..
make -j 10Now you will have two executables: voxcraft-sim and vx3_node_worker.
Copy and paste them to a directory where you want to run the simulations.
Finally, try one of the demos:
./voxcraft-sim -i ../demos/basic/ > demo_basic.historyThis will produce a demo_basic.history file that can be visualized in voxcraft-viz.
If you use this code for academic purposes, please cite:
@MISC{liu_voxcraft_2020,
title = {Voxcraft-sim, a GPU-accelerated voxel-based physics engine},
howpublished = {\url{https://github.com/voxcraft/voxcraft-sim}},
author = {Sida Liu and David Matthews and Sam Kriegman and Josh Bongard},
year = {2020},
doi = {10.5281/zenodo.3835152},
}
Thanks!