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
//! Gene Expression Programming (GEP).
//!
//! GEP (Ferreira, 2001) evolves programs encoded as **fixed-length linear
//! chromosomes** that decode into expression trees. Each chromosome is a `head`
//! (whose loci may hold any symbol) followed by a `tail` (terminals only),
//! sized so that *every* chromosome respecting that split decodes to a complete
//! tree — no repair pass is ever needed. This makes the genetic operators
//! simple, position-aligned array edits, which is GEP's headline advantage over
//! tree-based GP.
//!
//! # Module map
//!
//! - [`config`] — [`GepConfig`]: runtime head/tail/population parameters; the
//! tail length is derived and the head/tail constraint asserted at construction.
//! - [`alphabet`] — [`Alphabet`] and [`SymbolKind`]: the function set plus the
//! variable/constant terminal layer, with the contiguous id-space and the
//! tail [`terminal_range`](Alphabet::terminal_range).
//! - [`tree`] — [`ExpressionTree`]: the level-order decoded phenotype with
//! `eval`/`depth`/`node_count`.
//! - [`decode`] — [`GenotypePhenotypeMap`] and [`GepDecoder`]: the deterministic
//! ORF-scan + BFS decoder.
//! - [`operators`] — point mutation (locus-class aware), IS/RIS transposition,
//! and one-/two-point crossover, all valid by construction.
//! - [`strategy`] — [`GepStrategy`], [`GepState`], and the [`GepSymRegression`]
//! fitness function.
//!
//! Genotype storage is a `Tensor<B, 2, Int>` of shape `(pop_size, head_len +
//! tail_len)`; decoding and evaluation run host-side, per chromosome, because
//! the decode is an inherently sequential ORF scan that does not vectorise.
//!
//! # Reference
//!
//! - Ferreira (2001), *Gene Expression Programming: a New Adaptive Algorithm
//! for Solving Problems*, Complex Systems 13(2).
pub use ;
pub use GepConfig;
pub use ;
pub use ;
pub use ExpressionTree;