Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
pkalivas committed Nov 21, 2024
2 parents 197e043 + 086142a commit 1b5065c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions radiate-examples/string-evolver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ fn main() {

let engine =
GeneticEngine::from_codex(&codex)
.offspring_selector(RankSelector::new())
.offspring_selector(BoltzmannSelector::new(4_f32))
.survivor_selector(TournamentSelector::new(3))
.alterer(vec![Alterer::Mutator(0.01), Alterer::UniformCrossover(0.5)])
.alterer(vec![
Alterer::Mutator(0.01),
Alterer::UniformCrossover(0.5)
])
.fitness_fn(|genotype: String| {
Score::from_usize(genotype.chars().zip(target.chars()).fold(
0,
Expand Down

0 comments on commit 1b5065c

Please sign in to comment.