36#ifndef TIMING_SELECTION_METRICS_H
37#define TIMING_SELECTION_METRICS_H
39#include "selector/selectionMetrics.h"
47 std::shared_ptr<SelectionMetrics>
wrapped;
106 const TPG::TPGVertex* agent,
const std::vector<double> actionValues,
120 double agentTimeEpisode,
double leTimeEpisode);
123 void weightedSum(std::shared_ptr<SelectionMetrics> other,
125 size_t nbEvaluationOther)
override;
130 bool operator<(std::shared_ptr<TimingSelectionMetrics> a,
131 std::shared_ptr<TimingSelectionMetrics> b);
135 bool operator<(std::shared_ptr<SelectionMetrics> a,
136 std::shared_ptr<TimingSelectionMetrics> b);
140 bool operator<(std::shared_ptr<TimingSelectionMetrics> a,
141 std::shared_ptr<SelectionMetrics> b);
Interface for creating a Learning Environment.
Definition learningEnvironment.h:81
Class to extract metrics from either the agent or the environment.
Definition selectionMetrics.h:52
Decorator on SelectionMetrics class to add timing informations.
Definition timingSelectionMetrics.h:44
double agentTime
Execution time of learning agent.
Definition timingSelectionMetrics.h:50
std::shared_ptr< SelectionMetrics > wrapped
wrapped SelectionMetrics to time.
Definition timingSelectionMetrics.h:47
TimingSelectionMetrics(std::shared_ptr< SelectionMetrics > obj)
Constructor for the SelectionMetrics with timing.
Definition timingSelectionMetrics.h:101
double getUtility() const override
Definition timingSelectionMetrics.h:94
size_t nbActions
Number of actions performed.
Definition timingSelectionMetrics.h:56
double getAgentTime() const
Return the execution time of learning agent.
Definition timingSelectionMetrics.h:64
size_t getNbActions() const
Return the number of actions performed.
Definition timingSelectionMetrics.h:78
void weightedSum(std::shared_ptr< SelectionMetrics > other, size_t nbEvaluation, size_t nbEvaluationOther) override
Specialization of weightedSum to add timings and nbActions.
Definition timingSelectionMetrics.cpp:57
double leTime
Execution time of learning environment.
Definition timingSelectionMetrics.h:53
void extractMetricsEpisodeWithTiming(const TPG::TPGVertex *agent, size_t nbStepsExecuted, const Learn::LearningEnvironment &learningEnvironment, double agentTimeEpisode, double leTimeEpisode)
Specialization of extractMetricsEpisode to add timings.
Definition timingSelectionMetrics.cpp:45
void extractMetricsStep(const TPG::TPGVertex *agent, const std::vector< double > actionValues, const Learn::LearningEnvironment &learningEnvironment) override
Forward to wrapped method.
Definition timingSelectionMetrics.cpp:38
double getScore() const override
Definition timingSelectionMetrics.h:86
virtual ~TimingSelectionMetrics()=default
Default destructor.
double getLeTime() const
Return the execution time of learning environment.
Definition timingSelectionMetrics.h:71
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition mapElitesArchiveLogger.h:45
bool operator<(std::shared_ptr< SelectionMetrics > a, std::shared_ptr< SelectionMetrics > b)
Comparison function to enable sorting of SelectionMetrics with STL.
Definition selectionMetrics.cpp:75