GEGELATI

Loading...
Searching...
No Matches
mapElitesArchiveLogger.h
1
38#ifndef MAP_ELITES_ARCHIVE_LOGGER_H
39#define MAP_ELITES_ARCHIVE_LOGGER_H
40
41#include <iomanip>
42
43#include "log/laLogger.h"
44
45 namespace Selector {
46 namespace MapElites {
47 class MapElitesArchive;
48 }
49} // namespace Selector
50
51namespace Log {
52
56 class MapElitesArchiveLogger : public LALogger
57 {
58 protected:
60 const Selector::MapElites::MapElitesArchive& archive;
61
63 bool firstGenerationEnded = false;
64
65 public:
75 explicit MapElitesArchiveLogger(
76 const Selector::MapElites::MapElitesArchive& archive,
77 Learn::LearningAgent& la, std::ostream& out = std::cout)
78 : LALogger(la, out), archive{archive}
79 {
80
81 // fixing float precision
82 this->logHeader();
83 }
84
90 virtual void logHeader() override;
91
100 virtual void logNewGeneration(uint64_t& generationNumber) override;
101
107 virtual void logEndOfTraining() override;
108 };
109
110} // namespace Log
111
112#endif // MAP_ELITES_ARCHIVE_LOGGER_H
Learn::LearningAgent
Class used to control the learning steps of a TPGGraph within a given LearningEnvironment.
Definition learningAgent.h:67
Log::LALogger
Learning Agent logger class that will be called during LearningAgent executions.
Definition laLogger.h:65
Log::MapElitesArchiveLogger
MapElitesArchive logger that will display some useful information.
Definition mapElitesArchiveLogger.h:57
Log::MapElitesArchiveLogger::logHeader
virtual void logHeader() override
Logs the header (column names) of the csv archive.
Definition mapElitesArchiveLogger.cpp:46
Log::MapElitesArchiveLogger::archive
const Selector::MapElites::MapElitesArchive & archive
archive of the mapElitesSelector
Definition mapElitesArchiveLogger.h:60
Log::MapElitesArchiveLogger::firstGenerationEnded
bool firstGenerationEnded
If first generation if finished or not.
Definition mapElitesArchiveLogger.h:63
Log::MapElitesArchiveLogger::MapElitesArchiveLogger
MapElitesArchiveLogger(const Selector::MapElites::MapElitesArchive &archive, Learn::LearningAgent &la, std::ostream &out=std::cout)
Same constructor as LaLogger. Default output is cout.
Definition mapElitesArchiveLogger.h:75
Log::MapElitesArchiveLogger::logNewGeneration
virtual void logNewGeneration(uint64_t &generationNumber) override
Logs the generation of training.
Definition mapElitesArchiveLogger.cpp:88
Log::MapElitesArchiveLogger::logEndOfTraining
virtual void logEndOfTraining() override
Logs the values of the archive.
Definition mapElitesArchiveLogger.cpp:93
Selector::MapElites::MapElitesArchive
Class representing a Map Elites archive.
Definition mapElitesArchive.h:25
Log
Definition cycleDetectionLALogger.h:38
Selector
Definition mapElitesArchiveLogger.h:45