askforalfred / alfred

ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks
MIT License
362 stars 78 forks source link

Human-in-the-loop with planner? #4

Closed siddk closed 4 years ago

siddk commented 4 years ago

Is there a straightforward way to couple the existing PDDL code with the ability to interactively control the agent in an environment?

For example in a collaborative setting: I want to load an initial state, let the human explore/perform part of the task, then use the planner to finish/satisfy the high-level goal in case the human fails.

MohitShridhar commented 4 years ago

Well it's definitely possible, but requires some effort with the current setup. From our experience, the PDDL planner is a bit flaky and fails occasionally. But with human demonstrations, you might also reach states where no valid plans exist, for e.g: if the task is to put an apple in the fridge, but the human slices the only apple in the scene, the planner will fail because you can't 'unslice' an apple to recover from this.

But it should be possible to replan at any given state (success not guaranteed!). It's a bit complicated, but I'd recommend stepping through this loop to understand how planning works for a random scene. The PDDL goals are here, along with the domain description.

siddk commented 4 years ago

Great thanks so much! Out of curiosity - where does the flakiness in the PDDL planner come from? What sort of things does it fail to compensate for?

MohitShridhar commented 4 years ago

Well the PDDL planner solves NP-hard problems, so some complex scenarios might exceed the 30s timeout limit. @danielgordon10 might have more insights, but the solver itself might have bugs.

The planner also heavily relies on the domain description for world dynamics. But this isn't perfect. For instance, it knows that a plate can be placed inside a microwave (defined as symbolic predicates), but in reality a specific plate might be too big to fit inside the microwave. These types of failures only happen when you try out the plan in the simulator.

MohitShridhar commented 4 years ago

Closing for now.