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 MarioInput
action
Actions that anIAgent
wants to perform.protected MarioControl
control
A layer overaction
that provides a programming-friendly abstraction of Mario actions.protected Entities
e
Information about entities in Mario's vicinity.protected MarioEntity
mario
Information about Mario's body.protected Tiles
t
Information about tiles in Mario's vicinity. -
Constructor Summary
Constructors Constructor Description MarioAIBase()
MarioAIBase(java.lang.String agentName)
-
Method Summary
Modifier and Type Method Description MarioInput
actionSelection()
Agent should now perform an action-selection and return actions it wants to perform.void
observe(IEnvironment environment)
Agent is given new percepts to process and save for the nextIAgent.actionSelection()
.void
receiveReward(float intermediateReward)
Agent is informed about 'intermediateReward' it accumulated so-far.void
reset(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:IAgent
Called before the agent is executed for the first time or in-between respective tasks/scenarios.
You should clear all dynamic/intermediate data.- Specified by:
reset
in interfaceIAgent
- Overrides:
reset
in classMarioAgentBase
-
actionSelection
Description copied from interface:IAgent
Agent should now perform an action-selection and return actions it wants to perform.- Specified by:
actionSelection
in interfaceIAgent
- Specified by:
actionSelection
in classMarioAgentBase
- Returns:
- Actions to perform
-
observe
Description copied from interface:IAgent
Agent is given new percepts to process and save for the nextIAgent.actionSelection()
.- Specified by:
observe
in interfaceIAgent
- Overrides:
observe
in classMarioAgentBase
-
receiveReward
public void receiveReward(float intermediateReward)Description copied from interface:IAgent
Agent is informed about 'intermediateReward' it accumulated so-far.- Specified by:
receiveReward
in interfaceIAgent
- Overrides:
receiveReward
in classMarioAgentBase
-