public class BlocksWorld extends java.lang.Object implements DomainGenerator
HashableStateFactory
should be object identifier dependent. For example, if using a
SimpleHashableStateFactory
, in its constructor specify identifierIndependent=false,Modifier and Type | Class and Description |
---|---|
class |
BlocksWorld.ClearPF
Propositional function class for evaluating whether one block is clear (has no block stacked on top of it).
|
class |
BlocksWorld.ColorPF
Propositional function class for evaluating whether a block is a certain color.
|
static class |
BlocksWorld.NamedColor |
class |
BlocksWorld.OnBlockPF
Propositional function class for evaluating whether one block is on another.
|
class |
BlocksWorld.OnTablePF
Propositional function class for evaluating whether one block is on a table.
|
class |
BlocksWorld.StackActionType
Action class for stacking one block onto another.
|
class |
BlocksWorld.UnstackActionType
Action class for unstacking a block off of another block and putting it on the table.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_STACK
Constant for the stack action name
|
static java.lang.String |
ACTION_UNSTACK
Constant for the unstack action name
|
static java.lang.String |
CLASS_BLOCK
Constant for the name of the block class.
|
protected BlocksWorld.NamedColor[] |
colors |
static java.lang.String |
PF_CLEAR
Constant for the propositional function "clear" name
|
static java.lang.String |
PF_ON_BLOCK
Constant for the propositional function "on" name
|
static java.lang.String |
PF_ON_TABLE
Constant for the propositional function "on table" name
|
protected RewardFunction |
rf |
static java.lang.String |
TABLE_VAL
Value for being on the table
|
protected TerminalFunction |
tf |
static java.lang.String |
VAR_CLEAR
Constant for the binary "clear" variable key.
|
static java.lang.String |
VAR_COLOR
Constant for the categorical "color" variable key.
|
static java.lang.String |
VAR_ON
Constant for the relational "on" variable key.
|
Constructor and Description |
---|
BlocksWorld() |
Modifier and Type | Method and Description |
---|---|
OOSADomain |
generateDomain()
Returns a newly instanced Domain object
|
java.util.List<PropositionalFunction> |
generatePfs() |
static State |
getNewState(int nBlocks)
Creates a new state with nBlocks block objects in it.
|
RewardFunction |
getRf() |
TerminalFunction |
getTf() |
static void |
main(java.lang.String[] args)
Main method for exploring the domain.
|
void |
setColorsForPFs(BlocksWorld.NamedColor... colors) |
void |
setRf(RewardFunction rf) |
void |
setTf(TerminalFunction tf) |
public static final java.lang.String VAR_ON
public static final java.lang.String VAR_CLEAR
public static final java.lang.String VAR_COLOR
public static final java.lang.String TABLE_VAL
public static final java.lang.String CLASS_BLOCK
public static final java.lang.String ACTION_STACK
public static final java.lang.String ACTION_UNSTACK
public static final java.lang.String PF_ON_BLOCK
public static final java.lang.String PF_ON_TABLE
public static final java.lang.String PF_CLEAR
protected BlocksWorld.NamedColor[] colors
protected RewardFunction rf
protected TerminalFunction tf
public RewardFunction getRf()
public void setRf(RewardFunction rf)
public TerminalFunction getTf()
public void setTf(TerminalFunction tf)
public java.util.List<PropositionalFunction> generatePfs()
public OOSADomain generateDomain()
DomainGenerator
generateDomain
in interface DomainGenerator
public void setColorsForPFs(BlocksWorld.NamedColor... colors)
public static State getNewState(int nBlocks)
nBlocks
- the number of block objects to createpublic static void main(java.lang.String[] args)
args
- process arguments