From af7e23ab119eba7c0579796abd288c027edabfa9 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 19:20:22 +0100 Subject: Initial commit --- include/App.hpp | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 include/App.hpp (limited to 'include/App.hpp') diff --git a/include/App.hpp b/include/App.hpp new file mode 100644 index 0000000..7c58c7b --- /dev/null +++ b/include/App.hpp @@ -0,0 +1,57 @@ +#ifndef __APP_HPP__ +#define __APP_HPP__ + +#include +#include +#include +#include +#include +#include +#include + +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 _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 _noveltyMarks; +}; + +#endif // __APP_HPP__ -- cgit v1.2.1