Template Class ModelSampling

Class Documentation

template<typename StateType, typename ValueType>
class ModelSampling

Public Types

typedef StateType ActionType

Public Functions

ModelSampling()
ModelSampling(const uint_fast32_t &seed)
ActionType sampleActionOfState(const StateType &current_state_id, const ExplorationInformation<StateType, ValueType> &exploration_information) const

Sample a single action leaving the current state depending on the sampling strategy (for StatisticalMC)

Parameters:
  • current_state_id – The state ID the action must start from

  • exploration_information – Model-related data, associating state and action IDs together

Returns:

The sampled action ID

StateType sampleSuccessorFromAction(const ActionType &chosenAction, const ExplorationInformation<StateType, ValueType> &exploration_information) const

Sample the state that will be reached by selecting a specific action (for StatisticalMC)

Parameters:
  • chosenAction – The ID of the selected action

  • exploration_information – Model-related data, associating state and action IDs together

Returns:

The sampled state ID