Download presentation
Presentation is loading. Please wait.
Published byJase Holman Modified over 10 years ago
1
ARTIFICIAL INTELLIGENCE: THE MAIN IDEAS Nils J. Nilsson OLLI COURSE SCI 102 Tuesdays, 11:00 a.m. – 12:30 p.m. Winter Quarter, 2013 Higher Education Center, Medford Room 226 nilsson@cs.stanford.edu http://ai.stanford.edu/~nilsson/ Course Web Page: www.sci102.com/ For Information about parking near the HEC, go to: http://www.ci.medford.or.us/page.asp?navid=2117 There are links on that page to parking rules and maps
2
AI in the News ?
3
PART TWO AGENTS THAT PLAN
4
AI Planning MOOC http://www.coursera.org/course/aiplan
5
Adding a Planner to The Model of an Agent Perception Action Selection Memory Planner
6
On The Importance of Planning [the ant] knew that a certain arrangement had to be made, but it could not figure how to make it. It was like a man with a tea-cup in one hand and a sandwich in the other, who wants to light a cigarette with a match. But, where the man would invent the idea of putting down the cup and sandwich--- before picking up the cigarette and the match--- T. H. White, The Once and Future King
7
---this ant would have put down the sandwich and picked up the match, then it would have been down with the match and up with the cigarette, then down with the cigarette and up with the sandwich, then down with the cup and up with the cigarette, until finally it had put down the sandwich and picked up the match. It was inclined to rely on a series of accidents to achieve its object.
8
Those who will not reason, perish in the act. Those who will not act, perish for that reason. W.H. Auden
9
What an Agent Needs in Order to Make a Plan 1. What state am I in now? 2. What state do I want to be in? 3.Once I am in a state, and take an action I can take in that state, in which state will I end up?
10
The States and the Actions that Link Them Comprise a Graph A node in the graph An action link in the graph A map is an example of a graph
11
Maps Can be of Different Scales
12
A Map is an Explicit Graph All the nodes and links are right there in the map
13
There Are Also Implicit Graphs The nodes and links arent known until we begin a search
14
An Example: The 8-Puzzle 2 3 1 4 5 8 7 6 3 1 4 5 8 7 6 2 2 3 1 4 5 8 7 6 1
15
Another Example of an Implicit Graph All Possible Boards in Chess, Given the Initial Board and the Legal Moves of Chess
16
Components of an Implicit Graph SiSi SjSj SkSk SlSl A Possible State (Node) Successor States (Nodes) Possible Actions
17
Planning Can Be Accomplished by Searching a Graph Whether Explicit or Implicit, we begin at a start node, visit the adjacent nodes, and continue until we reach a node corresponding to our goal
18
Example of Search: Internet Routing An Explicit Graph
19
Finding a Path From Palo Alto to Pittsburgh 1 hop 2 hops 3 hops Path Found!
20
The 8-Puzzle Again 2 3 1 4 5 8 7 6 2 13 4 5 6 7 8 START GOAL Represent states by an array of numbers: Successor states: exchange 0 with an adjacent number in array Goal is this array: 1 2 3 8 0 4 7 6 5 0 2 3 1 4 5 8 7 6
21
Start and Goal States for The 8-Puzzle 1 2 3 8 0 4 7 6 5 The following sequence of slides was generated from an applet at: www.cs.rmit.edu.au/AI-Search/Product/ The GOAL State The START State
22
Node Annotations
23
Breadth-First Search START 1 2 3 8 0 4 7 6 5 slide 2 to left slide 1 up Compare with GOAL
24
Breadth-First Search Explores Outward in All Directions
25
Heuristic Search Attempts to Focus Toward The Goal
26
Heuristics (That Is, Good Guesses) Make the Search Process More Efficient Because They Are Only Guesses, They Arent Guaranteed To Be Accurate
27
Using Heuristic Search (A*) on the 8-Puzzle 1 2 3 8 0 4 7 6 5 The GOAL State The START State
28
Evaluating States in A* 1 2 3 8 0 4 7 6 5 number of moves made so far number of tiles out of place (a rough heuristic estimate of number of moves left) value = 6 generate successor states + sequence number
29
A* 1 2 3 8 0 4 7 6 5 number of moves made so far number of tiles out of place (a rough heuristic estimate of number of moves left) value = 6 + Best Open Node Open Nodes
30
A* (Next) 1 2 3 8 0 4 7 6 5 value = 6 Open Nodes Best Open Node
31
A* (Next) 1 2 3 8 0 4 7 6 5 value = 6 Open Nodes Best Open Node
32
A* (Next) 1 2 3 8 0 4 7 6 5 value = 6 Open Nodes Best Open Node Open Node
33
A* (Next) 1 2 3 8 0 4 7 6 5 value = 6 Open Nodes Best Open Node Open Node
34
A* (Final) GOAL! 1 2 3 8 0 4 7 6 5 value = 6 Open Nodes Best Open Node Open Nodes
35
History of A* Shakey the Robot (around 1968) Shakeys Map
36
Some Applications of A* (and its descendants) Route Finding in Maps (Google, Bing, MapQuest, …) Electronic Games (NPC Navigation) Language Analysis (Parsing Sentences) Navigation on Mars
37
Planning When States Are Represented by Lists of Statements Example: Toy Blocks State Description in English and in Computerese: B is on the FloorOn(B,Fl) A is on COn(A,C) C is on the floorOn(C,Fl) B is openOpen(B) A is openOpen(A) The floor is openOpen(Fl) C A B
38
Describing Effects of Actions Action Description in English and in Computerese: Moving a block, x, from one place, y, to another place, z move(x,y,z) (A schema --- x, y, z are variables) Preconditions: On(x,y), Open(x), Open(z) Delete List: On(x,y), Open(z) Add list: On(x,z), Open(y), Open(Fl) One of three possible actions here: x = A, y = C, z = B (Instantiating the schema --- A, C, and B are constants) C A B
39
Example Action and its Effects One (of three) possible actions here: move(A,C,B) Preconditions: On(A,C), Open(A), Open(B) Delete List: On(A,C), Open(B) Add list: On(A,B), Open(C), Open(Fl) Open(A) On(C,Fl) On(B,Fl) Open(Fl) On(A,B) Open(C) On(A,C) Open(B) Open(A) On(C,Fl) On(B,Fl) Open(Fl) C A B C A B move(A,C,B)
40
A Possible Goal State On(A,B), On(B,C),On(C,Fl) C A B What Actions Will Achieve the Goal? C A B
41
Two Technical Problems 1. The Qualification Problem 2. The Side-Effect Problem
42
The Qualification Problem move(x,y,z) Preconditions: On(x,y), Open(x), Open(z) Delete List: On(x,y), Open(z) Add list: On(x,z), Open(y), Open(Fl) What about unexpected, anomalous preconditions? C A B
43
The Side-Effect Problem move(x,y,z) Preconditions: On(x,y), Open(x), Open(z) Delete List: On(x,y), Open(z) Add list: On(x,z), Open(y), Open(Fl) Mention These in Delete and Add Lists C A B
44
This Style of Planning Was First Proposed in a System Called STRIPS Used by Shakey the Robot to Make Plans (1971)
45
Applications of STRIPS-Style Planners Scheduling (e.g., for Hubble Space Telescope) Mission Planning (Defense and Space) Assembly Planning Logistics Planning Actions for Non-Player Characters in Electronic Games
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.