From b76737f60b731325c0624d8a61481d61e869bc22 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Sun, 24 Sep 2023 23:55:00 -0500 Subject: [PATCH] Changed numbers for fun --- src/chess.cpp | 2 +- src/chess.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chess.cpp b/src/chess.cpp index 8b76a75..7877bf1 100644 --- a/src/chess.cpp +++ b/src/chess.cpp @@ -18,7 +18,7 @@ int GenerateRandomNumber(int generationLimit) { GeneticRules::GeneticRules(void) { boardSize = 4; - populationSize = 8; + populationSize = 4; } GeneticRules::GeneticRules(unsigned int boardSize, unsigned int populationSize) { diff --git a/src/chess.hpp b/src/chess.hpp index 687474c..28fe554 100644 --- a/src/chess.hpp +++ b/src/chess.hpp @@ -1,6 +1,7 @@ #ifndef CHESS_HPP #define CHESS_HPP +#include #include void InitializeGenerator(void); @@ -9,7 +10,7 @@ int GenerateRandomNumber(int generationLimit); struct GeneticRules { const double kProbabilityCrossover = 0.7; //crossover probability (typical val.) const double kProbabilityMutation = 0.001; //mutation probability (typical val.) - const unsigned int generationLimit = 10000; //number of generations (something huge) + const int64_t generationLimit = INT64_MAX; //number of generations (something huge) unsigned int boardSize; //board size unsigned int populationSize; //population size (change to something even) GeneticRules(void);