main
Brett 2024-03-23 03:11:24 -04:00
parent a40031beab
commit c98be9edb3
3 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(lilfbtf5 VERSION 0.2.0)
project(lilfbtf5 VERSION 0.2.1)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)

View File

@ -40,9 +40,9 @@ namespace fb
fb::random& engine;
type_engine_t& types;
void crossover();
std::pair<tree_t, tree_t> crossover(tree_t& p1, tree_t& p2);
void mutate();
tree_t mutate(tree_t& p);
public:
explicit gp_population_t(blt::thread_pool<true>& pool, type_engine_t& types, fb::random& engine): pool(pool), engine(engine), types(types)

View File

@ -19,17 +19,17 @@
namespace fb
{
void fb::gp_population_t::crossover()
std::pair<tree_t, tree_t> gp_population_t::crossover(tree_t& p1, tree_t& p2)
{
}
void fb::gp_population_t::mutate()
tree_t gp_population_t::mutate(tree_t& p)
{
}
void fb::gp_population_t::init_pop(const population_init_t init_type, blt::size_t pop_size, blt::size_t min_depth, blt::size_t max_depth,
void gp_population_t::init_pop(const population_init_t init_type, blt::size_t pop_size, blt::size_t min_depth, blt::size_t max_depth,
std::optional<type_id> starting_type, double terminal_chance)
{
for (blt::size_t i = 0; i < pop_size; i++)
@ -81,7 +81,7 @@ namespace fb
}
}
void fb::gp_population_t::execute(const individual_eval_func_t& individualEvalFunc, const fitness_eval_func_t& fitnessEvalFunc)
void gp_population_t::execute(const individual_eval_func_t& individualEvalFunc, const fitness_eval_func_t& fitnessEvalFunc)
{
for (auto& individual : population)
{
@ -90,7 +90,7 @@ namespace fb
}
}
void fb::gp_population_t::breed_new_pop()
void gp_population_t::breed_new_pop()
{
}