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
//! `neuralneat` is an implementation of the [NeuroEvolution of Augmenting
//! Topologies](https://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf)
//! (NEAT) described in the June 2002 paper titled "Evolving Neural
//! Networks through Augmenting Topologies" by Kenneth O. Stanley and Risto
//! Miikkulainen.
//!
//! Much of this implementation was also guided by the [NEAT 1.2.1 source code](
//! https://nn.cs.utexas.edu/?neat).
//!
//! # Basic usage:
//!
//! ```
//! use neuralneat::{Genome, Pool, Trainer};
//! use neuralneat::evaluation::TrainingData;
//!
//! // To do something useful, you need to decide what your training data is!
//! fn load_training_data() -> Vec<TrainingData> {
//! return vec![];
//! }
//!
//! fn main() {
//! let input_nodes = 5;
//! let output_nodes = 1;
//! // Create an initial pool of Genomes
//! let mut gene_pool = Pool::with_defaults(input_nodes, output_nodes);
//!
//! // Load the data that will be used to train and evolve the Genomes
//! let training_data: Vec<TrainingData> = load_training_data();
//!
//! // A Trainer can manage the process of training a population of Genomes
//! // over successive generations.
//! let mut trainer = Trainer::new(training_data);
//!
//! trainer.train(
//! &mut gene_pool,
//! // Train for 100 generations
//! 100,
//! );
//!
//! // The winner!
//! let best_genome = gene_pool.get_best_genome();
//! }
//! ```
/// The [defaults] module contains the default values of all of the constants
/// used by the [Pool] to create, mutate, and mate [Genomes](Genome).
/// The [evaluation] module contains functions and types related to the process
/// of evaluating and activating the neural network of a [Genome], such as
/// basic activation functions that can be used with hidden and output layers
/// of a [Genome].
pub use ;
pub use ;
pub use ;
pub use Trainer;