ARTIFICIAL INTELLIGENCE
Lecturer: Silja Renooij
Classical planning (goal-directed)
Utrecht University The Netherlands
These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html
ARTIFICIAL INTELLIGENCE Classical planning (goal-directed) - - PowerPoint PPT Presentation
Utrecht University INFOB2KI 2019-2020 The Netherlands ARTIFICIAL INTELLIGENCE Classical planning (goal-directed) Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from
Utrecht University The Netherlands
These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html
2
3
4
5
6
7
8
9
10
11
12
13
14
(not discussed)
15
16
17
have(beer) at(home) go(store,home)
have(beer) at(store)
at(store)
at(home) go(home,store) buy(beer)
18
19
20
21
22
23
24
25
26
27
28
29
– I am now in Marina del Rey – The number of people in the store went up by 1 – The contents of my pockets are now in the store..
– e.g. the number of people in the store
– Avoids making mistakes, perhaps inefficient.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[Erol et al, 1994] [Yang 1990] [Kambhampati 1992]
44
45
S J puton(a, b) puton(b, c) S J clear(a) clear(b) S J clear(b) clear(c) S J refine (Blocksworld example)
46
S J puton(a, b) puton(b, c) S J clear(a) clear(b) S J clear(b) clear(c) S J
47
puton(a, b) puton(b, c) S J clear(a) clear(b) S J clear(b) clear(c) S J puton(a, b) puton(b, c) S J clear(a) clear(b) S J clear(b) clear(c) S J
48
puton(a, b) puton(b, c) S J clear(a) clear(b) S J clear(b) clear(c) S J puton(a, b) puton(b, c) S clear(a) J clear(b) clear(c) S J
49
puton(a, b) puton(b, c) S clear(a) J clear(b) clear(c) S J puton(a, b) puton(b, c) S J clear(b) clear(c) S J puton(c, X) clear(c) refine
50
puton(a, b) puton(b, c) S clear(b) J puton(c, X) clear(c)
51
52
53
54
55
Combatant Evacuation Operations
construction
56
57
((at home) (cash 20) (distance home park 8))
– (:method (travel ?x ?y) ((at ?x) (walking‐distance ?x ?y)) ' ((!walk ?x ?y)) 1) – (:method (travel ?x ?y) ((at ?x) (have‐taxi‐fare ?x ?y)) ' ((!call‐taxi ?x) (!ride ?x ?y) (!pay‐driver ?x ?y)) 1)
– (:‐ (walking‐dist ?x ?y) ((distance ?x ?y ?d) (eval (<= ?d 5)))) – (:‐ (have‐taxi‐fare ?x ?y) ((have‐cash ?c) (distance ?x ?y ?d) (eval (>= ?c (+ 1.50 ?d))))
– (:operator (!walk ?x ?y) ((at ?x)) ((at ?y))) – …
Optional cost; default is 1
58
Precond: Precond: (travel home park) (!walk home park) (!call‐taxi home) (!ride home park) (!pay‐driver home park) Fail (distance > 5) Succeed (we have $20, and the fare is only $9.50) Succeed Succeed (at home) (walking‐distance Home park) (have‐taxi‐fare home park) (at park) (cash 10.50) (distance home park 8)
(at home) Initial state: Final state: (at home) (cash 20) (distance home park 8) Initial task:
59
procedure SHOP (state S, task-list T, domain D) 1. if T = nil then return nil 2. t1 = the first task in T 3. U = the remaining tasks in T 4. if t is primitive & an operator instance o matches t1 then 5. P = SHOP (o(S), U, D) 6. if P = FAIL then return FAIL 7. return cons(o,P) 8. else if t is non-primitive & a method instance m matches t1 in S & m’s preconditions can be inferred from S then 9. return SHOP (S, append (m(t1), U), D) 10. else 11. return FAIL 12. end if end SHOP
state S; task list T=( t1 ,t2,…)
state o(S) ; task list T=(t2, …) task list T=( t1 ,t2,…) method instance m task list T=( u1,…,uk ,t2,…) nondeterministic choice among all methods m whose preconditions can be inferred from S
60
61
62