From e6ab4a8ed100d5d5b7611c74cf3ccd556f1f1d71 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 19:04:34 +0100 Subject: Initial commit --- include/HyperNeat/Behavior.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/HyperNeat/Behavior.hpp (limited to 'include/HyperNeat/Behavior.hpp') diff --git a/include/HyperNeat/Behavior.hpp b/include/HyperNeat/Behavior.hpp new file mode 100644 index 0000000..2f474a6 --- /dev/null +++ b/include/HyperNeat/Behavior.hpp @@ -0,0 +1,40 @@ +#ifndef __HYPERNEAT_BEHAVIOR_HPP__ +#define __HYPERNEAT_BEHAVIOR_HPP__ + +#include +#include + +namespace hyperneat +{ + class Organism; + class NoveltyMetric; + + class Behavior + { + public: + void clear(); + void reset(bool archive = true); + + double& at(size_t i); + double getNoveltyScore() const; + bool isToBeArchived() const; + Organism& getOrganism(); + const NoveltyMetric& getNoveltyMetric() const; + const Vector& getCharacterization() const; + + bool _criteriaReached = true; + + private: + double _noveltyScore = 0.0; + bool _isReady = false; + bool _toBeArchived = false; + Organism* _organism = nullptr; + NoveltyMetric* _noveltyMetric = nullptr; + Vector _characterization; + + friend class LoadFile; + friend class NoveltyMetric; + }; +} + +#endif -- cgit v1.2.1