mlpy.learners.online.rl.ModelBasedLearner¶
-
class
mlpy.learners.online.rl.
ModelBasedLearner
(planner, filename=None)[source]¶ Bases:
mlpy.learners.online.IOnlineLearner
Performs model based reinforcement learning.
Model based reinforcement learning uses the model and planner provided to make decisions on which action to perform next.
Parameters: planner : IPlanner
The planner to use to determine the best action.
max_steps : int, optional
The maximum number of steps in an iteration. Default is 100.
filename : str, optional
The name of the file to save the learner state to after each iteration. If None is given, the learner state is not saved. Default is None.
profile : bool, optional
Turn on profiling at which point profiling data is collected and saved to a text file. Default is False.
Attributes
mid
The module’s unique identifier. type
Methods
choose_action
(state)Choose the next action end
(experience)End the episode. init
()Initialize the learner. learn
(experience)Learn a policy from the experience. load
(filename)Load the state of the module from file. save
(filename)Save the current state of the module to file. start
()Start an episode. step
(experience)Execute learning specific updates.