![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/simulation/abstractSimulator.h> More...
#include <abstractSimulator.h>
Public Member Functions | |
Constructors, Destructors. | |
| AbstractSimulator () | |
| Default constructor. | |
| virtual | ~AbstractSimulator () |
| Default destructor. | |
Variables | |
| virtual const DiscreteVariable * | primeVar (const DiscreteVariable *mainVar)=0 |
| Iteration over the variables of the simulated probleme. | |
| virtual SequenceIteratorSafe< const DiscreteVariable * > | beginVariables ()=0 |
| Iteration over the variables of the simulated probleme. | |
| virtual SequenceIteratorSafe< const DiscreteVariable * > | endVariables ()=0 |
| Iteration over the variables of the simulated probleme. | |
Actions | |
| virtual const std::string & | actionName (Idx)=0 |
| Iteration over the variables of the simulated probleme. | |
| virtual SequenceIteratorSafe< Idx > | beginActions ()=0 |
| Iteration over the variables of the simulated probleme. | |
| virtual SequenceIteratorSafe< Idx > | endActions ()=0 |
| Iteration over the variables of the simulated probleme. | |
Public Attributes | |
| Instantiation | currentState_ |
| Tha state in which the system currently is. | |
| Instantiation | endState_ |
| INLINE void | setInitialState (const Instantiation &initialState) |
| Sets the intial statefrom which we begun the simulation. | |
| void | setInitialStateRandomly () |
| Sets the intial statefrom which we begun the simulation. | |
| INLINE void | setEndState (const Instantiation &endState) |
| Sets the final states upon which a run is over. | |
| virtual bool | hasReachEnd () |
| Tests if end state has been reached. | |
| INLINE const Instantiation & | currentState () |
| Sets the intial statefrom which we begun the simulation. | |
| virtual double | reward ()=0 |
| Sets the intial statefrom which we begun the simulation. | |
| virtual void | perform (Idx)=0 |
| Sets the intial statefrom which we begun the simulation. | |
| virtual Instantiation | randomState_ () |
| Choses a random state as the first test for a run. | |
<agrum/FMDP/simulation/abstractSimulator.h>
A class to simulate a reinforcement learning problem.
Definition at line 67 of file abstractSimulator.h.
| gum::AbstractSimulator::AbstractSimulator | ( | ) |
Default constructor.
Definition at line 65 of file abstractSimulator.cpp.
References AbstractSimulator().
Referenced by AbstractSimulator(), gum::FMDPSimulator::FMDPSimulator(), gum::FMDPSimulator::FMDPSimulator(), gum::TaxiSimulator::TaxiSimulator(), and ~AbstractSimulator().
|
virtual |
Default destructor.
Definition at line 73 of file abstractSimulator.cpp.
References AbstractSimulator().
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
Referenced by randomState_().
|
inline |
Sets the intial statefrom which we begun the simulation.
Definition at line 108 of file abstractSimulator.h.
References currentState_.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
Referenced by randomState_().
|
virtual |
Tests if end state has been reached.
Reimplemented in gum::FactorySimulator, and gum::TaxiSimulator.
Definition at line 100 of file abstractSimulator.cpp.
References currentState_, and endState_.
Referenced by setInitialStateRandomly().
|
pure virtual |
Sets the intial statefrom which we begun the simulation.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
|
pure virtual |
Iteration over the variables of the simulated probleme.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
|
protectedvirtual |
Choses a random state as the first test for a run.
Reimplemented in gum::FactorySimulator, and gum::TaxiSimulator.
Definition at line 90 of file abstractSimulator.cpp.
References gum::Instantiation::add(), beginVariables(), gum::Instantiation::chgVal(), endVariables(), and gum::randomValue().
Referenced by gum::TaxiSimulator::randomState_(), and setInitialStateRandomly().
|
pure virtual |
Sets the intial statefrom which we begun the simulation.
Implemented in gum::FactorySimulator, gum::FMDPSimulator, and gum::TaxiSimulator.
|
inline |
Sets the final states upon which a run is over.
Definition at line 102 of file abstractSimulator.h.
References endState_.
|
inline |
Sets the intial statefrom which we begun the simulation.
Definition at line 92 of file abstractSimulator.h.
References currentState_.
| void gum::AbstractSimulator::setInitialStateRandomly | ( | ) |
Sets the intial statefrom which we begun the simulation.
Definition at line 82 of file abstractSimulator.cpp.
References currentState_, hasReachEnd(), and randomState_().
| Instantiation gum::AbstractSimulator::currentState_ |
Tha state in which the system currently is.
Definition at line 146 of file abstractSimulator.h.
Referenced by gum::TaxiSimulator::_evalReward_(), gum::TaxiSimulator::_performFillUp_(), gum::TaxiSimulator::_performGoEast_(), gum::TaxiSimulator::_performGoNorth_(), gum::TaxiSimulator::_performGoSouth_(), gum::TaxiSimulator::_performGoWest_(), gum::TaxiSimulator::_performPickUp_(), gum::TaxiSimulator::_performPutDown_(), currentState(), hasReachEnd(), gum::FMDPSimulator::perform(), gum::TaxiSimulator::perform(), gum::FMDPSimulator::reward(), setInitialState(), and setInitialStateRandomly().
| Instantiation gum::AbstractSimulator::endState_ |
Definition at line 146 of file abstractSimulator.h.
Referenced by hasReachEnd(), and setEndState().