mlpy.agents.modules.FollowPolicyModule¶
-
class
mlpy.agents.modules.
FollowPolicyModule
(policies)[source]¶ Bases:
mlpy.agents.modules.IAgentModule
The follow policy agent module.
The follow policy agent module follows a given policy choosing the next action based on that policy.
Parameters: policies : array_like, shape (n, nfeatures, ni)
A list of policies (i.e., action sequences), where n is the number of policies, nfeatures is the number of action features, and ni is the sequence length.
Attributes
mid
The module’s unique identifier. Methods
change_policies
(policies)Exchange the list of policies. choose_action
(_)Choose the next action. cleanup
()Cleanup the agent module. end
(experience)End the learning agent module. init
()Initialize the follow policy agent module. is_complete
()Check if the agent module has completed. 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
(state)Execute the agent module. terminate
(value)Set the termination flag.