-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (25 loc) · 885 Bytes
/
main.cpp
File metadata and controls
39 lines (25 loc) · 885 Bytes
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
35
36
37
38
39
#include "main.h"
#include <ctime>
#include <iostream>
using namespace NEAT;
static Population *pop;
static time_t startTime;
int main(int argc, char **argv) {
//uncomment to generate input file
//generate_genefile();
//***********RANDOM SETUP***************//
srand((unsigned)time(NULL));// +getpid());
/*
//redirect cout to file
std::ofstream out("write/out.txt", ios::app);
std::streambuf *coutbuf = std::cout.rdbuf(); //save old buf
std::cout.rdbuf(out.rdbuf());
time_t t = time(0); // get time and print it
std::tm* now = std::localtime(&t);
std::cout << endl << (now->tm_year + 1900) << (now->tm_mon + 1) << now->tm_mday << '_' << now->tm_hour << '_' << now->tm_min << '_' << now->tm_sec << endl;
//startTime = std::time(0);
std::cout.rdbuf(coutbuf);
*/
run_main_novelty("write/");
return EXIT_SUCCESS;
}