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 SummaryFields Modifier and Type Field Description protected java.lang.Stringname
- 
Constructor SummaryConstructors Constructor Description MarioAgentBase(java.lang.String agentName)
- 
Method SummaryModifier 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- 
nameprotected java.lang.String name
 
- 
- 
Constructor Details- 
MarioAgentBasepublic MarioAgentBase(java.lang.String agentName)
 
- 
- 
Method Details- 
getNamepublic java.lang.String getName()Description copied from interface:IAgentReturns name of the agent.
- 
resetDescription 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.
- 
observeDescription copied from interface:IAgentAgent is given new percepts to process and save for the nextIAgent.actionSelection().
- 
actionSelectionDescription copied from interface:IAgentAgent should now perform an action-selection and return actions it wants to perform.- Specified by:
- actionSelectionin interface- IAgent
- Returns:
- Actions to perform
 
- 
receiveRewardpublic void receiveReward(float intermediateReward)Description copied from interface:IAgentAgent is informed about 'intermediateReward' it accumulated so-far.- Specified by:
- receiveRewardin interface- IAgent
 
 
-