Bratko, Chapter 16: Planning 16.1 Representing Actions - preconditions: can(Action,Cond) - add-list: add(Action,AddRels) - delete-list: del(Action,DelRels) - e.g., move(Block,From,To) [Fig16.2, p402] camera world [Fig16.3, p403] 16.2 Deriving Plans by Means-Ends Analysis - plan(State,Goals,Plan,FinalState) [Fig16.5, p406] - assumes all actions and goals fully instantiated 16.3 Protecting Goals - e.g. state: on(b,3); goals: clear(2), clear(3); move(b,3,2) ... - plan(State,Goals,ProtectedGoals,Plan,FinalState) [Fig16.6, p411] 16.4 Procedural Aspects and Breadth-First Regime - PrePlan is determined using breadth-first because of conc - conc(PrePlan,_,_) generates PrePlan = [], [_], [_,_], ... - rest of plan generate using depth-first - can move to breadth-first by adding conc(Plan,_,_) to plan/4 - means-ends planning is incomplete (assumes goal independence) - Exercise 16.4 relates to HW3 16.5 Goal Regression [Fig16.8, p417] - given Action and Goals (none of which are deleted by Action, and at least one of which is added by Action) - find Goals0 = Goals - addlist(Action) + preconds(Action) - allows for goal interaction 16.6 Combining Means-Ends Planning with Best-First Heuristic - can add domain knowledge - select(State,Goals,Goal) - achieves(Action,Goal) - which alternative regressed goal sets to attempt next - best-first search based on number of unachieved goals [Fig19.9, p420] - states are goal sets and an action - initial state is desired goals - goal state is any goal set satisfied by the initial facts - successor implemented using regression (all costs = 1) - bestfirst(Goals -> stop, Plan) 16.7 Further Refinements: Uninstantiated Actions and Non-Linear Planning - uninstantiated goals and actions - would like to have variables in goals - problems maintaining constraints when variables are not instantiated - e.g., enforcing Object != To in move(Object,From,To) - check for constraints during goal testing - non-linear planning - produce partial-order plans