AIToolbox
A library that offers tools for AI problem solving.
AIToolbox::POMDP::HeadBeliefNode< UseEntropy > Class Template Reference

This class is the root node of the rPOMCP graph. More...

#include <AIToolbox/POMDP/Algorithms/Utils/rPOMCPGraph.hpp>

Inheritance diagram for AIToolbox::POMDP::HeadBeliefNode< UseEntropy >:
AIToolbox::POMDP::BeliefNode< UseEntropy >

Public Member Functions

 HeadBeliefNode (size_t A, RandomEngine &rand)
 Basic constructor. More...
 
 HeadBeliefNode (size_t A, size_t beliefSize, const AIToolbox::POMDP::Belief &b, RandomEngine &rand)
 Constructor from belief. More...
 
 HeadBeliefNode (size_t A, BeliefNode< UseEntropy > &&bn, RandomEngine &rand)
 Constructor from BeliefNode. More...
 
bool isSampleBeliefEmpty () const
 Whether we have no particles in the sampling belief. More...
 
size_t sampleBelief () const
 Samples the internal sampling belief. More...
 
size_t getMostCommonParticle () const
 Useful if the agents wants a guess of what the current state is. More...
 
- Public Member Functions inherited from AIToolbox::POMDP::BeliefNode< UseEntropy >
 BeliefNode ()
 
void updateBeliefAndKnowledge (size_t s)
 This function updates the knowledge measure after adding a new belief particle. More...
 
double getKnowledgeMeasure () const
 This function returns the current estimate for reward for this node. More...
 
void updateBeliefAndKnowledge (const size_t s)
 
void updateBeliefAndKnowledge (const size_t s)
 

Additional Inherited Members

- Public Attributes inherited from AIToolbox::POMDP::BeliefNode< UseEntropy >
unsigned N
 Counter for number of times we went through this belief node. More...
 
ActionNodes< UseEntropy > children
 
double V
 Estimated value for this belief, taking into account future rewards/actions. More...
 
double actionsV
 Estimated value for the actions (could be mean, max, or other) More...
 
size_t bestAction
 Tracker of best available action in MAX-mode, to select node value. More...
 
- Protected Attributes inherited from AIToolbox::POMDP::BeliefNode< UseEntropy >
TrackBelief< UseEntropy > trackBelief_
 This is a particle belief which is easy to update. More...
 
double knowledgeMeasure_
 Estimated entropy/max-belief for this node. More...
 

Detailed Description

template<bool UseEntropy>
class AIToolbox::POMDP::HeadBeliefNode< UseEntropy >

This class is the root node of the rPOMCP graph.

This converts the unordered belief map of an ordinary belief node into a vector. This should speed up the sampling process considerably, since the head node is the one that gets sampled the most.

Note that for this reason this node does not use the trackBelief_ field. It uses the sampleBelief_ instead.

Constructor & Destructor Documentation

◆ HeadBeliefNode() [1/3]

template<bool UseEntropy>
AIToolbox::POMDP::HeadBeliefNode< UseEntropy >::HeadBeliefNode ( size_t  A,
RandomEngine rand 
)

Basic constructor.

◆ HeadBeliefNode() [2/3]

template<bool UseEntropy>
AIToolbox::POMDP::HeadBeliefNode< UseEntropy >::HeadBeliefNode ( size_t  A,
size_t  beliefSize,
const AIToolbox::POMDP::Belief b,
RandomEngine rand 
)

Constructor from belief.

This constructor samples the input belief in order to create the sample belief. We create beliefSize samples.

We don't store the belief directly since the sampleBelief must also be constructible from the particle beliefs of normal belief nodes (when we use rPOMCP for multiple timesteps). So we use a particle belief in both cases.

◆ HeadBeliefNode() [3/3]

template<bool UseEntropy>
AIToolbox::POMDP::HeadBeliefNode< UseEntropy >::HeadBeliefNode ( size_t  A,
BeliefNode< UseEntropy > &&  bn,
RandomEngine rand 
)

Constructor from BeliefNode.

This constructor converts the input BeliefNode into a new head node. It converts the track belief of the node into our sample belief.

Member Function Documentation

◆ getMostCommonParticle()

template<bool UseEntropy>
size_t AIToolbox::POMDP::HeadBeliefNode< UseEntropy >::getMostCommonParticle

Useful if the agents wants a guess of what the current state is.

◆ isSampleBeliefEmpty()

template<bool UseEntropy>
bool AIToolbox::POMDP::HeadBeliefNode< UseEntropy >::isSampleBeliefEmpty

Whether we have no particles in the sampling belief.

◆ sampleBelief()

template<bool UseEntropy>
size_t AIToolbox::POMDP::HeadBeliefNode< UseEntropy >::sampleBelief

Samples the internal sampling belief.


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