Hide menu

TDDC17 Artificial Intelligence

Lab 6: Planning

Modeling a Classical Planning Task

A bug in your household robot's software made it lock all doors inside and to your apartment and drop all keys in arbitrary positions. The robot has been updated and the bug is fixed, but you are now locked out of your apartment. Only the robot can let you back in by opening the front door. The current situation in your home is as follows:

planning-lab

The key in the kitchen is the central key that locks and unlocks all doors, and the robot's current location is the living room. Keys and doors match based on the used color and annotation, e.g., the blue door between the living room and the corridor that is annotated with an 'L' can be opened with the blue key in the living room that is also annotated with an 'L'. Initially, all doors in the appartment are locked.
  1. You can only control your robot by giving it a valid planning task Π. Model Π with actions
    • to open a door (one for each fitting pair of door and key),
    • to pick up a key that is in the same room as the robot (one for each key),
    • and to move from one room to another through an open door that connects both rooms (one for each connected pair of rooms).
    Assume that all actions incur a cost of 1, that the initial state is as described and depicted above and that the goal is that the front door 'F' is unlocked. We recommend to use the Unified Planning Library to model the task.
    • You can find an example of how to model a planning task with the Unified Planning Library at the following link.
    • The library documentation is available at https://unified-planning.readthedocs.io
    • A solution to a simplified version of the Household Robot domain is available at the following link. You can use this example as a starting point, i.e. extend it. Make a copy of the file by selecting File:Save a copy in Drive.
  2. Use greedy best-first search with the FF heuristic to find a (possibly suboptimal) plan for Π. What is its cost? What is the heuristic estimate of the initial state?
  3. Use A* search with the iPDB pattern database heuristic to find an optimal plan for Π. What is its cost? What is the heuristic estimate of the initial state?

Examination

Hand in your .ipynb file (you can download it by selecting File:Download) together with answers to questions from points 2 and 3 according to the submission instructions.


Page responsible: Fredrik Heintz
Last updated: 2023-09-28