public static GraphplanTestUtil getInstance() {
return singleton;
}
public DomainDescription []createDomains() {
DomainDescription domains[] = new DomainDescription[3];
String propositions[] = null;
List<Proposition> initialState = null;
List<Proposition> goalState = null;
List<Operator> operators = null;
// The dinner date domain
propositions = new String[] {"garbage","cleanHands","quiet"};
initialState = Arrays.asList(propositionFactory.getPropositions(propositions));
propositions = new String[] {"dinner","present","~garbage"};
goalState = Arrays.asList(propositionFactory.getPropositions(propositions));
operators = new ArrayList<Operator>(4);
operators.add(operatorFactory.createOperatorTemplate("cook",
new String[] {"cleanHands"},
new String[] {"dinner"}));
operators.add(operatorFactory.createOperatorTemplate("wrap",
new String[] {"quiet"},
new String[] {"present"}));
operators.add(operatorFactory.createOperatorTemplate("carry",
new String[] {},
new String[] {"~cleanHands", "~garbage"}));
operators.add(operatorFactory.createOperatorTemplate("dolly",
new String[] {},
new String[] {"~quiet", "~garbage"}));
domains[0] = new DomainDescription(operators, initialState, goalState);
// The production cell domain
propositions = new String[] {"procUnit(procUnit1)", "procUnit(procUnit2)",
"procUnit(procUnit3)", "procUnit(procUnit4)",
"device(procUnit1)", "device(procUnit2)",
"device(procUnit3)", "device(procUnit4)",
"device(depositBelt)", "device(feedBelt)",
"empty(procUnit1)", "empty(procUnit2)",
"empty(procUnit3)", "empty(procUnit4)",
"empty(depositBelt)", "empty(feedBelt)",
"block(block1)","over(block1,procUnit1)"};
initialState = Arrays.asList(propositionFactory.getPropositions(propositions));
propositions = new String[] {"processed(block1,procUnit2)", "processed(block1,procUnit4)",
"finished(block1)"};
goalState = Arrays.asList(propositionFactory.getPropositions(propositions));
operators = new ArrayList<Operator>(3);
operators.add(operatorFactory.createOperatorTemplate("process(Block,ProcUnit)",
new String[] {"block(Block)", "procUnit(ProcUnit)",
"over(Block, ProcUnit)"},
new String[] {"processed(Block, ProcUnit)"}));
operators.add(operatorFactory.createOperatorTemplate("consume(Block)",
new String[] {"block(Block)", "over(Block, depositBelt)"},
new String[] {"~over(Block, depositBelt)","empty(depositBelt)",
"finished(Block)"}));
operators.add(operatorFactory.createOperatorTemplate("move(Block,Device1,Device2)",
new String[] {"block(Block)", "empty(Device2)",
"over(Block, Device1)", "device(Device2)",
"device(Device1)"},
new String[] {"over(Block, Device2)", "~over(Block, Device1)",
"~empty(Device2)", "empty(Device1)"}));
domains[1] = new DomainDescription(operators, initialState, goalState);
// A larger variation of the production cell domain
propositions = new String[] {"procUnit(procUnit1)", "procUnit(procUnit2)",
"procUnit(procUnit3)", "procUnit(procUnit4)",
"device(procUnit1)", "device(procUnit2)",
"device(procUnit3)", "device(procUnit4)",
"device(depositBelt)", "device(feedBelt)",
"empty(procUnit1)", "empty(procUnit2)",
"empty(procUnit3)", "empty(procUnit4)",
"empty(depositBelt)", "empty(feedBelt)",
"block(block1)","over(block1,procUnit1)",
"block(block2)","over(block2,procUnit2)"};
initialState = Arrays.asList(propositionFactory.getPropositions(propositions));
domains[2] = new DomainDescription(operators, initialState, goalState);
return domains;
}