watchmaker 0.1.0

A genetic algorithm implementation in Rust.
Documentation

watchmaker

A genetic algorithm implementation in Rust.

CircleCI

Features

  • Developed as an investigation into capabilities and implementation characteristics
  • Written in the Rust programming language

Usage

    pub trait Genetic<G> {
        fn initialize(&mut self) -> G;
        fn evaluate(&mut self, genome: &G) -> f64;
        fn crossover(&mut self, lhs: &G, rhs: &G) -> G;
        fn mutate(&mut self, original: &G) -> G;
        fn random(&mut self) -> &mut Random;
    }
  • Call the solver method:
    let result = solve(
        Box::new(MySearchProblem::new(make_random())),
        None,
        0.00,
        32,
        100,
        0.0,
        1_000,
        Duration::from_secs(5),
    );
    println!("{:?}", result);

Development

  • Clone the repository (see below)
  • Run cargo test or cargo build

Examples

See the examples folder.

Roadmap

  • Rustdoc
  • Multithreading

Alternatives

Genetic Algorithm is a very well known technique: https://en.wikipedia.org/wiki/Genetic_algorithm There are many alternatives for Rust available through cargo: https://crates.io/search?q=genetic%20algorithm

License

MIT permissive license. See LICENSE for full license details.

Source Code Repository

https://github.com/thomasbratt/watchmaker