aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
gum::RandomDecider Class Reference

Class to make decision randomly. More...

#include <agrum/FMDP/decision/randomDecider.h>

Inheritance diagram for gum::RandomDecider:
[legend]
Collaboration diagram for gum::RandomDecider:
[legend]

Public Member Functions

Constructor & destructor.
 RandomDecider ()
 Constructor.
 ~RandomDecider () override=default
 Destructor.
Incremental methods
void checkState (const Instantiation &newState, Idx actionId) override
ActionSet stateOptimalPolicy (const Instantiation &curState) override
Initialization
virtual void initialize (const FMDP< double > *fmdp)
 Initializes the learner.

Incremental methods

void setOptimalStrategy (MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy > *optPol)
const MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy > * optPol_ {nullptr}
ActionSet allActions_

Detailed Description

Class to make decision randomly.

Does nothing more than the interface for DecisionStrategy does

Definition at line 70 of file randomDecider.h.

Constructor & Destructor Documentation

◆ RandomDecider()

INLINE gum::RandomDecider::RandomDecider ( )
default

Constructor.

Referenced by gum::SDYNA::RandomMDDInstance(), and gum::SDYNA::RandomTreeInstance().

Here is the caller graph for this function:

◆ ~RandomDecider()

gum::RandomDecider::~RandomDecider ( )
overridedefault

Destructor.

References checkState(), and stateOptimalPolicy().

Here is the call graph for this function:

Member Function Documentation

◆ checkState()

INLINE void gum::RandomDecider::checkState ( const Instantiation & newState,
Idx actionId )
overridevirtual

Implements gum::IDecisionStrategy.

Definition at line 50 of file randomDecider_inl.h.

50{}

Referenced by ~RandomDecider().

Here is the caller graph for this function:

◆ initialize()

INLINE void gum::IDecisionStrategy::initialize ( const FMDP< double > * fmdp)
virtualinherited

Initializes the learner.

Reimplemented in gum::AdaptiveRMaxPlaner, and gum::E_GreedyDecider.

Definition at line 48 of file IDecisionStrategy_inl.h.

48 {
49 optPol_ = nullptr;
50 if (allActions_.size() == 0)
51 for (auto actionIter = fmdp->beginActions(); actionIter != fmdp->endActions(); ++actionIter)
52 allActions_ += *actionIter;
53 }
Size size() const
Gives the size.
const MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy > * optPol_

References allActions_, gum::FMDP< GUM_ELEMENT >::beginActions(), gum::FMDP< GUM_ELEMENT >::endActions(), optPol_, and gum::ActionSet::size().

Referenced by ~IDecisionStrategy(), gum::AdaptiveRMaxPlaner::initialize(), gum::E_GreedyDecider::initialize(), and gum::SDYNA::initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOptimalStrategy()

INLINE void gum::IDecisionStrategy::setOptimalStrategy ( MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy > * optPol)
inherited

Definition at line 55 of file IDecisionStrategy_inl.h.

56 {
57 optPol_ = optPol;
58 }

References optPol_.

Referenced by checkState(), and gum::SDYNA::makePlanning().

Here is the caller graph for this function:

◆ stateOptimalPolicy()

INLINE ActionSet gum::RandomDecider::stateOptimalPolicy ( const Instantiation & curState)
overridevirtual

Reimplemented from gum::IDecisionStrategy.

Definition at line 52 of file randomDecider_inl.h.

52 {
53 return allActions_;
54 }

References gum::IDecisionStrategy::allActions_.

Referenced by ~RandomDecider().

Here is the caller graph for this function:

Member Data Documentation

◆ allActions_

ActionSet gum::IDecisionStrategy::allActions_
protectedinherited

◆ optPol_

const MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy >* gum::IDecisionStrategy::optPol_ {nullptr}
protectedinherited

Definition at line 112 of file IDecisionStrategy.h.

Referenced by initialize(), setOptimalStrategy(), and stateOptimalPolicy().


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