mlpy.agents.modules.AgentModuleFactory.create

static AgentModuleFactory.create(_type, *args, **kwargs)[source]

Create an agent module of the given type.

Parameters:

_type : str

The agent module type. Valid agent module types:

followpolicymodule

The agent follows a given policy: a FollowPolicyModule is created.

learningmodule

The agent learns according to a specified learner: a LearningModule is created.

usermodule

The agent is user controlled via keyboard or PS2 controller: a UserModule is created.

args : tuple, optional

Positional arguments passed to the class of the given type for initialization.

kwargs : dict, optional

Non-positional arguments passed to the class of the given type for initialization.

Returns:

IAgentModule :

Agent model instance of given type.