From c294b70150d985fdc8a5b6a62eba74042489fa32 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Sat, 3 Aug 2024 19:59:56 -0400 Subject: [PATCH] messing around with symbolic regression a bit --- CMakeLists.txt | 2 +- examples/symbolic_regression.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6930724..e15defd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(blt-gp VERSION 0.0.111) +project(blt-gp VERSION 0.0.112) include(CTest) diff --git a/examples/symbolic_regression.cpp b/examples/symbolic_regression.cpp index f17969d..9fd386b 100644 --- a/examples/symbolic_regression.cpp +++ b/examples/symbolic_regression.cpp @@ -37,7 +37,7 @@ blt::gp::prog_config_t config = blt::gp::prog_config_t() .set_elite_count(2) .set_crossover_chance(0.9) .set_mutation_chance(0.1) - .set_reproduction_chance(0.1) + .set_reproduction_chance(0) .set_max_generations(50) .set_pop_size(500) .set_thread_count(0); @@ -75,7 +75,7 @@ constexpr auto fitness_function = [](blt::gp::tree_t& current_tree, blt::gp::fit fitness.raw_fitness += value_cutoff; } fitness.standardized_fitness = fitness.raw_fitness; - fitness.adjusted_fitness = 1.0 / (1.0 + fitness.standardized_fitness); + fitness.adjusted_fitness = (1.0 / (1.0 + fitness.standardized_fitness)); //BLT_TRACE("fitness: %lf raw: %lf", fitness.adjusted_fitness, fitness.raw_fitness); };