Skip to content

Commit 41fab32

Browse files
committed
Add numeric next to continues as signed, unsigned and real are all valid
1 parent 90c5a62 commit 41fab32

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@ Run with `cargo run --example [EXAMPLE_BASENAME] --release`
132132
## Heterogeneous Genotype Support
133133

134134
MultiRangeGenotype supports heterogeneous chromosomes that mix different gene
135-
semantics (continuous values, discrete choices, booleans) within a single
136-
numeric type `T`.
135+
semantics (continuous values, numeric values, discrete choices, booleans)
136+
within a single numeric type `T`.
137137

138138
## Mutation Type Visualization
139139

140140
The library supports various mutation strategies that affect how the genetic
141141
algorithm explores the search space. Random leads to the best results overall.
142142
Random is the default and is supported by all Genotypes.
143143

144-
But for continues genotypes (RangeGenotype and MultiRangeGenotype) there are
144+
But for numeric genotypes (RangeGenotype and MultiRangeGenotype) there are
145145
several alternatives. These might converge faster, but are all more sensitive to
146146
local optima than Random. The visualization below shows how different mutation
147147
types explore a 2D search space when searching for a target point:

src/genotype/multi_range.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub type DefaultAllele = f32;
1717
/// a value from its own allele_range with a uniform probability. Each gene has a equal probability
1818
/// of mutating, regardless of its allele_range size. If a gene mutates, a new values is taken from
1919
/// its own allele_range with a uniform probability. Duplicate allele values are allowed. Supports
20-
/// heterogeneous chromosomes that mix different gene semantics (continuous values, discrete
21-
/// choices, booleans) within a single numeric type `T`.
20+
/// heterogeneous chromosomes that mix different gene semantics (continuous values, numeric values,
21+
/// discrete choices, booleans) within a single numeric type `T`.
2222
///
2323
/// # Mutation types
2424
/// See [MutationType]
@@ -46,7 +46,8 @@ pub type DefaultAllele = f32;
4646
/// # Heterogeneous Genotype Support
4747
///
4848
/// MultiRangeGenotype supports heterogeneous chromosomes that mix different gene semantics
49-
/// (continuous values, discrete choices, booleans) within a single numeric type `T`.
49+
/// (continuous values, numeric values, discrete choices, booleans) within a single numeric type
50+
/// `T`.
5051
///
5152
/// Use `.with_mutation_types(vec![...])` to specify behavior for each gene individually:
5253
///

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
//! ## Heterogeneous Genotype Support
113113
//!
114114
//! [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) supports heterogeneous chromosomes that mix
115-
//! different gene semantics (continuous values, discrete choices, booleans) within a single
115+
//! different gene semantics (continuous values, numeric values, discrete choices, booleans) within a single
116116
//! numeric type `T`.
117117
//!
118118
//! ## [MutationType](crate::genotype::MutationType) Visualization
@@ -121,7 +121,7 @@
121121
//! algorithm explores the search space. Random leads to the best results overall.
122122
//! Random is the default and is supported by all Genotypes.
123123
//!
124-
//! But for continues genotypes ([RangeGenotype](crate::genotype::RangeGenotype) and
124+
//! But for numeric genotypes ([RangeGenotype](crate::genotype::RangeGenotype) and
125125
//! [MultiRangeGenotype](crate::genotype::MultiRangeGenotype)) there are several alternatives.
126126
//! These might converge faster, but are all more sensitive to local optima than Random. The
127127
//! visualization example shows how different mutation types explore a 2D search space when searching

0 commit comments

Comments
 (0)