blob: 7c58c7b003a6530b3eb707aee56d5efc3ff38720 (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef __APP_HPP__
#define __APP_HPP__
#include <Stage.hpp>
#include <Agent.hpp>
#include <CppnExplorer.hpp>
#include <HyperNeat/Population.hpp>
#include <HyperNeat/NeuralNetPrms.hpp>
#include <HyperNeat/NoveltyMetric.hpp>
#include <HyperNeat/PopulationPrms.hpp>
namespace hn = hyperneat;
class App {
public:
int startup();
int execute();
void update();
void draw();
void shutdown();
private:
bool _draw = true;
bool _runningWOGfx = true;
bool _isPaused = true;
bool _isVSyncEnabled = true;
sf::RenderWindow _window;
Stage _stage;
hn::Vector<Agent> _agents;
ssize_t _selectedIdx = -1;
sf::Clock _clock;
sf::Clock _globalClock;
float _secondsToRun = 0.0f;
sf::CircleShape _champ;
sf::CircleShape _selected;
hn::CppnExplorer _cppnEx;
sf::Font _font;
sf::Text _updates;
sf::Text _champFitness;
sf::Text _avergFitness;
hn::NeuralNetPrms _nnPrms;
hn::PopulationPrms _popPrms;
hn::Population _population;
bool _doNoveltySearch = false;
size_t _completedCircuits = 0;
hn::NoveltyMetricPrms _noveltyPrms;
hn::Vector<sf::CircleShape> _noveltyMarks;
};
#endif // __APP_HPP__
|