![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/simulation/abstractSimulator.h> More...
#include <abstractSimulator.h>
Public Attributes | |
Instantiation | currentState_ |
Tha state in which the system currently is. More... | |
Instantiation | endState_ |
Public Member Functions | |
Constructors, Destructors. | |
AbstractSimulator () | |
Default constructor. More... | |
virtual | ~AbstractSimulator () |
Default destructor. More... | |
Variables | |
virtual const DiscreteVariable * | primeVar (const DiscreteVariable *mainVar)=0 |
Iteration over the variables of the simulated probleme. More... | |
virtual SequenceIteratorSafe< const DiscreteVariable *> | beginVariables ()=0 |
Iteration over the variables of the simulated probleme. More... | |
virtual SequenceIteratorSafe< const DiscreteVariable *> | endVariables ()=0 |
Iteration over the variables of the simulated probleme. More... | |
Actions | |
virtual const std::string & | actionName (Idx)=0 |
Iteration over the variables of the simulated probleme. More... | |
virtual SequenceIteratorSafe< Idx > | beginActions ()=0 |
Iteration over the variables of the simulated probleme. More... | |
virtual SequenceIteratorSafe< Idx > | endActions ()=0 |
Iteration over the variables of the simulated probleme. More... | |
INLINE void | setInitialState (const Instantiation &initialState) |
Sets the intial statefrom which we begun the simulation. More... | |
void | setInitialStateRandomly () |
Sets the intial statefrom which we begun the simulation. More... | |
INLINE void | setEndState (const Instantiation &endState) |
Sets the final states upon which a run is over. More... | |
virtual bool | hasReachEnd () |
Tests if end state has been reached. More... | |
INLINE const Instantiation & | currentState () |
Sets the intial statefrom which we begun the simulation. More... | |
virtual double | reward ()=0 |
Sets the intial statefrom which we begun the simulation. More... | |
virtual void | perform (Idx)=0 |
Sets the intial statefrom which we begun the simulation. More... | |
virtual Instantiation | randomState_ () |
Choses a random state as the first test for a run. More... | |
<agrum/FMDP/simulation/abstractSimulator.h>
A class to simulate a reinforcement learning problem.
Definition at line 47 of file abstractSimulator.h.
gum::AbstractSimulator::AbstractSimulator | ( | ) |
Default constructor.
Definition at line 46 of file abstractSimulator.cpp.
References gum::Set< Key, Alloc >::emplace().
|
virtual |
Default destructor.
Definition at line 54 of file abstractSimulator.cpp.
References gum::Set< Key, Alloc >::emplace().
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::TaxiSimulator, and gum::FMDPSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::TaxiSimulator, and gum::FMDPSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::TaxiSimulator, and gum::FMDPSimulator.
|
inline |
Sets the intial statefrom which we begun the simulation.
Definition at line 87 of file abstractSimulator.h.
References reward().
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::TaxiSimulator, and gum::FMDPSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::TaxiSimulator, and gum::FMDPSimulator.
|
virtual |
Tests if end state has been reached.
Reimplemented in gum::FactorySimulator, and gum::TaxiSimulator.
Definition at line 84 of file abstractSimulator.cpp.
References gum::Set< Key, Alloc >::emplace().
|
pure virtual |
Sets the intial statefrom which we begun the simulation.
Implemented in gum::TaxiSimulator, gum::FactorySimulator, and gum::FMDPSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::TaxiSimulator, and gum::FMDPSimulator.
|
protectedvirtual |
Choses a random state as the first test for a run.
Reimplemented in gum::FactorySimulator, and gum::TaxiSimulator.
Definition at line 72 of file abstractSimulator.cpp.
References gum::Set< Key, Alloc >::emplace().
|
pure virtual |
Sets the intial statefrom which we begun the simulation.
Implemented in gum::TaxiSimulator, gum::FactorySimulator, and gum::FMDPSimulator.
Referenced by currentState(), setEndState(), and setInitialState().
|
inline |
Sets the final states upon which a run is over.
Definition at line 81 of file abstractSimulator.h.
References reward().
|
inline |
Sets the intial statefrom which we begun the simulation.
Definition at line 72 of file abstractSimulator.h.
References reward().
void gum::AbstractSimulator::setInitialStateRandomly | ( | ) |
Sets the intial statefrom which we begun the simulation.
Definition at line 64 of file abstractSimulator.cpp.
References gum::Set< Key, Alloc >::emplace().
Instantiation gum::AbstractSimulator::currentState_ |
Tha state in which the system currently is.
Definition at line 125 of file abstractSimulator.h.
Instantiation gum::AbstractSimulator::endState_ |
Definition at line 125 of file abstractSimulator.h.