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
//! Generic Genetic Programming framework routines //! //! This crate supplies a generic framework for solving GP programs. //! As a consumer, you'll need to supply the following: //! //! - Enums to encode the various AST node types. //! - Implementations of `AstNode`, `Mutatable` and `RandNode` traits //! (which can usually be autogenerated using `impl_astnode!()`). //! - A fitness function evaluating the success of a given program. //! //! Create `random_population` from your types, then call `evolve` repeatedly to //! improve the fitness of the population. //! //! For a working example, see the `santa_fe_ant` in the `examples/` directory. extern crate rand; extern crate rustc_serialize; extern crate rayon; #[macro_use] extern crate downcast; #[macro_use] mod pick; #[macro_use] pub mod impl_astnode; mod ast; pub use ast::{AstNode, Mutatable, clone_or_replace, depth}; mod population; pub use self::population::Population; mod random_pop; pub use self::random_pop::{random_population, RandNode, NodeWeights, retain_best}; pub mod num; pub mod genetic; pub use genetic::{ScoreCard, Fitness}; pub use num::Number;