-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (27 loc) · 1.17 KB
/
main.cpp
File metadata and controls
34 lines (27 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/****************************************************/
/* */
/* */
/* CSCI1320 Final Project */
/* Genetic Algorithm */
/* */
/* 11/29/2019 */
/* */
/* Jason Popich */
/* */
/****************************************************/
/* TO COMPILE USE g++ -std=c++17 -o GAP main.cpp*/
// Reason for this is because of uniform initialization of variables.
#include "main.hpp"
int main()
{
srand(time(NULL));
std::string targetPhrase {"The mountains shall rise"};
std::string outputfile_name {"GAPCSV.csv"};
int population_size {4000};
int mating_factor {10};
int maxGenerations {100000};
double mutationFactor {4}; // In percent...
POPULATION ai(outputfile_name, targetPhrase, population_size, maxGenerations, mating_factor, mutationFactor);
ai.loop(maxGenerations);
return 0;
}