GEGELATI
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Selector::TimingSelectionMetrics Class Reference

Decorator on SelectionMetrics class to add timing informations. More...

#include <timingSelectionMetrics.h>

Inheritance diagram for Selector::TimingSelectionMetrics:
Selector::SelectionMetrics

Public Member Functions

virtual ~TimingSelectionMetrics ()=default
 Default destructor.
 
double getAgentTime () const
 Return the execution time of learning agent.
 
double getLeTime () const
 Return the execution time of learning environment.
 
size_t getNbActions () const
 Return the number of actions performed.
 
double getScore () const override
 
double getUtility () const override
 
 TimingSelectionMetrics (std::shared_ptr< SelectionMetrics > obj)
 Constructor for the SelectionMetrics with timing.
 
void extractMetricsStep (const TPG::TPGVertex *agent, const std::vector< double > actionValues, const Learn::LearningEnvironment &learningEnvironment) override
 Forward to wrapped method.
 
void extractMetricsEpisodeWithTiming (const TPG::TPGVertex *agent, size_t nbStepsExecuted, const Learn::LearningEnvironment &learningEnvironment, double agentTimeEpisode, double leTimeEpisode)
 Specialization of extractMetricsEpisode to add timings.
 
void weightedSum (std::shared_ptr< SelectionMetrics > other, size_t nbEvaluation, size_t nbEvaluationOther) override
 Specialization of weightedSum to add timings and nbActions.
 
- Public Member Functions inherited from Selector::SelectionMetrics
 SelectionMetrics ()=default
 Default constructor.
 
virtual ~SelectionMetrics ()=default
 Default destructor.
 
 SelectionMetrics (double score, double utility=0)
 Constructor with score and utility initialization.
 
virtual void initMetrics (const TPG::TPGVertex *agent, const Learn::LearningEnvironment &learningEnvironment)
 Init the metrics for the agent in the learning environment.
 
virtual void extractMetricsEpisode (const TPG::TPGVertex *agent, size_t nbStepsExecuted, const Learn::LearningEnvironment &learningEnvironment)
 Extract metrics from the agent in the learning environment.
 

Protected Attributes

std::shared_ptr< SelectionMetricswrapped
 wrapped SelectionMetrics to time.
 
double agentTime = 0
 Execution time of learning agent.
 
double leTime = 0
 Execution time of learning environment.
 
size_t nbActions = 0
 Number of actions performed.
 
- Protected Attributes inherited from Selector::SelectionMetrics
double score = 0
 
double utility = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from Selector::SelectionMetrics
template<class T >
static T weightedSum (T value, T valueOther, size_t nbEvaluation, size_t nbEvaluationOther)
 Perform a weighted sum between 2 values.
 

Detailed Description

Decorator on SelectionMetrics class to add timing informations.

Constructor & Destructor Documentation

◆ TimingSelectionMetrics()

Selector::TimingSelectionMetrics::TimingSelectionMetrics ( std::shared_ptr< SelectionMetrics > obj)
inlineexplicit

Constructor for the SelectionMetrics with timing.

Parameters
objSelectionMetrics being timed.

Member Function Documentation

◆ extractMetricsEpisodeWithTiming()

void Selector::TimingSelectionMetrics::extractMetricsEpisodeWithTiming ( const TPG::TPGVertex * agent,
size_t nbStepsExecuted,
const Learn::LearningEnvironment & learningEnvironment,
double agentTimeEpisode,
double leTimeEpisode )

Specialization of extractMetricsEpisode to add timings.

Parameters
[in]agentthe TPGVertex representing the agent
[in]nbStepsExecutednumber of steps executed at the end of the episode
[in]learningEnvironmentthe learning environment in which the agent is evaluated.
[in]agentTimeEpisodeexecution time of learning agent.
[in]leTimeEpisodeexecution time of learning environment.

◆ extractMetricsStep()

void Selector::TimingSelectionMetrics::extractMetricsStep ( const TPG::TPGVertex * agent,
const std::vector< double > actionValues,
const Learn::LearningEnvironment & learningEnvironment )
overridevirtual

Forward to wrapped method.

Copyright or © or Copr. IETR/INSA - Rennes (2026) :

Mickaël Dardaillon mdard.nosp@m.ail@.nosp@m.insa-.nosp@m.renn.nosp@m.es.fr (2026)

GEGELATI is an open-source reinforcement learning framework for training artificial intelligence based on Tangled Program Graphs (TPGs).

This software is governed by the CeCILL-C license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.

In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.

The fact that you are presently reading this means that you have had knowledge of the CeCILL-C license and that you accept its terms.

Reimplemented from Selector::SelectionMetrics.

◆ getAgentTime()

double Selector::TimingSelectionMetrics::getAgentTime ( ) const
inline

Return the execution time of learning agent.

Returns
Execution time of learning agent.

◆ getLeTime()

double Selector::TimingSelectionMetrics::getLeTime ( ) const
inline

Return the execution time of learning environment.

Returns
Execution time of learning environment.

◆ getNbActions()

size_t Selector::TimingSelectionMetrics::getNbActions ( ) const
inline

Return the number of actions performed.

Returns
Number of actions performed.

◆ getScore()

double Selector::TimingSelectionMetrics::getScore ( ) const
inlineoverridevirtual

Return the score of the agent.

Reimplemented from Selector::SelectionMetrics.

◆ getUtility()

double Selector::TimingSelectionMetrics::getUtility ( ) const
inlineoverridevirtual

Return the utility of the agent.

Reimplemented from Selector::SelectionMetrics.

◆ weightedSum()

void Selector::TimingSelectionMetrics::weightedSum ( std::shared_ptr< SelectionMetrics > other,
size_t nbEvaluation,
size_t nbEvaluationOther )
overridevirtual

Specialization of weightedSum to add timings and nbActions.

Reimplemented from Selector::SelectionMetrics.


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