A powerful, flexible distributed and GPU-accelerated framework for evolutionary algorithms in modern AI workflows.
Current Version: 1.2.1
Released: May 13, 2025
Discover the powerful capabilities of EvoX to accelerate your workflows.
Supports acceleration on CPUs and GPUs, achieving over 100x speedups with distributed workflows.
Includes 50+ algorithms for single- and multi-objective optimization, supporting complex tasks like neuroevolution.
Fully compatible with PyTorch, offering a tailored programming model for effortless setup.
Features 100+ benchmark problems, including physics engines like Brax for reinforcement learning.
Provides real-time data streaming and customizable modules for tailored visualizations.
Seamlessly integrates with popular RL environments for cutting-edge AI research.
import torch
from evox.algorithms import PSO
from evox.problems.numerical import Ackley
from evox.workflows import StdWorkflow, EvalMonitor
algorithm = PSO(pop_size=100, lb=-32 * torch.ones(10), ub=32 * torch.ones(10))
problem = Ackley()
monitor = EvalMonitor()
workflow = StdWorkflow(algorithm, problem, monitor)
workflow.init_step()
for i in range(100):
workflow.step()
monitor.plot()
import torch
from evox.algorithms import RVEA
from evox.metrics import igd
from evox.problems.numerical import DTLZ2
from evox.workflows import StdWorkflow, EvalMonitor
prob = DTLZ2(m=2)
pf = prob.pf()
algo = RVEA(
pop_size=100,
n_objs=2,
lb=-torch.zeros(12),
ub=torch.ones(12)
)
monitor = EvalMonitor()
workflow = StdWorkflow(algo, prob, monitor)
workflow.init_step()
for i in range(100):
workflow.step()
monitor.plot()
import torch
import torch.nn as nn
from evox.algorithms import PSO
from evox.problems.neuroevolution.brax import BraxProblem
from evox.utils import ParamsAndVector
from evox.workflows import EvalMonitor, StdWorkflow
class SimpleMLP(nn.Module):
def __init__(self):
super().__init__()
self.features = nn.Sequential(nn.Linear(17, 8), nn.Tanh(), nn.Linear(8, 6))
def forward(self, x):
return torch.tanh(self.features(x))
model = SimpleMLP()
adapter = ParamsAndVector(dummy_model=model)
POP_SIZE = 1024
pop_center = adapter.to_vector(dict(model.named_parameters()))
lb = torch.full_like(pop_center, -5)
ub = torch.full_like(pop_center, 5)
algorithm = PSO(pop_size=POP_SIZE, lb=lb, ub=ub)
problem = BraxProblem(
policy=model,
env_name="halfcheetah",
max_episode_length=1000,
num_episodes=3,
pop_size=POP_SIZE,
)
monitor = EvalMonitor(topk=3)
workflow = StdWorkflow(
algorithm=algorithm,
problem=problem,
monitor=monitor,
opt_direction="max",
solution_transform=adapter,
)
workflow.init_step()
for i in range(50):
workflow.step()
monitor.plot()
Connect with other developers, contribute to EvoX, and explore our sister projects.