AggregatedPolicy< PolicyType > Class Template Reference

Public Types

using ActionType = typename PolicyType::ActionType
 Convenient typedef for action. More...

 

Public Member Functions

 AggregatedPolicy (std::vector< PolicyType > policies, const arma::colvec &distribution)
 
void Anneal ()
 Exploration probability will anneal at each step. More...

 
ActionType Sample (const arma::colvec &actionValue, bool deterministic=false)
 Sample an action based on given action values. More...

 

Detailed Description


template
<
typename
PolicyType
>

class mlpack::rl::AggregatedPolicy< PolicyType >

Template Parameters
PolicyTypeThe type of the child policy.

Definition at line 27 of file aggregated_policy.hpp.

Member Typedef Documentation

◆ ActionType

using ActionType = typename PolicyType::ActionType

Convenient typedef for action.

Definition at line 31 of file aggregated_policy.hpp.

Constructor & Destructor Documentation

◆ AggregatedPolicy()

AggregatedPolicy ( std::vector< PolicyType >  policies,
const arma::colvec &  distribution 
)
inline
Parameters
policiesChild policies.
distributionProbability distribution for each child policy. User should make sure its size is same as the number of policies and the sum of its element is equal to 1.

Definition at line 39 of file aggregated_policy.hpp.

Member Function Documentation

◆ Anneal()

void Anneal ( )
inline

Exploration probability will anneal at each step.

Definition at line 63 of file aggregated_policy.hpp.

◆ Sample()

ActionType Sample ( const arma::colvec &  actionValue,
bool  deterministic = false 
)
inline

Sample an action based on given action values.

Parameters
actionValueValues for each action.
deterministicAlways select the action greedily.
Returns
Sampled action.

Definition at line 52 of file aggregated_policy.hpp.

References DiscreteDistribution::Random().


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.2.1/src/mlpack/methods/reinforcement_learning/policy/aggregated_policy.hpp