From d2997d9a5c4b8f155536d8542bf993a5a4157203 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 14 Apr 2018 06:31:34 -0700 Subject: [PATCH] Enhance fitness differences a bit --- RouletteWheel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RouletteWheel.cpp b/RouletteWheel.cpp index bfa0d86..cd18191 100644 --- a/RouletteWheel.cpp +++ b/RouletteWheel.cpp @@ -173,6 +173,7 @@ namespace BitEvolver // pair.first = chromosome->GetFitness() - fitness_low; + pair.first *= pair.first; // Square to enhance the difference a little pair.second = chromosome; // @@ -222,7 +223,9 @@ namespace BitEvolver std::unique_lock lock(this->chromosomes_mutex); std::vector>> chromosomes_normalized_fitness; std::pair> wheel_slot; - double slot_begin_value; + double + slot_begin_value + ; // if ( !this->slots_need_population ) {