GEGELATI
Public Member Functions | List of all members
Learn::AdversarialLearningEnvironment Class Referenceabstract

Interface for creating a Learning Environment in adversarial mode. More...

#include <adversarialLearningEnvironment.h>

Inheritance diagram for Learn::AdversarialLearningEnvironment:
Learn::LearningEnvironment

Public Member Functions

virtual std::shared_ptr< Learn::AdversarialEvaluationResultgetScores () const =0
 Computes scores of each root and returns them. More...
 
double getScore () const override
 Simply returns the first score of the results, allowing compatibility with non adversarial learning agents. More...
 
- Public Member Functions inherited from Learn::LearningEnvironment
 LearningEnvironment ()=delete
 Delete the default constructor of a LearningEnvironment.
 
virtual ~LearningEnvironment ()=default
 Default virtual destructor.
 
 LearningEnvironment (uint64_t nbAct)
 Constructor for LearningEnviroment. More...
 
virtual LearningEnvironmentclone () const
 Get a copy of the LearningEnvironment. More...
 
virtual bool isCopyable () const
 Can the LearningEnvironment be copy constructed to evaluate several LearningAgent in parallel. More...
 
uint64_t getNbActions () const
 Get the number of actions available for this LearningEnvironment. More...
 
virtual void doAction (uint64_t actionID)
 Execute an action on the LearningEnvironment. More...
 
virtual void reset (size_t seed=0, LearningMode mode=LearningMode::TRAINING)=0
 Reset the LearningEnvironment. More...
 
virtual std::vector< std::reference_wrapper< const Data::DataHandler > > getDataSources ()=0
 Get the data sources for this LearningEnvironment. More...
 
virtual double getScore () const =0
 Returns the current score of the Environment. More...
 
virtual bool isTerminal () const =0
 Method for checking if the LearningEnvironment has reached a terminal state. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Learn::LearningEnvironment
 LearningEnvironment (const LearningEnvironment &other)=default
 Make the default copy constructor protected.
 
- Protected Attributes inherited from Learn::LearningEnvironment
const uint64_t nbActions
 

Detailed Description

Interface for creating a Learning Environment in adversarial mode.

The main difference with the base Learning Environment is that several roots will participate in a single simulation. It is the user responsibility to correctly adapt this class to the problem. In fact, there should be 2 overrides that will be different from the basic Learning Environment :

Member Function Documentation

◆ getScore()

double Learn::AdversarialLearningEnvironment::getScore ( ) const
inlineoverridevirtual

Simply returns the first score of the results, allowing compatibility with non adversarial learning agents.

Inherited from LearningEnvironment

Returns
The first score of the evaluation result from getScores().

Implements Learn::LearningEnvironment.

◆ getScores()

virtual std::shared_ptr< Learn::AdversarialEvaluationResult > Learn::AdversarialLearningEnvironment::getScores ( ) const
pure virtual

Computes scores of each root and returns them.

Returns
A shared pointer of an evaluation result containing a score per participant.

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