Evolutionary intelligence for the physical world.
Parallel simulation and learning for embodied systems.
Documentation · Scenes · Get started · Performance · Ecosystem · Project homepage
EvoX Physics brings evolutionary learning to simulated physical worlds. As part of the EvoX ecosystem, it connects population-based search with the dynamics of physical interaction: candidate policies act in an environment, their outcomes are measured, and that feedback guides the next generation.
The framework combines a physics engine derived from Genesis World, EvoX Compiler computation graphs, and evolutionary algorithms. A shared Python API supports training, checkpointing, evaluation, and replay. The default learning workflow runs without importing PyTorch.
Control, materials, and contact shape the environments in which behavior evolves. These simulation scenes illustrate that range, from locomotion and manipulation to flowing liquids, deformable solids, and granular materials.
Locomotion |
Fluid dynamics |
Elastic solids |
Manipulation |
Granular materials |
Cloth dynamics |
Explore six more simulation scenes
Humanoid locomotion |
Acrobatic motion |
Target pursuit |
Aerial control |
Rigid-body contacts |
Fluid–solid interaction |
In physical systems, actions have measurable consequences: motion, contact, stability, and energy use. Simulation makes those interactions repeatable, allowing candidate behaviors to be evaluated under controlled conditions and across many environments in parallel.
Generate, evaluate, and refine. EvoX Physics applies this evolutionary loop to control policies represented as neural-network parameters, network graphs, or program trees. Fitness measured during simulation guides the search across generations.
- Parallel evaluation. Evaluate candidate policies across batched environments on AMD or NVIDIA accelerators.
- Multiple policy representations. Use ES/RankES, TensorNEAT, or EvoGP through a common training interface.
- A shared experiment workflow. Train, checkpoint, resume, evaluate, and replay through
Trainer,Policy, andRenderer. - Custom physical tasks. Specify a robot model and its observation, reward, and termination functions with
RobotSpecandRobotTask.
The current task library focuses on robotic locomotion, target pursuit, and aerial control. These tasks provide concrete settings for studying how behavior evolves under physical constraints.
Use Linux and Python 3.12 for the documented GPU setup. Configure the host for IREE ROCm or IREE CUDA before running an accelerator workload.
Install from source in an isolated environment:
git clone https://github.com/EMI-Group/evox-physics.git
cd evox-physics
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install "evoxc[iree]" av
python -m pip install -e .Install EvoX Compiler with IREE explicitly as shown above. The editable installation supplies the simulator and other dependencies declared in pyproject.toml.
Choose a task, a policy network, and an optimization algorithm, then run the experiment:
import evoxphysics as evoxp
task = evoxp.task.Go2Walk(horizon=1000, episodes_per_policy=3)
policy = evoxp.net.MLP(
hidden=(64, 64),
activation="tanh",
normalize_obs=True,
output_gain=0.01,
)
algorithm = evoxp.ne.ES(
pop_size=4096,
sigma=0.02,
lr=0.01,
sampling="mirror",
)
with evoxp.ne.Trainer(
task=task,
policy=policy,
algorithm=algorithm,
backend="iree",
device="rocm:0", # Use "cuda:0" on an NVIDIA GPU.
seed=711,
out_dir="runs/go2_walk",
checkpoint_every=10,
eval_every=10,
) as trainer:
result = trainer.run(generations=100)
print(f"Best fitness: {result.best_fitness:.4f}")
print(f"Checkpoint: {result.checkpoint}")
result.render("runs/go2_walk/policy.mp4", duration=5.0)This configuration evaluates 4,096 candidate policies per generation, with three episodes per policy. Reduce pop_size to fit your device. Scene creation and graph compilation are deferred until execution.
import evoxphysics as evoxp
with evoxp.Renderer.from_checkpoint(
"runs/go2_walk/checkpoints/best"
) as renderer:
renderer.record("go2_walk.mp4", duration=5.0)See the quickstart guide for resuming runs, callbacks, evaluation, and camera settings. A warm start with ES(initial_policy=...) initializes a new optimization from a saved policy; Trainer.resume(...) continues an existing run.
The engine provides several simulation methods for different physical regimes. Material definitions and solver configuration determine how a scene behaves and which interactions it supports.
| Domain | Engine components |
|---|---|
| Rigid and articulated bodies | Rigid-body dynamics, joints, and contact |
| Fluids | SPH, MPM, and PBD liquid models |
| Deformable solids | FEM and MPM elastic materials; MPM elastoplastic models |
| Cloth | PBD and FEM cloth models |
| Granular materials | MPM sand and snow models |
| Coupled interaction | Couplers for supported combinations of solvers and materials |
These components provide a foundation for custom physical scenes. The packaged policy-learning tasks and reported benchmarks currently focus on the control problems below; material and coupled simulations require their own scene configuration and evaluation objectives.
| Task | Robot or behavior |
|---|---|
Go2Walk, Go2Chase |
Unitree Go2 locomotion and target pursuit |
Go1Walk |
Unitree Go1 locomotion |
AnymalCWalk |
ANYmal C locomotion |
AntWalk, HumanoidWalk |
MJCF locomotion tasks |
G1Walk |
Unitree G1 biped locomotion |
DroneHover |
Propeller-driven hovering |
To add a custom robot task, start with examples/custom_robot_task.py and the custom task guide. The task supplies its robot description and control settings to the renderer.
| Interface | Search representation |
|---|---|
ES / RankES |
Neural-network parameter vectors; ES is the compact interface to the RankES implementation |
TensorNEAT |
Network graphs |
EvoGP |
Program trees |
The algorithm comparison example shows how these representations use the shared training and checkpoint workflow.
The G1 training recipe uses a reference-guided approach: an analytical gait initializes an MLP policy, which RankES then refines.
The learning layer expresses policy inference, observation and reward calculations, and optimizer updates as evoxc graphs. The Genesis-derived engine advances the physical scene using Quadrants. Shared device buffers connect the two runtimes on supported accelerator paths.
| Execution path | Recorded coverage |
|---|---|
| IREE + ROCm | Multi-scale fixed-policy measurements on AMD Instinct MI300X VF |
| IREE + CUDA | Seven-task fixed-policy measurements at 4,096 environments on RTX 4090 |
| XLA + CUDA | Additional seven-task measurements at 4,096 environments on RTX 4090 |
| NumPy + CPU | Host reference execution and small functional checks |
On supported accelerator paths, observations and actions remain on the device during the rollout. The host coordinates execution, including termination-mask readback and resets. For CPU reference runs, use the task's host-residency options and allow_host=True; see the placement guide for configuration details.
PyTorch interoperability is optional. Install the torch extra and set EVOXPHYSICS_ENABLE_TORCH=1 before importing evoxphysics to enable it. Interactive preview requires this option and a display; MP4 recording is available without PyTorch.
Recorded rollout throughput reaches millions of environment steps per second. The table below summarizes the committed seven-task benchmark data.
Measurements use an AMD Instinct MI300X VF with IREE/ROCm, a fixed MLP policy shared across environments, hidden layers (512, 256, 128), and ELU activation. Each rollout runs 1,000 control steps per environment with seed 711. Values are the median of two measured rollouts after one warmup, in millions of environment steps per second.
| Task | 4,096 envs | 16,384 envs | 32,768 envs | 65,536 envs |
|---|---|---|---|---|
Go2Walk |
0.872 | 2.54 | 3.55 | 4.14 |
Go1Walk |
0.931 | 2.41 | 3.05 | 3.29 |
AnymalCWalk |
1.07 | 3.02 | 3.91 | 4.30 |
AntWalk |
0.994 | 2.82 | 3.98 | 4.45 |
HumanoidWalk |
0.396 | 0.652 | 0.755 | 1.30 |
DroneHover |
1.24 | 4.35 | 7.34 | 11.0 |
G1Walk |
0.333 | 0.450 | 0.480 | — |
These measurements cover steady-state rollout throughput. End-to-end training also includes population generation and optimizer updates; time to convergence depends on the task and algorithm. Setup and warmup timings are recorded separately. Task dynamics and physics substeps differ, so cross-task rates represent different workloads. A dash indicates an unmeasured configuration.
Reproduce the seven-task sweep on a configured ROCm host:
python examples/bench_robots_scale.py \
--hidden 512 256 128 --activation elu \
--steps 1000 --repeat 2 --seed 711 \
--json-out robot_scale_7task.local.jsonUse --dry-run to inspect the plan without building scenes. The raw records include hardware, code revision, setup time, and individual samples.
Additional snapshots: RTX 4090 / IREE CUDA · RTX 4090 / XLA CUDA. Both were captured from a modified working tree (git_dirty: true); consult their metadata when interpreting or reproducing the results.
EvoX builds infrastructure for intelligence that adapts, creates, and evolves across digital and physical worlds. Its ecosystem connects evolutionary computation with models, software, control policies, and scientific design. EvoX Physics contributes the physical simulation and policy-learning workflow: a setting in which candidate behaviors are tested through interaction and refined through evolutionary feedback.
| Project | Role |
|---|---|
| EvoX | Evolutionary computation framework and algorithm ecosystem |
| EvoX Compiler | Tensor graphs, transformations and execution backends used by this learning stack |
| EvoRL | Evolutionary reinforcement learning on JAX |
| TensorNEAT | Tensorized neuroevolution of network topologies |
| EvoGP | GPU-accelerated genetic programming |
These projects share a research direction while maintaining their own APIs and installation requirements. Explore the wider ecosystem at evox.group.
- Documentation site and Python API reference
- Quickstart — training, checkpoints, resuming, and recording
- Custom tasks — robot descriptions and task functions
- API reference in the repository
- Architecture and known issues · Public API tests
Consult the current runtime limitations when configuring experiments, particularly the ROCm rendering shutdown issue and G1 replay behavior after an episode terminates.
For bugs and reproducibility reports, open an issue with the commit, task, backend, GPU, dependency versions, and a minimal example. Benchmark contributions should include the command and raw output alongside any summary table.
The physics engine is derived from Genesis World and uses Quadrants. The source snapshot, robot assets and other upstream contributions are recorded in NOTICE.
The engine and learning stack are licensed under Apache-2.0. The bundled TensorNEAT and EvoGP packages retain their GPL-3.0 licenses. Robot assets and other third-party components retain their accompanying licenses. See NOTICE for provenance and component-specific terms.