Download presentation
Presentation is loading. Please wait.
Published byMeryl Harper Modified over 9 years ago
1
M. Silaghi Robotics&AI Planning
2
M. Silaghi Robotics&AI Outline ● Search vs. planning ● STRIPS operators ● Partial-order planning
3
M. Silaghi Robotics&AI Planning ● Planning is nothing but a special case of search: – What are the search elements:
4
M. Silaghi Robotics&AI Planning ● Planning is nothing but a special case of search: – What are the search elements: ● States, ● Initial state, ● Goal, ● Operators ● Good Heuristics?
5
M. Silaghi Robotics&AI Planning ● Planning is nothing but a special case of search: – Situation-space planning is a particular modeling as search. States are FOL sentences. Operators are described by: preconditions,action,effects(added,deleted) ● Planning is a difficult problem and old general purpose algorithms were not good at it. Action:Go(x,y) Preconditions: At(x) Effects:At(y) Deletes:At(x) What is an intelligent solution?
6
M. Silaghi Robotics&AI Search vs. planning ● Consider the task get milk, bananas, and a cordless drill ● Standard search algorithms seem to fail miserably: After-the-fact heuristic/goal test inadequate Start Go To Pet Store Go To School Go To WalMart Go To Sleep Read a Book Sit in a Chair Etc.... Talk to a Parot Buy a Dog Go To Class Buy Tuna Fish Buy Arugula Buy Milk Sit Some More Read a Book
7
M. Silaghi Robotics&AI Efficient planning ● Abstractions – Aggregation, reasoning with many ● Alternatives at ones (least commitment) ● Objects at once – Approximation ● Consider first only important conditions ● Use of macro operators first – Split of operators in sub-operators (an aggregation): ● Choice of action ● Choice of application time ● Choice of details (instantiation of variables)
8
M. Silaghi Robotics&AI
9
M. Silaghi Robotics&AI (Additions and Deletions)
10
M. Silaghi Robotics&AI
11
M. Silaghi Robotics&AI Order in Plans Go SupermarketBuy MilkBuy Bananas Go HW Store Buy Drill Go Home Buy Bananas Go Supermarket Go Home
12
M. Silaghi Robotics&AI Order in Plans Go SupermarketBuy MilkBuy Bananas Go HW Store Buy Drill Go Home Buy Bananas Go Supermarket Buy Drill Go HW Store Go Home
13
M. Silaghi Robotics&AI Order in Plans Go SupermarketBuy MilkBuy Bananas Go HW Store Buy Drill Go Home Buy Bananas Go Supermarket Buy Drill Go HW Store Buy Milk Go Home
14
M. Silaghi Robotics&AI
15
M. Silaghi Robotics&AI
16
M. Silaghi Robotics&AI
17
M. Silaghi Robotics&AI
18
M. Silaghi Robotics&AI Implementation of a POP ● Classes: – Plan(operators, requirements, steps, conflicts, constraints, links, first-step, final-step, next-plans) – Step(operator, step_id) – Requirement(condition, step) – Link(producer, consumer, conditions) – Conflict(link,clobberer) – Constraint(begin,end) – Operator(additions,preconditions,deletions)
19
M. Silaghi Robotics&AI Example: Blocks world ● “Sussman anomaly” problem B A C B A C Start State Goal State PutOn(x,y)PutOnTable(x) Clear(x) On(x,z) Clear(y)Clear(x) On(x,z) ~On(x,z) ~Clear(y) Clear(z) On(x,y) ~On(x,z) Clear(z) On(x,Table) + several inequality constraints
20
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) B A C B A C
21
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) B A C B A C On(B,C), ¬Cl(C)
22
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) B A C B A C On(B,C), ¬Cl(C)
23
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) B A C B A C On(B,C), ¬Cl(C)
24
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) B A C B A C On(B,C), ¬Cl(C)
25
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) B A C B A C On(B,C), ¬Cl(C) On(A,B), ¬Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C)
26
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) B A C B A C On(B,C), ¬Cl(C) On(A,B), ¬Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C)
27
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) B A C B A C On(B,C), ¬Cl(C) On(A,B), ¬Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C)
28
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) B A C B A C On(B,C), ¬Cl(C) On(A,B), ¬Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C)
29
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C) B A C B A C On(A,B), ¬Cl(B) On(B,C), ¬Cl(C)
30
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C) PutOnTable(C) On(C,z=A) Cl(C) B A C B A C On(A,B), ¬Cl(B) On(B,C), ¬Cl(C) On(C,Table), Cl(A)
31
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C) PutOnTable(C) On(C,z=A) Cl(C) B A C B A C On(A,B), ¬Cl(B) On(B,C), ¬Cl(C) On(C,Table), Cl(A)
32
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C) PutOnTable(C) On(C,z=A) Cl(C) B A C B A C On(A,B), ¬Cl(B) On(B,C), ¬Cl(C) On(C,Table), Cl(A)
33
M. Silaghi Robotics&AI START FINAL On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(A,B) On(B,C) PutOn(B,C) Cl(B) On(B,z) Cl(C) PutOn(A,B) Cl(A) On(A,z) Cl(B) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C) PutOnTable(C) On(C,z=A) Cl(C) PutOn(B,C) clobbers Cl(C) => order after PutOnTable(C) B A C B A C On(A,B), ¬Cl(B) On(B,C), ¬Cl(C) On(C,Table), Cl(A)
34
M. Silaghi Robotics&AI Planning Graphs ● Work only for propositional problems ● A planning graph is a sequence of levels. – A set of literals – A set of actions ● Non-action shown with persistence actions. ● Mutual exclusion (mutex) links show incompatibility. Planning graph for “have cake and at cake too” problem up to level S2. Rectangles indicate action (small squares indicate persistance actions) and straight lines indicate preconditions and effects. some Mutex lines are shown as curved gray lines
35
M. Silaghi Robotics&AI Planning Graphs ● Graphs can be extended until they level-off – (i.e. they change no more) ● Actions mutex: – Inconsistent effects (negating effects) – Interference (negating preconditions) – Competing needs (mutex preconditions) ● Literal mutex: – Negations of each other – Inconsistent support (actions to them are mutex)
36
M. Silaghi Robotics&AI Using Planning Graphs ● Admissible Heuristics idea: – No literal may come in less steps than its first level ● Heuristics for sets of goals: – max-level (admissible: max level of first appearance) – level sum (sum of levels of first appearances) – set-level (set appears without mutex) ● GraphPlan – Search a solution in the planning graph (backward) – A boolean Constraint Satisfaction Problems (CSP/SAT) with backtracking (1 variable/action)
37
M. Silaghi Robotics&AI GraphPlan iteratively extends one level
38
M. Silaghi Robotics&AI Example Planning graph for the spare tire problem after expansion to S2. Solution indicated by bold lines and outlines
39
M. Silaghi Robotics&AI SATplan ● Another alternative is to use SAT – Instead of a CSP approach
40
M. Silaghi Robotics&AI Planning in the real world
41
M. Silaghi Robotics&AI STRIPS limitation ● Time – STRIPS tells order but not exact time constraints – Job shop scheduling applications: ● Actions with duration and resources ● The effect DURATION(m) tells m minutes are needed – Algorithm: Critical path method (CPM) ● Action on CPM must follow each others immediately ● Other actions have a leeway window (slack) = LS-ES ES = earliest possible time LS = latest possible time (LS.ES form a schedule) ● Resources
42
M. Silaghi Robotics&AI CPM ● ES(Start) = 0 ● ES(B) = max A<B ES(A) + Duration(A) ● LS(Finish) = ES(Finish) ● LS(A) = min A<B LS(B) – Duration(A) ● Complexity O(Nb) max over all A that must come before B
43
M. Silaghi Robotics&AI Resources ● Shared by actions – Mutual exclusion constraints ● Can be reusable, or not… ● STRIPS operator needs RESOURCE R(k), saying that k units of resource R are needed – Resources of the same type are aggregated ● Efficiency: 10 machines, 10 jobs, 100 actions – Required 23 years for solving!
44
M. Silaghi Robotics&AI Minimum slack ● Plan first, schedule later (after using first CPM) ● Greedy action scheduling – at each step, select ● An unscheduled action ● With scheduled preconditions ● With minimal slack – then update ES and LS for actions affected by resources and repeat …
45
M. Silaghi Robotics&AI Hierarchical Decomposition ● Can reduce problem complexity. ● Hierarchical task networks (HTN) – HTN plan is abstract – Plan refined by action decomposition. – Lowest level made of primitive actions. ● HTN planning uses only successive action decomposition ● Decomposition methods stored in plan library. – Decompose (a,d), where a-action, d-complete partial-order plan – Based on external preconditions = intersection of possible preconditions – Internal effects = additional effects appearing in decomposition – May use subtask sharing.
46
M. Silaghi Robotics&AI Heuristic ● d decompositions of n steps into k actions – d (n-1)/(k-1) decomposition trees – d should be small – k should be big.
47
M. Silaghi Robotics&AI Planning and Acting in Nondeterministic Domains
48
M. Silaghi Robotics&AI Non-determinism ● Bounded indeterminacy – Finite number of alternatives ● Unbounded indeterminacy – Unknown/unlisted possible effects ● (“qualification problem” of McCarthy: however many pre-conditions you list, somebody may think of more) need re-planning Sensorless planning: conformant planning, coercion (of the world into a state) Conditional planning (contingency planning): add sensing actions Execution monitoring and replanning: execution monitoring (tells if revision is needed) Continuous planning: persist over a lifetime, with goal formation.
49
M. Silaghi Robotics&AI Contingency Planning ● AND-OR search: – Game against nature (demonic nondeterminism) ● Plans effects consist of disjunctions of – when situation:K(statements). ● Sensing can be: – Automatic: when inputs arrive continuously ● Inputs can appear in the condition of actions giving access to them – Active: when inputs are received only on request
50
M. Silaghi Robotics&AI Multi-agent planning ● decentralized planning – utilities/incentives are quantified ● simultaneous actions: joint action
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.