🔑 Explanation of the getKeys Operator
Definition
I’m reading Introduction to AI Planning and this notation is not clear to me - it appears to be PDDL (Planning Domain Definition Language) (according to Gemini and something I still need to clarify for myself).
getKeys = ⟨¬Owns(key),Owns(key),¬Owns(key)⟩
The getKeys operator is a rule defining an agent’s action and its effects on the world state. The operator is part of the set of Operators O.
In the standard PDDL structure that underpins classical planning, an operator is typically defined by:
- Preconditions (First element): A set of facts that must be true for the action to be executed.
- Add List (Second element): A set of facts that become true after the action.
- Delete List (Third element): A set of facts that become false after the action.
Based on the simplified notation shown, the getKeys operator breaks down as follows:
| Component | Fact/Predicate | Meaning |
|---|---|---|
| Precondition | ¬ Owns(key) | The agent must not already own the key. |
| Add List (Effect) | Owns(key) | The agent now owns the key. |
| Delete List (Effect) | ¬ Owns(key) | The fact that the agent didn’t own the key is removed from the state. |
The purpose of the getKeys operator is to change the state by transferring the fact Owns(key) from being false to being true.
Execution in the Example Plan
In the given plan (denoted by the pi notiation, like policy in RL), ∏ = {getKeys, unlock, exit}:
- Initial State (I): {Inside(agent), ¬ Owns(key), Locked(door)}.
- The getKeys preconditions are met because ¬ Owns(key) is true in I.
- Resulting State: The application of getKeys adds Owns(key), resulting in the new state: {Inside(agent), Owns(key), Locked(door)}.
This new state now satisfies the preconditions of the next action, unlock.