From 0682b42cb489173d86ca04e2816c72cba7d4b331 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Sun, 24 Sep 2023 23:25:22 -0500 Subject: [PATCH] Removed original files --- src/CMakeLists.txt | 1 - src/n_queens.cpp | 31 ----------------------------- {src => test}/genetic_algorithm.cpp | 0 {src => test}/genetic_algorithm.hpp | 0 4 files changed, 32 deletions(-) rename {src => test}/genetic_algorithm.cpp (100%) rename {src => test}/genetic_algorithm.hpp (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 782b1e0..ad4d7d6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,6 @@ add_executable(n_queens ./n_queens.cpp ./chess.cpp - ./genetic_algorithm.cpp ) target_include_directories(n_queens PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/src/n_queens.cpp b/src/n_queens.cpp index 0236596..b6b8b79 100644 --- a/src/n_queens.cpp +++ b/src/n_queens.cpp @@ -1,5 +1,4 @@ #include "chess.hpp" -#include "genetic_algorithm.hpp" #include #include #include @@ -34,34 +33,4 @@ int main(int argc, char* argv[]) { std::cout << "Generation limit reached." << std::endl; } return 0; - - /* - unsigned char population[N] = {0}; - int selected[N] = {-1}; - int generation_count = 0; - int i; - srand(time(NULL)); - - - //basic genetic algorithm skeleton - init_population(population); - print_population(population); - - while( generation_count < G ){ - do_selection(population, selected); - do_crossover(population, selected); - do_mutation(population); - printf("%4d: ", generation_count); - print_population(population); - for( i=0; i