3#ifndef MAP_ELITES_SELECTION_METRICS_H
4#define MAP_ELITES_SELECTION_METRICS_H
8#include "selector/mapElites/mapElitesDescriptor.h"
9#include "selector/selectionMetrics.h"
31 std::map<std::shared_ptr<const MapElitesDescriptor>,
43 std::vector<std::shared_ptr<const MapElitesDescriptor>>
46 for (
auto descriptor : descriptors) {
61 const std::map<std::shared_ptr<const MapElitesDescriptor>,
76 const std::map<std::shared_ptr<const MapElitesDescriptor>,
107 virtual void weightedSum(std::shared_ptr<SelectionMetrics> other,
109 size_t nbEvaluationOther)
override;
Interface for creating a Learning Environment.
Definition learningEnvironment.h:81
Class to extract metrics from either the agent or the environment.
Definition mapElitesSelectionMetrics.h:24
std::map< std::shared_ptr< const MapElitesDescriptor >, std::vector< double > > mapDescriptors
Map storing a descriptor and a Vector storing a double value per descriptor (i.e. per Action) of a cl...
Definition mapElitesSelectionMetrics.h:33
MapElitesSelectionMetrics(std::vector< std::shared_ptr< const MapElitesDescriptor > > descriptors)
Default constructor of MapEliteselectionMetrics with a vector of descriptors.
Definition mapElitesSelectionMetrics.h:42
virtual void weightedSum(std::shared_ptr< SelectionMetrics > other, size_t nbEvaluation, size_t nbEvaluationOther) override
Specialization of weightedSum method to add the score per class and nbEvalPerClass.
Definition mapElitesSelectionMetrics.cpp:44
MapElitesSelectionMetrics(double score)
Constructor of MapEliteselectionMetrics with a vector of scores.
Definition mapElitesSelectionMetrics.h:71
void initMetrics(const TPG::TPGVertex *agent, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the initialisation of the metrics.
Definition mapElitesSelectionMetrics.cpp:12
const std::map< std::shared_ptr< const MapElitesDescriptor >, std::vector< double > > & getMapDescriptors() const
Get a const ref to the scorePerClass attribute.
Definition mapElitesSelectionMetrics.cpp:7
void extractMetricsStep(const TPG::TPGVertex *agent, std::vector< double > actionValues, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the extraction of the metrics at the end of an episode.
Definition mapElitesSelectionMetrics.cpp:21
MapElitesSelectionMetrics(double score, const std::map< std::shared_ptr< const MapElitesDescriptor >, std::vector< double > > &mapDescriptors)
Constructor of MapEliteselectionMetrics with a vector of scores.
Definition mapElitesSelectionMetrics.h:59
void extractMetricsEpisode(const TPG::TPGVertex *agent, size_t nbStepsExecuted, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the extraction of the metrics at the end of an episode.
Definition mapElitesSelectionMetrics.cpp:31
Class to extract metrics from either the agent or the environment.
Definition selectionMetrics.h:18
double score
Definition selectionMetrics.h:23
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition mapElitesArchiveLogger.h:45