Closed wolfcuring closed 5 years ago
Hi,
this is a really good question!
FlostingPointChromosome
use the code bellow to generate genes values:
for (int i = 0; i < geneValues.Length; i++)
{
geneValues[i] = rnd.GetDouble(minValue[i], maxValue[i]);
}
I guess the best approach you can try is inherits from IRandomization
implementation you are using (probably the FastRandomRandomization
), then override the double GetDouble(double min, double max)
method to guarantee that it wil return only the fraction in the range you want.
Cool, will give it a try !
Hi giacomelli,
Some times, I want to limit my search space by set up search steps. For example, instead of searching every 0.001 increments of a variable (0.001, 0.002, 0.003....in the range), I want to search every 0.005 increment (so, now I only search 0.005 0.001 in the range).
How Can I set up this in the GeneticSharp? I guess in the FloatingPointChromosome() the Number of Fraction argument can partially implement this.
Thanks in advance !