Why Radiate
Evolution Made Easy
Radiate is a powerful library for implementing genetic algorithms and artificial evolution techniques. It provides a fast and flexible framework for creating, evolving, and optimizing solutions to complex problems using principles inspired by natural selection and genetics. The core is written in Rust with complete parity in Python.
-
Ease of use
Intuitive API design allows users to easily configure and run genetic algorithms without needed to know the nuts and bolts of the complex operations underlying them.
-
Modular Design
The library architecture enables users to mix and match different components such as selection strategies, crossover methods, and mutation techniques to suit their specific needs.
-
Performance
Between Rust's performance capabilities, a multi-threaded architecture, and hours spent optimizing code, Radiate ensures efficient execution of genetic operations, even for large populations and complex problem spaces.
-
Genome
Bits, characters, integers, floats, permutations, graphs and trees all evolve through the same core engine.
Flexibility
Customizable Genotypes and Fitness Functions
Out of the box support for a customizable genotypes and fitness functions, Radiate can be adapted to a wide range of problem domains, from single and multi optimization tasks to neuroevolution and machine learning applications.
ContinuousFloat genomes for Rastrigin, Rosenbrock, Ackley and your own objectives.
CombinatorialPermutations and integers for N-Queens, TSP and knapsack.
NeuroevolutionEvolve graph topologies, from feed-forward to recurrent and LSTM-style networks.
Genetic programmingTree-based programs for symbolic regression and classification.
Observability
Real-time insight into the engine
A first-class metric system is inter-woven into every aspect of radiate. Read them in your own code, subscribe to events, or open the opt-in terminal dashboard.

Example
Hello, Radiate!
Evolve a string of characters until it matches a target. The same run in Python and Rust.
- 1Pick a genome. A codec turns the problem into something the engine can evolve: here, a vector of characters as long as the target.
- 2Score it. The fitness function counts the characters that already match.
- 3Run it. The engine evolves the population until a limit is reached: here, a perfect score.
import radiate as rd
target = "Hello, Radiate!"
engine = (
rd.Engine.char(len(target))
.fitness(
lambda member: sum(1 for i in range(len(target)) if member[i] == target[i])
)
.limit(rd.Limit.score(len(target)))
)
result = engine.run(log=True)
print("Best solution:", "".join(result.value))
use radiate::prelude::*;
let target = "Hello, Radiate!";
let engine = GeneticEngine::builder()
.codec(CharCodec::vector(target.len()))
.fitness_fn(|geno: Vec<char>| {
geno.into_iter()
.zip(target.chars())
.filter(|(allele, targ)| allele == targ)
.count()
})
.build();
let result = engine
.iter()
.until_score(target.len())
.last()?;
println!("{}", result.value().iter().collect::<String>());
Next steps
Start evolving
-
User guide
Explore the library one concept at a time.
-
Examples
Complete problems in both languages.
-
Rust API
docs.rs.
-
Source
Issues, code, and the changelog.