Interface IEnvironment
- All Known Implementing Classes:
MarioEnvironment
public interface IEnvironment
Created by IntelliJ IDEA.
User: Sergey Karakovskiy
Date: Mar 28, 2009
Time:
8:51:57 PM Package: .Environments
-
Field Summary
Fields Modifier and Type Field Description static intMARIO_STATUS_DEADstatic intMARIO_STATUS_RUNNINGstatic intMARIO_STATUS_WIN -
Method Summary
Modifier and Type Method Description voidcloseRecorder()IAgentgetAgent()java.util.List<Entity>getEntities()java.util.List<Entity>[][]getEntityField()EvaluationInfogetEvaluationInfo()intgetIntermediateReward()Current reward for the play so far.LevelScenegetLevelScene()MarioEntitygetMario()Mario's body interface, contains egocentric information about Mario's body and current kill-counts.byte[][]getScreenCapture()Tile[][]getTileField()intgetTimeSpent()VisualizationComponentgetVisualization()May be NULL in case we're running HEADLESS.booleanisLevelFinished()voidperformAction(MarioInput keys)Inform about actions an agent wants to perform.voidreset()Reconfigures theIEnvironmentwith actual values stored withinMarioOptionswhile maintaining link to previously boundIAgentfrom previousreset(IAgent)call.voidreset(IAgent agent)Configures theIEnvironmentwith actual values stored withinMarioOptions, binds the environment withIAgentandIAgent.reset(ch.idsia.agents.AgentOptions)s it.voidsaveLastRun(java.lang.String filename)voidsetAgent(IAgent agent)voidsetReplayer(Replayer recorder)voidtick()Perform another simulator step.
-
Field Details
-
MARIO_STATUS_WIN
static final int MARIO_STATUS_WIN- See Also:
- Constant Field Values
-
MARIO_STATUS_DEAD
static final int MARIO_STATUS_DEAD- See Also:
- Constant Field Values
-
MARIO_STATUS_RUNNING
static final int MARIO_STATUS_RUNNING- See Also:
- Constant Field Values
-
-
Method Details
-
reset
Configures theIEnvironmentwith actual values stored withinMarioOptions, binds the environment withIAgentandIAgent.reset(ch.idsia.agents.AgentOptions)s it.- Parameters:
agent-
-
reset
void reset()Reconfigures theIEnvironmentwith actual values stored withinMarioOptionswhile maintaining link to previously boundIAgentfrom previousreset(IAgent)call. I.e., you cannot call this method if you haven't previously calledreset(IAgent)to bind environment with concrete agent. -
tick
void tick()Perform another simulator step. -
performAction
Inform about actions an agent wants to perform.- Parameters:
keys-
-
getIntermediateReward
int getIntermediateReward()Current reward for the play so far.- Returns:
-
getMario
MarioEntity getMario()Mario's body interface, contains egocentric information about Mario's body and current kill-counts.- Returns:
-
getTileField
Tile[][] getTileField() -
getEntityField
java.util.List<Entity>[][] getEntityField() -
getEntities
java.util.List<Entity> getEntities() -
isLevelFinished
boolean isLevelFinished() -
getEvaluationInfo
EvaluationInfo getEvaluationInfo() -
getAgent
IAgent getAgent() -
setAgent
-
closeRecorder
void closeRecorder() -
setReplayer
-
getTimeSpent
int getTimeSpent() -
getScreenCapture
byte[][] getScreenCapture() -
saveLastRun
void saveLastRun(java.lang.String filename) -
getVisualization
VisualizationComponent getVisualization()May be NULL in case we're running HEADLESS. -
getLevelScene
LevelScene getLevelScene()
-