Expand description
An evolutionary programmer after Lou, Ding and Wu (2022): a meta-GA evolves bit strings that encode complete path-planning GAs (operators and their parameters, drawn from an operator library), scored by how well the decoded planner solves a set of training instances within a fixed evaluation budget.
The genome has 18 bits (the paper’s has 64 over a larger library):
| Bits | Gene | Values |
|---|---|---|
| 0–1 | selection operator | tournament, truncation, roulette, linear ranking with SUS |
| 2–3 | selection parameter | size 2/3/4/6; fraction 0.2/0.3/0.5/0.7; pressure 1.2/1.4/1.7/2 |
| 4–5 | elitism | 0, 1, 2, 4 |
| 6–7 | crossover rate | 0, 0.4, 0.7, 0.95 |
| 8–9 | mutation rate | 0.2, 0.5, 0.8, 1 |
| 10–12 | population size | 10, 16, 24, 32, 48, 64, 96, 128 |
| 13–14 | reroute expansions | 8, 32, 128, 512 |
| 15 | scheme | generational, steady state |
| 16–17 | steady-state replacement | always (codes 0, 1), only if better (codes 2, 3) |
The meta-GA uses linear ranking with selective pressure 1.2, the paper’s scores from
0.8 (worst) to 1.2 (best).
use evolutionary_planning::graph_path::Grid;
use evolutionary_planning::programmer::{Instance, MetaConfig, Programmer};
use evolutionary_planning::SplitMix64;
let mut grid = Grid::open(8, 8, false);
for y in 0..6 {
grid.block(4, y);
}
let instances = vec![Instance::new(&grid, grid.node(0, 0), grid.node(7, 0))];
let mut programmer = Programmer::new(instances, 400);
let (planner, score) = programmer.evolve(&MetaConfig { population_size: 10, evaluations: 60 }, &mut SplitMix64::new(1));
assert!(score.is_finite() && planner.population_size >= 10);Structs§
- Instance
- A training instance: a graph, a start, a goal and the optimal length (from Dijkstra).
- Meta
Config - Parameters of the meta-GA.
- Planner
Config - A decoded path-planning GA.
- Programmer
- The planner-programming objective: the mean relative excess
cost / optimum - 1of the decoded planner over the training instances (a failed run counts10), each run with a fixed seed so a genome’s score is deterministic.
Enums§
- Selection
Choice - A selection operator chosen by the genome.
Constants§
- GENOME_
BITS - The number of bits of a planner genome.