public class FrostbiteDomain extends java.lang.Object implements DomainGenerator
visualizingDomain
data member to false.Modifier and Type | Class and Description |
---|---|
class |
FrostbiteDomain.ActionIdle |
class |
FrostbiteDomain.IglooBuiltPF |
class |
FrostbiteDomain.InWaterPF |
class |
FrostbiteDomain.MovementAction
An action class for moving the agent.
|
class |
FrostbiteDomain.OnIcePF |
class |
FrostbiteDomain.OnPlatformPF |
class |
FrostbiteDomain.PlatformActivePF |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIONEAST
Constant for the name of the east action
|
static java.lang.String |
ACTIONIDLE
Constant for the name of the west action
|
static java.lang.String |
ACTIONNORTH
Constant for the name of the north action
|
static java.lang.String |
ACTIONSOUTH
Constant for the name of the south action
|
static java.lang.String |
ACTIONWEST
Constant for the name of the west action
|
static java.lang.String |
ACTIVATEDATTNAME
Constant for the name of the activated status of a platform
|
static java.lang.String |
AGENTCLASS
Constant for the name of the agent OO-MDP class
|
static java.lang.String |
BUILDINGATTNAME
Constant for the name of the building step of the igloo
|
protected int |
buildingStepsToWin |
protected static int |
gameHeight
Game parameters
|
protected static int |
gameIceHeight |
protected static int |
gameWidth |
static java.lang.String |
HEIGHTATTNAME
Attribute name for height
|
static java.lang.String |
IGLOOCLASS
Constant for the name of the igloo OO-MDP class
|
static java.lang.String |
PFIGLOOBUILT
Constant for the name of the propositional function "igloo is built"
|
static java.lang.String |
PFINWATER
Constant for the name of the propositional function "agent is in water"
|
static java.lang.String |
PFONICE
Constant for the name of the propositional function "agent is on ice"
|
static java.lang.String |
PFONPLATFORM
Constant for the name of the propositional function "agent is on platform"
|
static java.lang.String |
PFPLATFORMACTIVE
Constant for the name of the propositional function "platform is active"
|
static java.lang.String |
PLATFORMCLASS
Constant for the name of the obstacle OO-MDP class
|
static java.lang.String |
SIZEATTNAME
Constant for the name of the size of a frozen platform
|
protected double[][] |
transitionDynamics
Matrix specifying the transition dynamics in terms of movement directions.
|
static java.lang.String |
XATTNAME
Constant for the name of the x position attribute.
|
static java.lang.String |
YATTNAME
Constant for the name of the y position attribute.
|
Constructor and Description |
---|
FrostbiteDomain() |
Modifier and Type | Method and Description |
---|---|
Domain |
generateDomain()
Creates a new frostbite domain.
|
int |
getAgentSize()
Returns the agent size
|
static State |
getCleanState(Domain domain)
Creates a state with one agent, one igloo, and 4 rows of 4 platforms.
|
static void |
main(java.lang.String[] args)
Main function to test the domain.
|
protected void |
move(State s,
int xd,
int yd)
Attempts to move the agent into the given position, taking into account platforms and screen borders
|
protected int[] |
movementDirectionFromIndex(int i)
Returns the change in x and y position for a given direction number.
|
static void |
setAgent(State s,
int x,
int y)
Sets the agent s position, with a height of 0 (on the ground)
|
static void |
setAgent(State s,
int x,
int y,
int h)
Sets the agent s position and height
|
void |
setDeterministicTransitionDynamics()
Will set the domain to use deterministic action transitions.
|
static void |
setIgloo(State s,
int building)
Sets the igloo building status
|
static void |
setPlatform(State s,
int i,
int x,
int y,
int ss,
boolean activatedStatus)
Sets a platform position, size and status
|
public static final java.lang.String XATTNAME
public static final java.lang.String YATTNAME
public static final java.lang.String HEIGHTATTNAME
public static final java.lang.String SIZEATTNAME
public static final java.lang.String BUILDINGATTNAME
public static final java.lang.String ACTIVATEDATTNAME
public static final java.lang.String AGENTCLASS
public static final java.lang.String IGLOOCLASS
public static final java.lang.String PLATFORMCLASS
public static final java.lang.String ACTIONNORTH
public static final java.lang.String ACTIONSOUTH
public static final java.lang.String ACTIONEAST
public static final java.lang.String ACTIONWEST
public static final java.lang.String ACTIONIDLE
public static final java.lang.String PFONPLATFORM
public static final java.lang.String PFPLATFORMACTIVE
public static final java.lang.String PFONICE
public static final java.lang.String PFIGLOOBUILT
public static final java.lang.String PFINWATER
protected static final int gameHeight
protected static final int gameIceHeight
protected static final int gameWidth
protected int buildingStepsToWin
protected double[][] transitionDynamics
public static void main(java.lang.String[] args)
args
- public static void setAgent(State s, int x, int y)
s
- the state in which to set the agentx
- the x position of the agenty
- the y position of the agentpublic static void setAgent(State s, int x, int y, int h)
s
- the state in which to set the agentx
- the x position of the agenty
- the y position of the agenth
- the height of the agent (0 is ground)public static void setIgloo(State s, int building)
s
- the state in which to set the agentbuilding
- igloo building statuspublic static void setPlatform(State s, int i, int x, int y, int ss, boolean activatedStatus)
s
- the state in which the platform should be seti
- specifies the ith platform object to be set to these valuesx
- the x coordinate of the top left cornery
- the y coordinate of the top left cornerss
- the platform sizeactivatedStatus
- the platform statuspublic static State getCleanState(Domain domain)
setAgent(burlap.oomdp.core.State, int, int)
.domain
- the domain of the state to generatepublic int getAgentSize()
public void setDeterministicTransitionDynamics()
public Domain generateDomain()
generateDomain
in interface DomainGenerator
protected int[] movementDirectionFromIndex(int i)
i
- the direction number (0,1,2,3 indicates north,south,east,west, respectively)protected void move(State 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