AIToolbox
A library that offers tools for AI problem solving.
|
This class represents the base interface for policies in games and bandits. More...
#include <AIToolbox/PolicyInterface.hpp>
Public Member Functions | |
PolicyInterface (Action a) | |
Basic constructor. More... | |
virtual | ~PolicyInterface () |
Basic virtual destructor. More... | |
virtual Action | sampleAction () const =0 |
This function chooses a random action, following the policy distribution. More... | |
virtual double | getActionProbability (const Action &a) const =0 |
This function returns the probability of taking the specified action. More... | |
const Action & | getA () const |
This function returns the number of available actions to the agent. More... | |
Protected Attributes | |
Action | A |
RandomEngine | rand_ |
This class represents the base interface for policies in games and bandits.
This specialization simply removes the states from the PolicyInterface, since in normal games and bandits there is no state, and we can simplify the interface. The rest is the same.
Action | This defines the type that is used to handle actions. |
AIToolbox::PolicyInterface< void, void, Action >::PolicyInterface | ( | Action | a | ) |
Basic constructor.
a | The number of actions available to the agent. |
|
virtual |
Basic virtual destructor.
const Action & AIToolbox::PolicyInterface< void, void, Action >::getA |
This function returns the number of available actions to the agent.
|
pure virtual |
This function returns the probability of taking the specified action.
a | The selected action. |
Implemented in AIToolbox::EpsilonPolicyInterface< void, void, Action >.
|
pure virtual |
This function chooses a random action, following the policy distribution.
Implemented in AIToolbox::EpsilonPolicyInterface< void, void, Action >, AIToolbox::Factored::Bandit::MAUCEPolicy, AIToolbox::Factored::Bandit::LLRPolicy, AIToolbox::Factored::Bandit::QGreedyPolicy< Maximizer >, AIToolbox::Factored::Bandit::ThompsonSamplingPolicy, AIToolbox::Factored::Bandit::SingleActionPolicy, and AIToolbox::Factored::Bandit::RandomPolicy.
|
protected |
|
mutableprotected |