Welcome to the comprehensive guide on using Evolution Gym! If you’re interested in co-optimizing the design and control of soft robots, you’ve landed in the right place. This article will walk you through everything from installation to running experiments. Let’s dive in!
What is Evolution Gym?
Evolution Gym, or EvoGym, is a large-scale benchmark designed specifically for developing learning algorithms focused on soft robots. It comes with a lightweight soft-body simulator that has a gym-like interface, allowing researchers and developers to work seamlessly across 32 locomotion and manipulation tasks. Whether you are a seasoned developer or a curious newcomer, EvoGym offers a wealth of resources!
Installation: Get Started with EvoGym
To get started with EvoGym, follow these steps:
- Ensure you have Python 3.7 – 3.10 installed on your system.
- Depending on your operating system, you may need to install several packages. Follow the steps below:
Quick Installation via Pip
You can install EvoGym easily via pip. Here’s how:
pip install evogym --upgrade!
If this command doesn’t work, don’t worry! You can install it from the test PyPI:
pip install numpy==2.0.0
pip install -i https://test.pypi.org/simple evogym
Linux Specific Installation
If you are using Linux, open the terminal and run the following command:
sudo apt-get install xorg-dev libglu1-mesa-dev
Installation From Source
If your platform isn’t supported, you can also build from source:
- Ensure you’ve installed Visual Studios 2017 build tools and CMake.
- Clone the repository and its submodules with:
git clone --recurse-submodules https://github.com/EvolutionGym/evogym.git
sudo apt-get install xorg-dev libglu1-mesa-dev
pip install -e .
Testing Your Installation
To verify if the installation was successful:
cd examples
python gym_test.py
Alternatively, you can run a small Python snippet to create a random robot:
import gymnasium as gym
import evogym.envs
from evogym import sample_robot
if __name__ == "__main__":
body, connections = sample_robot((5, 5))
env = gym.make("Walker-v0", body=body, render_mode="human")
env.reset()
while True:
action = env.action_space.sample()
ob, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
env.reset()
env.close()
This code will create a random 5×5 robot in the Walking-v0 environment, running on random actions within a visualization window.
Troubleshooting
If you encounter any issues during installation or when trying out your first experiment, here are some troubleshooting tips:
- Common Error: “libGL error: MESA-LOADER: failed to open iris: usrlibdriiris_dri.so”.
- Fix: Run the command below:
conda install -c conda-forge libstdcxx-ng
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Using EvoGym: Tips and Tutorials
EvoGym offers extensive documentation to help users make the most out of the platform:
- Explore the API documentation for in-depth usage guides.
- Begin with the tutorials available on the website, covering the basic API, custom environment creation, and rendering options.
Conclusion
With Evolution Gym set up, you’re ready to explore the fascinating world of soft robots and optimization algorithms. The available resources, from tutorials to examples, offer robust support for both beginners and advanced users alike.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

