public class FrostbiteModel extends java.lang.Object implements FullStateModel
FullStateModel.Helper
Modifier and Type | Field and Description |
---|---|
protected int |
agentSize |
protected int |
gameHeight |
protected int |
gameWidth |
protected int |
jumpSize |
protected int |
jumpSpeed |
protected int |
numberPlatformCol |
protected int |
platformSpeed |
protected int |
scale
Constant to adjust the scale of the game
|
protected int |
stepSize |
Constructor and Description |
---|
FrostbiteModel(int scale) |
Modifier and Type | Method and Description |
---|---|
int |
getNumberPlatformCol() |
int |
getScale() |
void |
initConstants() |
protected void |
move(FrostbiteState s,
int xd,
int yd)
Attempts to move the agent into the given position, taking into account platforms and screen borders
|
State |
sample(State s,
Action a)
Samples and returns a
State from a state transition function. |
void |
setNumberPlatformCol(int numberPlatformCol) |
void |
setScale(int scale) |
java.util.List<StateTransitionProb> |
stateTransitions(State s,
Action a)
|
protected int scale
protected int numberPlatformCol
protected int gameHeight
protected int gameWidth
protected int jumpSize
protected int stepSize
protected int jumpSpeed
protected int platformSpeed
protected int agentSize
public int getScale()
public void setScale(int scale)
public int getNumberPlatformCol()
public void setNumberPlatformCol(int numberPlatformCol)
public void initConstants()
public java.util.List<StateTransitionProb> stateTransitions(State s, Action a)
FullStateModel
Action
is applied in State
s. The returned
list only needs to include transitions that have non-zero probability of occurring.stateTransitions
in interface FullStateModel
s
- the source statea
- the action to be applied in the source stateStateTransitionProb
objects.public State sample(State s, Action a)
SampleStateModel
State
from a state transition function.sample
in interface SampleStateModel
s
- the source statea
- the action to be executed in the source stateState
protected void move(FrostbiteState s, int xd, int yd)
s
- the current statexd
- the attempted X position increment of the agentyd
- the attempted Y position increment of the agent