GEGELATI

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Selector::MapElites::MapElitesDescriptor Class Referenceabstract

Abstract class representing a descriptor for Map Elites selection. More...

`#include <mapElitesDescriptor.h>`

Inheritance diagram for Selector::MapElites::MapElitesDescriptor:

## Public Member Functions
virtual bool | isInit () const
| method that return if the initDescriptor method has been executed
virtual void | initDescriptor (const TPG::TPGGraph &graph, const Learn::LearningEnvironment &learningEnvironment)=0
| initiate the descriptor attribute (such as nbDescriptors and min/max ranges)
virtual std::string | getName () const =0
| abstract method returning the name of the descriptor.
virtual std::pair< double, double > | getMinAndMaxRange () const
| Get the min and max range of the descriptor.
virtual size_t | getNbDescriptors () const
| Get the number of the descriptor.
virtual void | extractMetricsStep (std::vector< double > &metrics, const TPG::TPGVertex *agent, std::vector< double > actionValues, const Learn::LearningEnvironment &learningEnvironment) const
| Extract the metrics at each step of the evaluation.
virtual void | extractMetricsEpisode (std::vector< double > &metrics, const TPG::TPGVertex *agent, size_t nbStepsExecuted, const Learn::LearningEnvironment &learningEnvironment) const
| Extract the metrics at the end of the evaluation episode.

## Protected Attributes
size_t | nbDescriptors
| Number of descriptor.
double | minRange
| Minimum value in the archive.
double | maxRange
| Maximum value in the archive.
bool | init = false

## Detailed Description

Abstract class representing a descriptor for Map Elites selection.

This class need to be inherrit to create specific descriptors. Example of descriptors are given in selector/mapElites/mapElitesDefaultDescriptors

## Member Function Documentation

## ◆ extractMetricsEpisode()

virtual void Selector::MapElites::MapElitesDescriptor::extractMetricsEpisode | ( | std::vector< double > & | metrics,
|  | const TPG::TPGVertex * | agent,
|  | size_t | nbStepsExecuted,
|  | const Learn::LearningEnvironment & | learningEnvironment ) const
| inlinevirtual

Extract the metrics at the end of the evaluation episode.

Parameters

  [in] | metrics | vector of current extracted metrics
  [in] | agent | the TPGVertex being evaluated.
  [in] | nbStepsExecuted | number of steps executed at the end of the episode.
  [in] | learningEnvironment | the learning environment used to get the metrics.

Reimplemented in Selector::MapElites::DefaultDescriptors::ActionValues.

## ◆ extractMetricsStep()

virtual void Selector::MapElites::MapElitesDescriptor::extractMetricsStep | ( | std::vector< double > & | metrics,
|  | const TPG::TPGVertex * | agent,
|  | std::vector< double > | actionValues,
|  | const Learn::LearningEnvironment & | learningEnvironment ) const
| inlinevirtual

Extract the metrics at each step of the evaluation.

Parameters

  [in] | metrics | vector of current extracted metrics
  [in] | agent | the TPGVertex being evaluated.
  [in] | actionValues | the action values taken by the agent at this step.
  [in] | learningEnvironment | the learning environment used to get the metrics.

Reimplemented in Selector::MapElites::DefaultDescriptors::ActionValues.

## ◆ getName()

virtual std::string Selector::MapElites::MapElitesDescriptor::getName | ( |  | ) | const
| pure virtual

abstract method returning the name of the descriptor.

Implemented in Selector::MapElites::DefaultDescriptors::ActionValues.

## ◆ initDescriptor()

virtual void Selector::MapElites::MapElitesDescriptor::initDescriptor | ( | const TPG::TPGGraph & | graph,
|  | const Learn::LearningEnvironment & | learningEnvironment )
| pure virtual

initiate the descriptor attribute (such as nbDescriptors and min/max ranges)

Parameters

  [in] | graph | current graph
  [in] | learningEnvironment | the learning environment used

Implemented in Selector::MapElites::DefaultDescriptors::ActionValues.

## Member Data Documentation

## ◆ init

bool Selector::MapElites::MapElitesDescriptor::init = false
| protected

Boolean value to check if the initDescriptor method has been executed.

The documentation for this class was generated from the following file:

- D:/a/gegelati/gegelati/gegelatilib/include/selector/mapElites/mapElitesDescriptor.h