main
Brett 2024-07-23 03:09:21 -04:00
parent 9d53c180e9
commit 8641a3aa64
3 changed files with 14 additions and 14 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25) cmake_minimum_required(VERSION 3.25)
project(image-gp-6 VERSION 0.0.16) project(image-gp-6 VERSION 0.0.17)
include(FetchContent) include(FetchContent)

View File

@ -19,23 +19,23 @@
#ifndef IMAGE_GP_6_CONFIG_H #ifndef IMAGE_GP_6_CONFIG_H
#define IMAGE_GP_6_CONFIG_H #define IMAGE_GP_6_CONFIG_H
constexpr size_t log2(size_t n) // NOLINT inline constexpr size_t log2(size_t n) // NOLINT
{ {
return ((n < 2) ? 1 : 1 + log2(n / 2)); return ((n < 2) ? 1 : 1 + log2(n / 2));
} }
static const blt::u64 SEED = std::random_device()(); inline const blt::u64 SEED = std::random_device()();
static constexpr blt::size_t IMAGE_SIZE = 128; inline constexpr blt::size_t IMAGE_SIZE = 128;
static constexpr blt::size_t IMAGE_PADDING = 16; inline constexpr blt::size_t IMAGE_PADDING = 16;
static constexpr blt::size_t POP_SIZE = 64; inline constexpr blt::size_t POP_SIZE = 64;
static constexpr blt::size_t CHANNELS = 3; inline constexpr blt::size_t CHANNELS = 3;
static constexpr blt::size_t DATA_SIZE = IMAGE_SIZE * IMAGE_SIZE; inline constexpr blt::size_t DATA_SIZE = IMAGE_SIZE * IMAGE_SIZE;
static constexpr blt::size_t DATA_CHANNELS_SIZE = DATA_SIZE * CHANNELS; inline constexpr blt::size_t DATA_CHANNELS_SIZE = DATA_SIZE * CHANNELS;
static constexpr blt::size_t BOX_COUNT = static_cast<blt::size_t>(log2(IMAGE_SIZE / 2)); inline constexpr blt::size_t BOX_COUNT = static_cast<blt::size_t>(log2(IMAGE_SIZE / 2));
static constexpr float THRESHOLD = 0.3; inline constexpr float THRESHOLD = 0.3;
static constexpr auto load_image = "../GSab4SWWcAA1TNR.png"; inline constexpr auto load_image = "../GSab4SWWcAA1TNR.png";
blt::gp::prog_config_t config = blt::gp::prog_config_t() inline blt::gp::prog_config_t config = blt::gp::prog_config_t()
.set_initial_min_tree_size(4) .set_initial_min_tree_size(4)
.set_initial_max_tree_size(8) .set_initial_max_tree_size(8)
.set_elite_count(2) .set_elite_count(2)

@ -1 +1 @@
Subproject commit f62494d7d896ec3a10266a878e644771ac84aebb Subproject commit 3af4676c8342ab3722bc58d8f8b5414ba016aa1d