mlpy.learners.online.rl.RLLearner

class mlpy.learners.online.rl.RLLearner(max_steps=None, filename=None, profile=False)[source]

Bases: mlpy.learners.online.IOnlineLearner

The reinforcement learning learner interface.

Parameters:

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 This learner is of type online.

Methods

choose_action(state) Choose the next action
execute(experience) Execute learning specific updates.
learn([experience]) Learn a policy from the experience.
load(filename) Load the state of the module from file.
reset(t, **kwargs) Reset reinforcement learner.
save(filename) Save the learners state.