Enabling intelligence to adapt, create, and evolve
across digital and physical worlds.
Website · Documentation · Releases · 简体中文
EvoX provides the computing and experimentation foundation for AI that evolves. Across models, software, control policies, and scientific design, it connects population-based search with scalable evaluation.
Generate candidates, evaluate them, and retain what works. Selected solutions pass useful traits to the next generation, where local variations create new candidates. EvoX scales this loop through batched evaluation and parallel computing.
Open full animation · Static diagram
Tensorization and parallel computing scale up exploration. The PyTorch main version in this repository organizes candidates and their evaluation as batched tensor computation on CPUs and GPUs. Composable algorithms, problems, and workflows connect search, execution, and feedback.
Open full animation · Static diagram
- Branch:
main - Foundation: PyTorch
- Python import:
import evox - Python version: 3.10+
- Start here for: Applications, experiments, and PyTorch integration
- Branch:
evoxc-exp - Foundation: EvoX Compiler (
evoxc) - Python import:
import evox_etl - Python version: 3.11+
- Start here for: Exploring the new functional API and compiler backends
New to EvoX? Get started with 1.x. The experimental version is a functional rewrite on EvoX Compiler, with a NumPy interpreter and optional IREE, XLA, and TVM backends. Both versions use the evox package name, so try the alpha in a separate environment using its own installation guide.
The earlier JAX implementation is available at v0.9.0.
Evolution takes different forms across the EvoX ecosystem. Model weights, control policies, and geometry evolve through evaluation, selection, and inherited variation. Recursive agents decompose software tasks, work on branches, and merge their results into a shared codebase. The animations below show two search generations or two agent episodes.
Evolve the models. EvoGM searches for stronger combinations of fine-tuned expert models without further fine-tuning. The animation illustrates evaluating candidate weights, retaining the best model, and varying a few inherited weights.
EvoGM · Evolutionary model merging
Open full animation · Static diagram
Evolve the software. A root agent delegates subtasks to subagents, which can delegate again. Parents contribute their own work, then merge accepted commits once all their subagents finish; the root's merge lands on main. A rejected branch remains visible without being merged.
EvoX Genesis · Recursive agentic system
Open full animation · Static diagram
Evolve the behavior. Inherit control policies and vary their parameters.
EvoRL · Evolutionary reinforcement learning
Open full animation · Static diagram
Evolve the design. Inherit geometry and evaluate shape changes.
EvoGO · Supercritical airfoil design
Open full animation · Static diagram
Explore the full ecosystem, or follow the experimental compiler work in EvoX Compiler.
Install PyTorch for your hardware, then install EvoX 1.x with visualization support:
python -m pip install "evox[default]>=1.4,<2"Optimize the 10-dimensional Ackley function with particle swarm optimization:
import torch
from evox.algorithms import PSO
from evox.problems.numerical import Ackley
from evox.workflows import EvalMonitor, StdWorkflow
torch.set_default_device("cuda" if torch.cuda.is_available() else "cpu")
torch.manual_seed(42)
algorithm = PSO(
pop_size=100,
lb=-32 * torch.ones(10),
ub=32 * torch.ones(10),
)
monitor = EvalMonitor()
workflow = StdWorkflow(algorithm, Ackley(), monitor)
workflow.init_step()
for _ in range(100):
workflow.step()
print("Best fitness:", monitor.get_best_fitness().item())
# monitor.plot().show() # Optional: inspect the convergence curve.Algorithm generates and updates candidates. Problem evaluates a batch. Workflow connects them. Monitor records the results.
Use your own objective
Implement a batched evaluation function. For a single objective, map a tensor of shape (population_size, dimensions) to one fitness value per candidate:
from evox.core import Problem
class Sphere(Problem):
def evaluate(self, candidates: torch.Tensor) -> torch.Tensor:
return candidates.square().sum(dim=-1)Pass Sphere() in place of Ackley() when constructing the workflow. EvoX minimizes by default; use opt_direction="max" in StdWorkflow for maximization.
Optimize multiple objectives
The same workflow supports multi-objective search. This example uses RVEA on DTLZ2:
import torch
from evox.algorithms import RVEA
from evox.problems.numerical import DTLZ2
from evox.workflows import EvalMonitor, StdWorkflow
torch.manual_seed(42)
algorithm = RVEA(
pop_size=100,
n_objs=2,
lb=torch.zeros(12),
ub=torch.ones(12),
)
monitor = EvalMonitor(multi_obj=True)
workflow = StdWorkflow(algorithm, DTLZ2(m=2), monitor)
workflow.init_step()
for _ in range(100):
workflow.step()
print("Pareto-front fitness shape:", monitor.get_pf_fitness().shape)
# monitor.plot().show()Continue with the tutorials, neuroevolution examples, or hyperparameter optimization.
Algorithm libraries propose candidates. Benchmarks and simulation environments provide evaluation feedback. Workflows organize iteration, while tensorization and compiler tools support execution at scale. Together, these components provide infrastructure for exploration and validation:
Tensorized optimization, multi-objective search, genetic programming, and neural topology evolution.
EvoX · EvoMO · EvoGP · TensorNEAT
Neural architecture search, multi-objective robot control, and numerical optimization test suites.
EvoXBench · MoRobtrol in EvoMO · EvoX problem library
Evolutionary reinforcement learning, batched policy evaluation, and integration with environments such as Brax and MuJoCo Playground.
Compose experiments, track convergence and Pareto fronts, compare results, and tune configurations.
Workflows and monitors · Metrics · Hyperparameter optimization
Compiler backends for the experimental EvoX line; automatic tensorization of MATLAB multi-objective optimization code into PyTorch/EvoX implementations.
For neural and simulation integrations in EvoX 1.x:
python -m pip install "evox[default,neuroevolution]>=1.4,<2"The PyTorch version runs on CPU, NVIDIA GPU (CUDA), AMD GPU (ROCm), and Apple Silicon (MPS, eager execution) through the corresponding PyTorch backend. See the hardware guide for setup.
For supported compilation environments, compile the repeated step before entering the search loop:
from evox import compile
workflow.step = compile(workflow.step)Multi-GPU and distributed workflows are experimental and require a distributed launch and configuration. See benchmark scripts for reproducible performance experiments.
- Questions and ideas: GitHub Discussions, Discord, or QQ group 297969717.
- Bugs and contributions: Open an issue or start with the developer guide.
- Research and collaboration: Ran Cheng.
Install the main version from source
git clone --branch main https://github.com/EMI-Group/evox.git
cd evox
python -m pip install -e ".[default]"If EvoX supports your research, please cite the framework paper:
@article{evox,
title = {{EvoX}: A Distributed GPU-accelerated Framework for Scalable Evolutionary Computation},
author = {Huang, Beichen and Cheng, Ran and Li, Zhuozhao and Jin, Yaochu and Tan, Kay Chen},
journal = {IEEE Transactions on Evolutionary Computation},
year = {2024},
doi = {10.1109/TEVC.2024.3388550}
}EvoX is licensed under GPL-3.0-or-later.