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 int
MARIO_STATUS_DEAD
static int
MARIO_STATUS_RUNNING
static int
MARIO_STATUS_WIN
-
Method Summary
Modifier and Type Method Description void
closeRecorder()
IAgent
getAgent()
java.util.List<Entity>
getEntities()
java.util.List<Entity>[][]
getEntityField()
EvaluationInfo
getEvaluationInfo()
int
getIntermediateReward()
Current reward for the play so far.LevelScene
getLevelScene()
MarioEntity
getMario()
Mario's body interface, contains egocentric information about Mario's body and current kill-counts.byte[][]
getScreenCapture()
Tile[][]
getTileField()
int
getTimeSpent()
VisualizationComponent
getVisualization()
May be NULL in case we're running HEADLESS.boolean
isLevelFinished()
void
performAction(MarioInput keys)
Inform about actions an agent wants to perform.void
reset()
Reconfigures theIEnvironment
with actual values stored withinMarioOptions
while maintaining link to previously boundIAgent
from previousreset(IAgent)
call.void
reset(IAgent agent)
Configures theIEnvironment
with actual values stored withinMarioOptions
, binds the environment withIAgent
andIAgent.reset(ch.idsia.agents.AgentOptions)
s it.void
saveLastRun(java.lang.String filename)
void
setAgent(IAgent agent)
void
setReplayer(Replayer recorder)
void
tick()
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 theIEnvironment
with actual values stored withinMarioOptions
, binds the environment withIAgent
andIAgent.reset(ch.idsia.agents.AgentOptions)
s it.- Parameters:
agent
-
-
reset
void reset()Reconfigures theIEnvironment
with actual values stored withinMarioOptions
while maintaining link to previously boundIAgent
from 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()
-