diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e446c2..8d3fe00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(image-gp-6 VERSION 0.0.19) +project(image-gp-6 VERSION 0.0.20) include(FetchContent) diff --git a/include/config.h b/include/config.h index 5e0646b..3f60150 100644 --- a/include/config.h +++ b/include/config.h @@ -24,8 +24,8 @@ inline constexpr size_t log2(size_t n) // NOLINT return ((n < 2) ? 1 : 1 + log2(n / 2)); } -inline const blt::u64 SEED = std::random_device()(); -//inline const blt::u64 SEED = 553372510; +//inline const blt::u64 SEED = std::random_device()(); +inline const blt::u64 SEED = 553372510; inline constexpr blt::size_t IMAGE_SIZE = 128; inline constexpr blt::size_t IMAGE_PADDING = 16; inline constexpr blt::size_t POP_SIZE = 64; @@ -35,6 +35,7 @@ inline constexpr blt::size_t DATA_CHANNELS_SIZE = DATA_SIZE * CHANNELS; inline constexpr blt::size_t BOX_COUNT = static_cast(log2(IMAGE_SIZE / 2)); inline constexpr float THRESHOLD = 0.3; inline constexpr auto load_image = "../GSab4SWWcAA1TNR.png"; +//inline constexpr auto load_image = "../miles.png"; inline blt::gp::prog_config_t config = blt::gp::prog_config_t() .set_initial_min_tree_size(4) diff --git a/include/float_operations.h b/include/float_operations.h index b595f32..8101c02 100644 --- a/include/float_operations.h +++ b/include/float_operations.h @@ -42,10 +42,10 @@ inline blt::gp::operation_t f_literal([]() { template void create_float_operations(blt::gp::operator_builder& builder) { - builder.add_operator(f_add); - builder.add_operator(f_sub); - builder.add_operator(f_mul); - builder.add_operator(f_pro_div); +// builder.add_operator(f_add); +// builder.add_operator(f_sub); +// builder.add_operator(f_mul); +// builder.add_operator(f_pro_div); builder.add_operator(f_literal, true); } diff --git a/lib/blt-gp b/lib/blt-gp index 2952170..593e02b 160000 --- a/lib/blt-gp +++ b/lib/blt-gp @@ -1 +1 @@ -Subproject commit 29521703d31121460750815727d5f8ecde34db25 +Subproject commit 593e02b6ffd36cfabda85e9dcfd88ec60b8a8741 diff --git a/lib/blt-graphics b/lib/blt-graphics index 4e34161..c01cb75 160000 --- a/lib/blt-graphics +++ b/lib/blt-graphics @@ -1 +1 @@ -Subproject commit 4e34161bcb3f7e12879c519a2fda10f223bdea63 +Subproject commit c01cb757a1d19fa8e06292dcb61a5b5769979f11 diff --git a/miles.png b/miles.png new file mode 100644 index 0000000..7ddea9f Binary files /dev/null and b/miles.png differ diff --git a/src/main.cpp b/src/main.cpp index 1797cf4..f107706 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -350,7 +350,7 @@ void update(const blt::gfx::window_data& data) { run_generation = true; } - ImGui::InputInt("Time Between Runs", &time_between_runs); + ImGui::InputInt("Time Between Runs", &time_between_runs, 16); ImGui::Checkbox("Run", &is_running); auto& stats = program.get_population_stats(); ImGui::Text("Stats:"); @@ -451,6 +451,7 @@ int main() BLT_INFO("Base image values per channel: %lf", v.total); BLT_PRINT_PROFILE("Image Test", blt::PRINT_CYCLES | blt::PRINT_THREAD | blt::PRINT_WALL); + BLT_PRINT_PROFILE("Mutation", blt::PRINT_CYCLES | blt::PRINT_THREAD | blt::PRINT_WALL | blt::AVERAGE_HISTORY); is_running = false; program.kill();