View
221
Download
1
Embed Size (px)
Citation preview
Robotics VersusRobotics Versus
Artificial Artificial Intelligence. Intelligence.
SearchSearch
SearchSearchSearchSearch ““All AI is search”All AI is search”
Game theoryGame theory Problem spacesProblem spaces
Every problem is a Every problem is a feature spacefeature space of all possible of all possible (successful or unsuccessful) solutions.(successful or unsuccessful) solutions.
The trick is to find an efficient search strategy in The trick is to find an efficient search strategy in this space.this space.
Example of an Intelligent ActionExample of an Intelligent ActionExample of an Intelligent ActionExample of an Intelligent Action
Getting ready to come to classGetting ready to come to class Describe so a machine could do itDescribe so a machine could do it
search among alternatives (car or bus)search among alternatives (car or bus) represent the knowledgerepresent the knowledge
This requires a lot of knowledge…!
SearchSearchSearchSearch Example: Four three-letter Example: Four three-letter crossword crossword puzzlepuzzle
Search problem is find correct puzzleSearch problem is find correct puzzle Approaches:Approaches:
wordword fill: fill: take word, take word, put it to space, put it to space, if contradiction, backtrackif contradiction, backtrack
spacespace fill: fill: take vertical or horizontal spacetake vertical or horizontal space select a word with this lengthselect a word with this length put it into space,put it into space, if contradiction, backtrackif contradiction, backtrack
Many other strategies: homework, find Many other strategies: homework, find space and operators in it, discuss space and operators in it, discuss backtracking strategybacktracking strategy
Cat dog cam may mom sit mit
C A MA O
T O M
Blind SearchBlind SearchBlind SearchBlind Search
Search depends only Search depends only on node’s position in on node’s position in the search treethe search tree
Two basic blind Two basic blind searches:searches: depth-firstdepth-first breadth-firstbreadth-first
Problem:Problem: define depth- define depth-first search for the first search for the above problemabove problem
Problem:Problem: define define breadth-first algorithm breadth-first algorithm for the above problem.for the above problem.
Repeat both for each Repeat both for each of the approaches of the approaches outlined above.outlined above.
Called also search strategies
Depth-First Search Pseudo-CodeDepth-First Search Pseudo-CodeDepth-First Search Pseudo-CodeDepth-First Search Pseudo-Code 1. Set L to list of initial nodes1. Set L to list of initial nodes 22. n. n = head(L), Empty(L) ==> fail = head(L), Empty(L) ==> fail 3. If3. If n n=goal, stop, return it and return the path =goal, stop, return it and return the path
leading to itleading to it 4. pop(L), push(L) all 4. pop(L), push(L) all nn’s children, ’s children, 5. go to5. go to step 2 step 2
Head = car in LISP
empty = null in LISP
push(L)pop(L)
Depth First is based on a stack, L
Breadth-First SearchBreadth-First SearchBreadth-First SearchBreadth-First Search
1. Set L to list of initial nodes1. Set L to list of initial nodes 2. 2. nn=head(L), Empty(L)==> fail=head(L), Empty(L)==> fail 3. If 3. If nn=goal then stop and return it and path=goal then stop and return it and path 4. Dequeue(L), Enqueue(L) all 4. Dequeue(L), Enqueue(L) all nn’s children’s children 5. 5. Go toGo to step 2 step 2
Depth First is based on a queue, L
Means, remove from queue
Means, add to queue
Heuristic SearchHeuristic SearchHeuristic SearchHeuristic Search
Meta-level reasoningMeta-level reasoning heuristicheuristic function aids in selecting which part function aids in selecting which part
of search tree to expandof search tree to expand trade-offtrade-off between time to compute heuristic between time to compute heuristic
function and to expand the treefunction and to expand the tree
Other IssuesOther IssuesOther IssuesOther Issues
BacktrackingBacktracking chronological backtracking as in Prologchronological backtracking as in Prolog dependency-directed backtrackingdependency-directed backtracking
Search direction:Search direction: forward (toward goal)forward (toward goal) backward (from goal)backward (from goal)
and math proving problemsand math proving problems Bi-directionalBi-directional
and building tunnel storyand building tunnel story
Search Examples ISearch Examples ISearch Examples ISearch Examples I
Game playingGame playing chesschess backgammonbackgammon
Finding path to goalFinding path to goal Missionaries and cannibalsMissionaries and cannibals Towers of HanoiTowers of Hanoi Sliding TileSliding Tile games (15, 8) , puzzles games (15, 8) , puzzles
Search Examples IISearch Examples IISearch Examples IISearch Examples II
finding a goalfinding a goal cryptoarithmeticcryptoarithmetic n-queensn-queens ““mutilated checkboard” or “tough nut” of mutilated checkboard” or “tough nut” of
McCarthy problem.McCarthy problem.
Example Applications of search Example Applications of search Example Applications of search Example Applications of search
Expert SystemsExpert Systems Natural Language ProcessingNatural Language Processing VisionVision RoboticsRobotics
Search: Game TheorySearch: Game TheorySearch: Game TheorySearch: Game Theory
9!+1 = 362,880
Robot interaction with humans, other robots and environment can be described in terms of a game
tic-tac-toe,
Game playing Game playing Game playing Game playing Programs that:Programs that:
take advantage of the computer's ability to examine a large take advantage of the computer's ability to examine a large number of possible moves in a short period of time and number of possible moves in a short period of time and
logically assess their probable success or failure logically assess their probable success or failure
have been already developedhave been already developed They were used for game playing in:They were used for game playing in:
tic-tac-toe, tic-tac-toe, checkers, checkers, chess, chess, and the Oriental game called Go. and the Oriental game called Go.
Recent Trends in Artificial IntelligenceRecent Trends in Artificial IntelligenceRecent Trends in Artificial IntelligenceRecent Trends in Artificial Intelligence Intelligent agentsIntelligent agents
Experimental AI software designed to sift through masses of Experimental AI software designed to sift through masses of information made available on the evolving Information information made available on the evolving Information Superhighway of cyberspace to suggest topics of interest or Superhighway of cyberspace to suggest topics of interest or importance for an individual. importance for an individual.
Artificial life Artificial life A field of AI research that studies the adaptive control systems of A field of AI research that studies the adaptive control systems of
insects and other ecological systems and reproduces them in insects and other ecological systems and reproduces them in robotic insectoids.robotic insectoids.
More recently researchers have been working on robots More recently researchers have been working on robots with the intelligence of a two-year-old child.with the intelligence of a two-year-old child.
Intelligent Agents and Artificial Life are now part of Intelligent Agents and Artificial Life are now part of robotics robotics
Your tasksYour tasksYour tasksYour tasks Search: Search: give an example of search problem that can be solved give an example of search problem that can be solved
using Lisp and that has not been presented so far in the classusing Lisp and that has not been presented so far in the class Blind and informed search: Blind and informed search: for your problem, give an example of for your problem, give an example of
blind search and informed search. Create a powerful heuristic to solve blind search and informed search. Create a powerful heuristic to solve it.it.
Games: Games: examples of games include tic-tac-toe, checkers, examples of games include tic-tac-toe, checkers, chess, go, othello, etc. What kind of game can be a good chess, go, othello, etc. What kind of game can be a good choice for our robot-guard in the FAB building choice for our robot-guard in the FAB building environment?environment?
Expert system: Expert system: what kind of expert knowledge is neede for our what kind of expert knowledge is neede for our walking guard, in addition to knowledge about the FAB building walking guard, in addition to knowledge about the FAB building geometry, distances, what is in which office, structure of ECE geometry, distances, what is in which office, structure of ECE department and its people, etc.?department and its people, etc.? How is this knowledge stored and accessed?How is this knowledge stored and accessed?
Possible Lisp Problems for the examPossible Lisp Problems for the examPossible Lisp Problems for the examPossible Lisp Problems for the exam 1. Mouse in Labyrinth: 1. Mouse in Labyrinth: design a Lisp algorithm that will be able to go out design a Lisp algorithm that will be able to go out
of every labyrinth. Discuss the program strategy versus some knowledge of the of every labyrinth. Discuss the program strategy versus some knowledge of the labyrinth geometry. What kind of concepts introduced so far in the class may labyrinth geometry. What kind of concepts introduced so far in the class may be useful? Discuss using depth-first, breadth-first search and other search be useful? Discuss using depth-first, breadth-first search and other search strategies.strategies.
2. Obstacle Avoiding robot: 2. Obstacle Avoiding robot: design a Lisp program that will design a Lisp program that will simulate a turtle avoiding obstacles. In contrast to your homework 2, however, simulate a turtle avoiding obstacles. In contrast to your homework 2, however, the turtle can recognize type of the obstacle and select the best strategy. The the turtle can recognize type of the obstacle and select the best strategy. The best strategy is not necessarily to follow the outline of the obstacle, but to go best strategy is not necessarily to follow the outline of the obstacle, but to go straigth between two obstacles, sometimes closer to one of them. This is a straigth between two obstacles, sometimes closer to one of them. This is a useful subproblem of avoiding stationary obstacles in the corridor or room for useful subproblem of avoiding stationary obstacles in the corridor or room for our robot. our robot. A program like this was written by Mike Burns. Read about Voronoir diagrams A program like this was written by Mike Burns. Read about Voronoir diagrams
and their uses in robotics.and their uses in robotics. Think how these diagrams can be improved if you have more knowledge of Think how these diagrams can be improved if you have more knowledge of
obstacles.obstacles.