![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
The general SDyna architecture abstract class. More...
#include <agrum/FMDP/SDyna/sdyna.h>
Public Member Functions | |
std::string | toString () |
Returns. More... | |
std::string | optimalPolicy2String () |
Problem specification methods | |
void | addAction (const Idx actionId, const std::string &actionName) |
Inserts a new action in the SDyna instance. More... | |
void | addVariable (const DiscreteVariable *var) |
Inserts a new variable in the SDyna instance. More... | |
Initialization | |
void | initialize () |
Initializes the Sdyna instance. More... | |
void | initialize (const Instantiation &initialState) |
Initializes the Sdyna instance at given state. More... | |
Incremental methods | |
void | setCurrentState (const Instantiation ¤tState) |
Sets last state visited to the given state. More... | |
Idx | takeAction (const Instantiation &curState) |
Idx | takeAction () |
void | feedback (const Instantiation &originalState, const Instantiation &reachedState, Idx performedAction, double obtainedReward) |
Performs a feedback on the last transition. More... | |
void | feedback (const Instantiation &reachedState, double obtainedReward) |
Performs a feedback on the last transition. More... | |
void | makePlanning (Idx nbStep) |
Starts a new planning. More... | |
Size methods | |
just to get the size of the different data structure for performance evaluation purposes only | |
Size | learnerSize () |
learnerSize More... | |
Size | modelSize () |
modelSize More... | |
Size | valueFunctionSize () |
valueFunctionSize More... | |
Size | optimalPolicySize () |
optimalPolicySize More... | |
Static Public Member Functions | |
static SDYNA * | spitiInstance (double attributeSelectionThreshold=0.99, double discountFactor=0.9, double epsilon=1, Idx observationPhaseLenght=100, Idx nbValueIterationStep=10) |
@ More... | |
static SDYNA * | spimddiInstance (double attributeSelectionThreshold=0.99, double similarityThreshold=0.3, double discountFactor=0.9, double epsilon=1, Idx observationPhaseLenght=100, Idx nbValueIterationStep=10) |
@ More... | |
static SDYNA * | RMaxMDDInstance (double attributeSelectionThreshold=0.99, double similarityThreshold=0.3, double discountFactor=0.9, double epsilon=1, Idx observationPhaseLenght=100, Idx nbValueIterationStep=10) |
@ More... | |
static SDYNA * | RMaxTreeInstance (double attributeSelectionThreshold=0.99, double discountFactor=0.9, double epsilon=1, Idx observationPhaseLenght=100, Idx nbValueIterationStep=10) |
@ More... | |
static SDYNA * | RandomMDDInstance (double attributeSelectionThreshold=0.99, double similarityThreshold=0.3, double discountFactor=0.9, double epsilon=1, Idx observationPhaseLenght=100, Idx nbValueIterationStep=10) |
@ More... | |
static SDYNA * | RandomTreeInstance (double attributeSelectionThreshold=0.99, double discountFactor=0.9, double epsilon=1, Idx observationPhaseLenght=100, Idx nbValueIterationStep=10) |
@ More... | |
Protected Attributes | |
FMDP< double > * | fmdp_ |
The learnt Markovian Decision Process. More... | |
Instantiation | lastState_ |
The state in which the system is before we perform a new action. More... | |
Constructor & destructor. | |
SDYNA (ILearningStrategy *learner, IPlanningStrategy< double > *planer, IDecisionStrategy *decider, Idx observationPhaseLenght, Idx nbValueIterationStep, bool actionReward, bool verbose=true) | |
Constructor. More... | |
~SDYNA () | |
Destructor. More... | |
The general SDyna architecture abstract class.
Instance of SDyna architecture should inherit
|
private |
Constructor.
Definition at line 57 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
gum::SDYNA::~SDYNA | ( | ) |
Destructor.
Definition at line 78 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Inserts a new action in the SDyna instance.
actionId | : an id to identify the action |
actionName | : its human name |
Definition at line 238 of file sdyna.h.
|
inline |
Inserts a new variable in the SDyna instance.
var | : the var to be added. Note that variable may or may not have all its modalities given. If not they will be discovered by the SDyna architecture during the process |
Definition at line 252 of file sdyna.h.
void gum::SDYNA::feedback | ( | const Instantiation & | originalState, |
const Instantiation & | reachedState, | ||
Idx | performedAction, | ||
double | obtainedReward | ||
) |
Performs a feedback on the last transition.
Incremental methods.
In extenso, learn from the transition.
originalState | : the state we were in before the transition |
reachedState | : the state we reached after |
performedAction | : the action we performed |
obtainedReward | : the reward we obtained |
Definition at line 129 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
void gum::SDYNA::feedback | ( | const Instantiation & | reachedState, |
double | obtainedReward | ||
) |
Performs a feedback on the last transition.
In extenso, learn from the transition.
reachedState | : the state reached after the transition |
obtainedReward | : the reward obtained during the transition |
Definition at line 149 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
void gum::SDYNA::initialize | ( | ) |
Initializes the Sdyna instance.
Definition at line 97 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
void gum::SDYNA::initialize | ( | const Instantiation & | initialState | ) |
Initializes the Sdyna instance at given state.
initialState | : the state of the studied system from which we will begin the explore, learn and exploit process |
Definition at line 110 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
|
inline |
learnerSize
Definition at line 379 of file sdyna.h.
void gum::SDYNA::makePlanning | ( | Idx | nbStep | ) |
Starts a new planning.
nbStep | : the maximal number of value iteration performed in this planning |
Definition at line 188 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
|
inline |
modelSize
Definition at line 387 of file sdyna.h.
|
inline |
Definition at line 363 of file sdyna.h.
|
inline |
optimalPolicySize
Definition at line 403 of file sdyna.h.
|
inlinestatic |
@
Definition at line 157 of file sdyna.h.
|
inlinestatic |
@
Definition at line 177 of file sdyna.h.
|
inlinestatic |
@
Definition at line 119 of file sdyna.h.
|
inlinestatic |
@
Definition at line 140 of file sdyna.h.
|
inline |
Sets last state visited to the given state.
During the learning process, we will consider that were in this state before the transition.
currentState | : the state |
Definition at line 294 of file sdyna.h.
|
inlinestatic |
@
Definition at line 93 of file sdyna.h.
|
inlinestatic |
@
Definition at line 75 of file sdyna.h.
Idx gum::SDYNA::takeAction | ( | const Instantiation & | curState | ) |
curState | the state in which we currently are |
Definition at line 206 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
Idx gum::SDYNA::takeAction | ( | ) |
Definition at line 216 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
std::string gum::SDYNA::toString | ( | ) |
Returns.
Definition at line 230 of file sdyna.cpp.
References gum::Set< Key, Alloc >::emplace().
|
inline |
valueFunctionSize
Definition at line 395 of file sdyna.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |