mlpack
Public Types | Public Member Functions | List of all members
mlpack::rl::AggregatedPolicy< PolicyType > Class Template Reference

#include <aggregated_policy.hpp>

Public Types

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

Public Member Functions

 AggregatedPolicy (std::vector< PolicyType > policies, const arma::colvec &distribution)
 
ActionType Sample (const arma::colvec &actionValue, bool deterministic=false)
 Sample an action based on given action values. More...
 
void Anneal ()
 Exploration probability will anneal at each step.
 

Detailed Description

template<typename PolicyType>
class mlpack::rl::AggregatedPolicy< PolicyType >

Template Parameters
PolicyTypeThe type of the child policy.

Constructor & Destructor Documentation

◆ AggregatedPolicy()

template<typename PolicyType >
mlpack::rl::AggregatedPolicy< PolicyType >::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.

Member Function Documentation

◆ Sample()

template<typename PolicyType >
ActionType mlpack::rl::AggregatedPolicy< PolicyType >::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.

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