Debugging Your Domain
Here are some tips in creating and debugging new problem domains. Also the data structures in UMCP are described.
- Typos - Misspelled constant symbols, predicate symbols, and task symbols.
- Undeclared constant symbols - Every undeclared symbol used in an argument
list is treated as a variable and UMCP tries to bind it to a constant.
Make sure all constant symbols used both in the domain description and
the problem definition are declared by CONSTANTS.
- Undeclared compound task symbol - Task symbols which are not declared
are handled as predicate symbols. Make sure all compound task symbols are
declared by COMPOUND-TASKS.
- Incomplete initial state description - Every possible atom not in the initial state is assumed false. Be careful when you want to use a new predicate to specify
some constraints in the domain, you probably have to add necessary state atoms to
the initial state.
- Incorrect arguments for tasks and atoms - You have to be careful to
use arguments consistently - putting arguments in a wrong order is a common
- Forgetting to put INITIALLY for initial state constraint - You need
to put INITIALLY for initial state constraints in the constraint formula.
- Same symbols for a predicate and other task - Unlike other planners
like UCPOP, you cannot use the same symbol for a predicate and a primitive/compound
- Used the same node label for multiple tasks - Each node label must be unique
in methods and task-networks. For example, you cannot use (create-tn T
(n task1 A)(n task2 B)).
- Using the depth-first search, i.e. the default search method, for a problem domain like Blocks World where a plan can be of infinite length. Use best-first search instead by (search-for-plan goal :strategy :bestfs).
You get the following error message during the execution. "Attempt to take the car of INITIAL which is not listp." (Allegro Lisp)
- An undeclared variable symbol is used.
You get the following error message during the execution. "Non-structure argument NIL passed to structure-ref." (Allegro Lisp)
- A node label not used in :expansion is used in the constraint formula.
TNET (Task-Network) :
- name: name of the task-network. The names are systematically generated as follows: the goal task-network name is "tn"; the children of the goal task-network are "tn-1", "tn-2", "tn-3",...; the children of the task-network "tn-1-2-1-4" are "tn-1-2-1-4-1","tn-1-2-1-4-2", ....
- tasklist: list of tasks (in tasknode structure).
- formula: constraint formula to be enforced.
- variables: list of variables with their possible values.
- disjoint-list: list of disjoint variables.
- CTBNYR-ord: list of ordering constraints not fully committed yet.
- promissory: list of state constraints not fully committed yet.
- last-refinement: last refinement operator performed to generate the task-network.
- NumNonPrimitive: the number of non-primitive tasks in the tasklist.
TASKNODE (task) :
- label: the task label unique in the task-network.
- task-symbol: task symbol.
- args: list of arguments.
- before: list of task node labels whose nodes are ordered before this node.
- after: list of task node labels whose nodes are ordered after this node.
Hints in Creating a New Domain
- Try to minimize the number of arguments. UMCP works faster if you use switch-on() and ~switch_on() instead of using switch(on) and switch(off).