Enhance fitness differences a bit
This commit is contained in:
parent
dc75f730ab
commit
d2997d9a5c
@ -173,6 +173,7 @@ namespace BitEvolver
|
|||||||
|
|
||||||
//
|
//
|
||||||
pair.first = chromosome->GetFitness() - fitness_low;
|
pair.first = chromosome->GetFitness() - fitness_low;
|
||||||
|
pair.first *= pair.first; // Square to enhance the difference a little
|
||||||
pair.second = chromosome;
|
pair.second = chromosome;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -222,7 +223,9 @@ namespace BitEvolver
|
|||||||
std::unique_lock<std::recursive_mutex> lock(this->chromosomes_mutex);
|
std::unique_lock<std::recursive_mutex> lock(this->chromosomes_mutex);
|
||||||
std::vector<std::pair<double, std::shared_ptr<Chromosome>>> chromosomes_normalized_fitness;
|
std::vector<std::pair<double, std::shared_ptr<Chromosome>>> chromosomes_normalized_fitness;
|
||||||
std::pair<double,std::shared_ptr<Chromosome>> wheel_slot;
|
std::pair<double,std::shared_ptr<Chromosome>> wheel_slot;
|
||||||
double slot_begin_value;
|
double
|
||||||
|
slot_begin_value
|
||||||
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
if ( !this->slots_need_population ) {
|
if ( !this->slots_need_population ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user