36#ifndef MAP_ELITES_SELECTION_METRICS_H
37#define MAP_ELITES_SELECTION_METRICS_H
41#include "selector/mapElites/mapElitesDescriptor.h"
42#include "selector/selectionMetrics.h"
64 std::map<std::shared_ptr<const MapElitesDescriptor>,
76 std::vector<std::shared_ptr<const MapElitesDescriptor>>
79 for (
auto descriptor : descriptors) {
94 const std::map<std::shared_ptr<const MapElitesDescriptor>,
109 const std::map<std::shared_ptr<const MapElitesDescriptor>,
110 std::vector<double>>&
140 virtual void weightedSum(std::shared_ptr<SelectionMetrics> other,
142 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:57
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:66
MapElitesSelectionMetrics(std::vector< std::shared_ptr< const MapElitesDescriptor > > descriptors)
Default constructor of MapEliteselectionMetrics with a vector of descriptors.
Definition mapElitesSelectionMetrics.h:75
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:77
MapElitesSelectionMetrics(double score)
Constructor of MapEliteselectionMetrics with a vector of scores.
Definition mapElitesSelectionMetrics.h:104
void initMetrics(const TPG::TPGVertex *agent, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the initialisation of the metrics.
Definition mapElitesSelectionMetrics.cpp:45
const std::map< std::shared_ptr< const MapElitesDescriptor >, std::vector< double > > & getMapDescriptors() const
Get a const ref to the scorePerClass attribute.
Definition mapElitesSelectionMetrics.cpp:40
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:54
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:92
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:64
Class to extract metrics from either the agent or the environment.
Definition selectionMetrics.h:52
double score
Definition selectionMetrics.h:57
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition mapElitesArchiveLogger.h:45