public void PlanRecipeTwoAgents(Domain domain, Recipe recipe) { System.out.println("Creating two-agent initial start state"); State state = new State(); Action mix = new MixAction(domain, recipe.topLevelIngredient); // Action bake = new BakeAction(domain); Action pour = new PourAction(domain, recipe.topLevelIngredient); Action move = new MoveAction(domain, recipe.topLevelIngredient); state.addObject(AgentFactory.getNewHumanAgentObjectInstance(domain, "human")); state.addObject(AgentFactory.getNewHumanAgentObjectInstance(domain, "robot")); state.addObject(MakeSpanFactory.getNewObjectInstance(domain, "makeSpan", 2)); List<String> containers = Arrays.asList("mixing_bowl_1"); state.addObject(SpaceFactory.getNewWorkingSpaceObjectInstance(domain, "shelf", null, null)); state.addObject( SpaceFactory.getNewWorkingSpaceObjectInstance( domain, "counter_human", containers, "human")); state.addObject( SpaceFactory.getNewWorkingSpaceObjectInstance( domain, "counter_robot", containers, "robot")); for (String container : containers) { state.addObject( ContainerFactory.getNewMixingContainerObjectInstance(domain, container, null, "shelf")); } this.PlanIngredient(domain, state, recipe.topLevelIngredient); }
@Override public Domain generateDomain() { Domain domain = new SADomain(); domain.addObjectClass(ContainerFactory.createObjectClass(domain)); domain.addObjectClass(IngredientFactory.createSimpleIngredientObjectClass(domain)); domain.addObjectClass(IngredientFactory.createComplexIngredientObjectClass(domain)); domain.addObjectClass(SpaceFactory.createObjectClass(domain)); domain.addObjectClass(AgentFactory.getObjectClass(domain)); domain.addObjectClass(MakeSpanFactory.getObjectClass(domain)); return domain; }