1#ifndef TIMING_SELECTION_METRICS_H
2#define TIMING_SELECTION_METRICS_H
4#include "selector/selectionMetrics.h"
12 std::shared_ptr<SelectionMetrics>
wrapped;
71 const TPG::TPGVertex* agent,
const std::vector<double> actionValues,
85 double agentTimeEpisode,
double leTimeEpisode);
88 void weightedSum(std::shared_ptr<SelectionMetrics> other,
90 size_t nbEvaluationOther)
override;
95 bool operator<(std::shared_ptr<TimingSelectionMetrics> a,
96 std::shared_ptr<TimingSelectionMetrics> b);
100 bool operator<(std::shared_ptr<SelectionMetrics> a,
101 std::shared_ptr<TimingSelectionMetrics> b);
105 bool operator<(std::shared_ptr<TimingSelectionMetrics> a,
106 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:18
Decorator on SelectionMetrics class to add timing informations.
Definition timingSelectionMetrics.h:9
double agentTime
Execution time of learning agent.
Definition timingSelectionMetrics.h:15
std::shared_ptr< SelectionMetrics > wrapped
wrapped SelectionMetrics to time.
Definition timingSelectionMetrics.h:12
TimingSelectionMetrics(std::shared_ptr< SelectionMetrics > obj)
Constructor for the SelectionMetrics with timing.
Definition timingSelectionMetrics.h:66
double getUtility() const override
Definition timingSelectionMetrics.h:59
size_t nbActions
Number of actions performed.
Definition timingSelectionMetrics.h:21
double getAgentTime() const
Return the execution time of learning agent.
Definition timingSelectionMetrics.h:29
size_t getNbActions() const
Return the number of actions performed.
Definition timingSelectionMetrics.h:43
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:22
double leTime
Execution time of learning environment.
Definition timingSelectionMetrics.h:18
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:10
void extractMetricsStep(const TPG::TPGVertex *agent, const std::vector< double > actionValues, const Learn::LearningEnvironment &learningEnvironment) override
Forward to wrapped method.
Definition timingSelectionMetrics.cpp:3
double getScore() const override
Definition timingSelectionMetrics.h:51
virtual ~TimingSelectionMetrics()=default
Default destructor.
double getLeTime() const
Return the execution time of learning environment.
Definition timingSelectionMetrics.h:36
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:40