Package ch.idsia.agents.controllers
Class MarioAIBase
java.lang.Object
ch.idsia.agents.controllers.MarioAgentBase
ch.idsia.agents.controllers.MarioAIBase
- All Implemented Interfaces:
IAgent
- Direct Known Subclasses:
MarioHijackAIBase
public abstract class MarioAIBase extends MarioAgentBase
Abstract class that serves as a basis for implementing new Mario-AI agents.
-
Field Summary
Fields Modifier and Type Field Description protected MarioInputactionActions that anIAgentwants to perform.protected MarioControlcontrolA layer overactionthat provides a programming-friendly abstraction of Mario actions.protected EntitieseInformation about entities in Mario's vicinity.protected MarioEntitymarioInformation about Mario's body.protected TilestInformation about tiles in Mario's vicinity. -
Constructor Summary
Constructors Constructor Description MarioAIBase()MarioAIBase(java.lang.String agentName) -
Method Summary
Modifier and Type Method Description MarioInputactionSelection()Agent should now perform an action-selection and return actions it wants to perform.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
-
Constructor Details
-
MarioAIBase
public MarioAIBase() -
MarioAIBase
public MarioAIBase(java.lang.String agentName)
-
-
Method Details
-
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.- Specified by:
resetin interfaceIAgent- Overrides:
resetin classMarioAgentBase
-
actionSelection
Description copied from interface:IAgentAgent should now perform an action-selection and return actions it wants to perform.- Specified by:
actionSelectionin interfaceIAgent- Specified by:
actionSelectionin classMarioAgentBase- Returns:
- Actions to perform
-
observe
Description copied from interface:IAgentAgent is given new percepts to process and save for the nextIAgent.actionSelection().- Specified by:
observein interfaceIAgent- Overrides:
observein classMarioAgentBase
-
receiveReward
public void receiveReward(float intermediateReward)Description copied from interface:IAgentAgent is informed about 'intermediateReward' it accumulated so-far.- Specified by:
receiveRewardin interfaceIAgent- Overrides:
receiveRewardin classMarioAgentBase
-