-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
33 lines (28 loc) · 793 Bytes
/
main.cpp
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
#include <thread>
#include <iostream>
#include "NNet.h"
#include "Display.h"
#include "Sim.h"
#include "World.h"
#include "Specimen.h"
#include <SFML/Window.hpp>
int main(int argc, char** argv)
{
std::chrono::time_point<std::chrono::system_clock> start, end;
Display display(1000, 1000);
NNet nNet(4, 5, 3, 3);
World world(1000.0, 1000.0);
Sim sim(world, 1000, 100);
start = std::chrono::system_clock::now();
//for (int i=0; i < 1000000; i++)
//nNet.feed_forward({0.1, 0.1, 0.1, 0.1});
while(display.window_open())
{
sim.simulate_frame();
display.render(sim, 60);
}
end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end-start;
std::cout<<elapsed_seconds.count();
return 0;
}