thread
Brett 2024-08-18 02:08:48 -04:00
parent 7c3b8c050b
commit 858a7f5cfe
4 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25) cmake_minimum_required(VERSION 3.25)
project(blt-gp VERSION 0.1.7) project(blt-gp VERSION 0.1.8)
include(CTest) include(CTest)

View File

@ -39,7 +39,7 @@ blt::gp::prog_config_t config = blt::gp::prog_config_t()
.set_mutation_chance(0.1) .set_mutation_chance(0.1)
.set_reproduction_chance(0) .set_reproduction_chance(0)
.set_max_generations(50) .set_max_generations(50)
.set_pop_size(5000) .set_pop_size(50000)
.set_thread_count(0); .set_thread_count(0);
blt::gp::type_provider type_system; blt::gp::type_provider type_system;

View File

@ -409,8 +409,10 @@ namespace blt::gp
if (id == 0) if (id == 0)
{ {
crossover_selection.pre_process(*this, current_pop, current_stats); crossover_selection.pre_process(*this, current_pop, current_stats);
mutation_selection.pre_process(*this, current_pop, current_stats); if (&crossover_selection != &mutation_selection)
reproduction_selection.pre_process(*this, current_pop, current_stats); mutation_selection.pre_process(*this, current_pop, current_stats);
if (&crossover_selection != &reproduction_selection)
reproduction_selection.pre_process(*this, current_pop, current_stats);
perform_elitism(args); perform_elitism(args);

View File

@ -52,8 +52,6 @@ namespace blt::gp
{ {
for (blt::size_t i = 0; i < config.elites; i++) for (blt::size_t i = 0; i < config.elites; i++)
{ {
// BLT_INFO("%lf >= %lf? // %lf (indexes: %ld %ld)", ind.second.fitness.adjusted_fitness, values[i].second,
// ind.second.fitness.raw_fitness, ind.first, values[i].first);
if (ind.second.fitness.adjusted_fitness >= values[i].second) if (ind.second.fitness.adjusted_fitness >= values[i].second)
{ {
bool doesnt_contain = true; bool doesnt_contain = true;