1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//! # Evolutionary planning
//!
//! Genetic algorithms, evolution strategies and multi-objective evolutionary search over
//! plans, paths and trajectories, for `no_std` + `alloc`.
//!
//! Every objective is **minimised**; costs are `f64` and NaN counts as `+∞`. All randomness
//! comes from a caller-provided [`rand_core::Rng`] (the crate ships [`SplitMix64`]), so a
//! seed reproduces a run. Every run takes a [`Budget`] that is asked before each evaluation;
//! [`Limits`] covers evaluations, generations and a target cost.
//!
//! # Modules
//!
//! | Family | Modules |
//! |---|---|
//! | Core | [`operators`] (traits and representations), [`budget`], [`observer`], [`rng`], [`cost`], [`objective`], [`problems`] |
//! | Single objective | [`ga`], [`diffusion`], [`hill_climb`], [`es`], [`cmaes`], [`de`], [`memetic`] |
//! | Multi objective | [`pareto`], [`nsga2`], [`nsga3`], [`moead`] |
//! | Quality diversity | [`map_elites`] |
//! | Planning | [`rhea`], [`stl`], [`trajectory`], [`graph_path`], `sas` (feature `sas-plus`), [`programmer`], [`gp`] |
//!
//! ```mermaid
//! graph TD
//! core[rng, cost, budget, observer] --> ops[operators]
//! ops --> single[ga, diffusion, hill_climb, es, cmaes, de]
//! single --> memetic
//! ops --> multi[pareto, nsga2, nsga3, moead]
//! ops --> qd[map_elites]
//! single --> planning[rhea, stl, trajectory, graph_path, sas, programmer, gp]
//! ```
//!
//! # Example
//!
//! ```
//! use evolutionary_planning::cmaes::{CmaEs, Config};
//! use evolutionary_planning::problems::single::ellipsoid;
//! use evolutionary_planning::{Limits, SplitMix64};
//!
//! let mut cma = CmaEs::new(vec![1.0; 6], 0.5, Config::default());
//! let mut objective = |x: &Vec<f64>| ellipsoid(x);
//! let outcome = cma.minimize(&mut objective, &mut Limits::evaluations(10_000).with_target(1e-10), &mut (), &mut SplitMix64::new(7));
//! assert!(outcome.best_cost() <= 1e-10);
//! ```
//!
//! See `docs/design.md` in the repository for the architecture, the paper table, the design
//! rules and the deviations from the source papers.
//!
//! Repository: <https://github.com/sunsided/evolutionary-planning>
extern crate alloc;
pub use ;
pub use ;
pub use Outcome;
pub use MultiOutcome;
pub use ;
pub use ;
pub use ;
/// Doctests for the code examples in README.md (not part of the API).