This repository provides a physical simulation platform for studying automatic design of robots or virtual creatures. It is based largely on the paper, Evolution and learning in differentiable robots. By abstracting away the physical simulation and control optimization details, this codebase makes it possible to quickly iterate on algorithms for morphological design.
- Install Miniconda if you do not already have it.
- Create a new environment:
conda create --name alife-sim(you can replace "alife-sim" with another name as you like). - Activate the environment:
conda activate alife-sim. - Install Python:
conda install python=3.12 - Install Taichi:
pip install taichi==1.7.3 - Install other packages:
pip install tqdm scipy pyaml flask ipykernel matplotlib
- Review the code in
run.py. It shows an example of how to interface with the simulator. - Next review
config.yaml. This includes a number of parameters, only a small number of which you should consider modifying. - Review
robot.py. This code illustrates how random robot designs can be sampled and explains the key constraints to keep in mind when representing robots for the simulator. You can also visualize designs invisualize_robots.ipynb. - Finally, try to run the code:
python run.py. This will generate some results files that you can visualize withplot_fitness.ipynbandvisualizer.py.