Package ch.idsia.agents.controllers
Class MarioAgentBase
java.lang.Object
ch.idsia.agents.controllers.MarioAgentBase
- All Implemented Interfaces:
IAgent
- Direct Known Subclasses:
KeyboardAgent,MarioAIBase,TimingAgent
public abstract class MarioAgentBase extends java.lang.Object implements IAgent
Abstract class that serves as a basis for implementing new Mario agents.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringname -
Constructor Summary
Constructors Constructor Description MarioAgentBase(java.lang.String agentName) -
Method Summary
Modifier and Type Method Description abstract MarioInputactionSelection()Agent should now perform an action-selection and return actions it wants to perform.java.lang.StringgetName()Returns name of the agent.voidobserve(IEnvironment environment)Agent is given new percepts to process and save for the nextIAgent.actionSelection().voidreceiveReward(float intermediateReward)Agent is informed about 'intermediateReward' it accumulated so-far.voidreset(AgentOptions options)Called before the agent is executed for the first time or in-between respective tasks/scenarios.
-
Field Details
-
name
protected java.lang.String name
-
-
Constructor Details
-
MarioAgentBase
public MarioAgentBase(java.lang.String agentName)
-
-
Method Details
-
getName
public java.lang.String getName()Description copied from interface:IAgentReturns name of the agent. -
reset
Description copied from interface:IAgentCalled before the agent is executed for the first time or in-between respective tasks/scenarios.
You should clear all dynamic/intermediate data. -
observe
Description copied from interface:IAgentAgent is given new percepts to process and save for the nextIAgent.actionSelection(). -
actionSelection
Description copied from interface:IAgentAgent should now perform an action-selection and return actions it wants to perform.- Specified by:
actionSelectionin interfaceIAgent- Returns:
- Actions to perform
-
receiveReward
public void receiveReward(float intermediateReward)Description copied from interface:IAgentAgent is informed about 'intermediateReward' it accumulated so-far.- Specified by:
receiveRewardin interfaceIAgent
-