Rust-Rust genetic algorithm: rust-genetic-algorithm — A genetic algorithm for academic benchmark problems

Genetic Algorithm

Build Status

A genetic algorithm in Rust for the following benchmark problems:

  • Ackley
  • Griewangk
  • Rastrigin
  • Rosenbrock
  • Schwefel
  • Sphere

Usage:

  1. Install Rust
  2. Build with cargo build --release
  3. Search with ./target/release/rust-genetic-algorithm
  4. See further usage with rust-genetic-algorithm --help

Based on my prior implementation in C++.

Comments

  • Cargo.toml: remove
    Cargo.toml: remove "readme" field

    Dec 27, 2020

    It is no more required. See here.

    Reply
  • Implement more benchmark problems
    Implement more benchmark problems

    May 26, 2015

                                                                                                                                                                                                           
    Reply
  • Test
    Test

    May 25, 2015

    Unit tests would be nice

    Reply
  • Implement elitism
    Implement elitism

    May 24, 2015

                                                                                                                                                                                                           
    Reply
  • Implement recombination
    Implement recombination

    May 24, 2015

                                                                                                                                                                                                           
    Reply
  • Parallelize
    Parallelize

    May 25, 2015

    While learning Rust's concurrency.

    Reply
  • Optimize
    Optimize

    May 25, 2015

    • [x] Profile
    • [x] Time
    Reply
  • Generalize for any problem
    Generalize for any problem

    May 24, 2015

    Add something along the lines of:

    struct Problem {
        min: f64,
        max: f64,
        dimension: usize,
        mutation_rate: usize, // 1 in n
        population_size: usize,
        iterations: usize,
    }
    
    trait Fitness {
        fn fitness(x: &Vec<f64>) -> f64;
    }
    
    Reply
  • Update rand package version dependency.
    Update rand package version dependency.

    Jan 2, 2017

    Prior to this commit attempting to build the project with cargo build --release failed to compile the rand dependency (which was defaulting to v0.3.8). After this commit the rand dependency requires a more current version and the project builds successfully.

    I'm working on learning some Rust myself and wanted to turn some knobs in your project, this fix allowed me to build it.

    Reply