Chap 4: Searching Techniques

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

An Introduction to Artificial Intelligence
Solving Problem by Searching
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
Review: Search problem formulation
A* Search Introduction to AI. What is an A* Search? A greedy search method minimizes the cost to the goal by using an heuristic function, h(n). It works.
CSC344: AI for Games Lecture 4: Informed search
5-Nov-2003 Heuristic Search Techniques What do you do when the search space is very large or infinite? We’ll study three more AI search algorithms: Backtracking.
Informed Search Idea: be smart about what paths to try.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
CSC3203: AI for Games Informed search (1) Patrick Olivier
Artificial Intelligence Problem solving by searching.
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
Solving problems by searching A I C h a p t e r 3.
Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
G5AIAI Introduction to AI Graham Kendall Heuristic Searches.
Artificial Intelligence Lecture No. 8 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
For Monday Read chapter 4 exercise 1 No homework.
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
Chap 4: Searching Techniques Artificial Intelligence Dr.Hassan Al-Tarawneh.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
Problem Solving Agents
Last time: Problem-Solving
Artificial Intelligence (CS 370D)
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Department of Computer Science
Heuristic Search Introduction to Artificial Intelligence
Introduction to Artificial Intelligence
Artificial Intelligence (CS 370D)
Artificial Intelligence Problem solving by searching CSC 361
Chap 4: Searching Techniques Artificial Intelligence Dr.Hassan Al-Tarawneh.
HW #1 Due 29/9/2008 Write Java Applet to solve Goats and Cabbage “Missionaries and cannibals” problem with the following search algorithms: Breadth first.
Discussion on Greedy Search and A*
Discussion on Greedy Search and A*
Solving problems by searching
CS 188: Artificial Intelligence Fall 2008
Lecture 1B: Search.
CS 4100 Artificial Intelligence
Artificial Intelligence Informed Search Algorithms
EA C461 – Artificial Intelligence
Searching for Solutions
Informed search algorithms
Informed search algorithms
Principles of Computing – UFCFA3-30-1
Artificial Intelligence
Informed search algorithms
CSE 473 University of Washington
HW 1: Warmup Missionaries and Cannibals
Informed Search Idea: be smart about what paths to try.
State-Space Searches.
State-Space Searches.
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
HW 1: Warmup Missionaries and Cannibals
Artificial Intelligence
Solving Problems by Searching
Artificial Intelligence: Theory and Practice Ch. 3. Search
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

Chap 4: Searching Techniques Artificial Intelligence Chapter 4 TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence Motivation Attempt the end, and never stand to doubt, nothing’s so hard, but search will find it out “Robert Herrick” TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence What we will cover ? Ideas in searching Searching tree representation Uninformed and informed search Game playing search TIN 5013: Artificial Intelligence

Problem as a State Space Search To build as system to solve a particular problem, we need: Define the problem: must include precise specifications ~ initial solution & final solution. Analyze the problem: select the most important features that can have an immense impact. Isolate and represent : convert these important features into knowledge representation. Problem solving technique(s): choose the best technique and apply it to particular problem. TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence The Quest Typical questions that need to be answered: Is the problem solver guaranteed to find a solution? Will the system always terminate or caught in a infinite loop? If the solution is found, it is optimal? What is the complexity of searching process? How the system be able to reduce searching complexity? How it can effectively utilize the representation paradigm? TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence Important Terms Search space  possible conditions and solutions. Initial state  state where the searching process started. Goal state  the ultimate aim of searching process. Problem space  “what to solve” Searching strategy strategy for controlling the search. Search tree  tree representation of search space, showing possible solutions from initial state. TIN 5013: Artificial Intelligence

Example: The Bridges of Konigsberg Problem Classical graph applications. Introduced by Leonhard Euler. Problem: Can a person walk around the city crosses each bridge exactly once? TIN 5013: Artificial Intelligence

Example: The Bridges of Konigsberg Problem (cont) Predicates: Connect (B, C, b5) TIN 5013: Artificial Intelligence

Example: Traveling Salesperson Problem Suppose a salesperson has five cities to visit and them must return home. Goal  find the shortest path to travel. A B 75 125 125 75 100 E 50 125 C 50 100 D TIN 5013: Artificial Intelligence

Searching for Solution Search through state space (explicitly using searching tree). Node expansion :- generating new node related to previous nodes. Concepts: State :- conditions in which the node corresponds. Parent node :- the superior node Path cost :- the cost, from initial to goal state. Depth:- number of steps along the path from initial state TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence Node expansion TIN 5013: Artificial Intelligence

Node expansion (initial) TIN 5013: Artificial Intelligence

Node expansion (expanding Arad) TIN 5013: Artificial Intelligence

Node expansion (expanding Sibiu) TIN 5013: Artificial Intelligence

Measuring Searching Performance The output from problem-solving (searching) algorithm is either FAILURE or SOLUTION. Four ways: Completeness : is guaranteed to find a solution? Optimality: does it find optimal solution ? Time complexity: how long? Space complexity: how much memory? Complexity : branching factor (b), depth (d), and max. depth (m) TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence Searching Strategies Blind search  traversing the search space until the goal nodes is found (might be doing exhaustive search). Techniques : Breadth First Uniform Cost ,Depth first, Interactive Deepening search. Guarantees solution. Heuristic search  search process takes place by traversing search space with applied rules (information). Techniques: Greedy Best First Search, A* Algorithm There is no guarantee that solution is found. TIN 5013: Artificial Intelligence

Blind Search : Breadth First Search (BFS) Strategy ~ search all the nodes expanded at given depth before any node at next level. Concept : First In First Out (FIFO) queue. Complete ?: Yes with finite b (branch). Complexity: Space : similar to complexity – keep nodes in every memory Optimal ? = Yes (if cost =1) TIN 5013: Artificial Intelligence

Blind Search : Breadth First Search 2 1 4 3 TIN 5013: Artificial Intelligence

Blind Search : Depth First Search (DFS) Strategy ~ search all the nodes expanded in deepest path. Last In First Out concept. Complete ?: No Complexity: Space : O(bm) – b ; branching factor, m ; max. depth Optimality ? : No TIN 5013: Artificial Intelligence

Blind Search : Depth First Search (DFS) 3 1 2 4 5 ……. N+1 TIN 5013: Artificial Intelligence

Blind Search : Iterative Deepening DFS (ID-DFS) Strategy ~ combines DFS with best depth limits. Gradually increase the limit; L=0, L=1… and so on. Complete ?: Yes (if b is finite) Complexity: Space : Optimality ? : yes (if path costs are all identical) TIN 5013: Artificial Intelligence

Blind Search : Iterative Deepening DFS (ID-DFS) TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence Summary TIN 5013: Artificial Intelligence

TIN 5013: Artificial Intelligence Heuristic Search : h(n)=67 h(n)=34 E A* Important aspect: formation of heuristic function (h(n)). Heuristic function  additional knowledge to guide searching strategy (short cut). Distance: heuristic function can be straight line distance (SLD) D h(n)=9 h(n)=12 B C* h(n)=24 h(n)=0 TIN 5013: Artificial Intelligence

Heuristic Search : Heuristic Function TIN 5013: Artificial Intelligence

Heuristic Search :Greedy-Best Search Tries to expand the node that is closest to the goal. Evaluates using only heuristic function : f(n) = h(n) Possibly lead to the solution very fast. Problem ? ~ can end up in sub-optimal solutions (doesn’t take notice of the distance it travels). Complexity and time: Complete & optimal ? : No (stuck in infinite loop) TIN 5013: Artificial Intelligence

Heuristic Search :Greedy-Best Search 1 2 TIN 5013: Artificial Intelligence

Heuristic Search :Greedy-Best Search 3 TIN 5013: Artificial Intelligence

Heuristic Search : A* Algorithm Widely known algorithm – (pronounced as “A star” search). Evaluates nodes by combining g(n) “cost to reach the node” and h(n) “cost to get to the goal” f(n) = g(n) + h(n), f(n)  estimated cost of the cheapest solution. Complete and optimal ~ since evaluates all paths. Time ? ~ a bit time consuming Space ? ~ lot of it! TIN 5013: Artificial Intelligence

Heuristic Search : A* Algorithm Path cost for S-D-G S G E D A G’ H :10 :8 :9 :0 :4 :3 2 3 5 1 f(S) = g(S) + h(S) = 0 + 10  10 f(D) = (0+3) + 9  12 f(G) = (0+3+3) + 0  6 Total path cost = f(S)+f(D)+f(G) 28 Path cost for S-A-G’ f(S) = 0 + 10  10 f(A) = (0+2) + 8  10 f(G’) = (0+2+2) + 0  4 Total path cost = f(S)+f(A)+f(G’) 24 * Path S-A-G is chosen = Lowest cost

Heuristic Search : A* Algorithm

Heuristic Search : A* Algorithm

Heuristic Search : A* Algorithm TIN 5013: Artificial Intelligence

Heuristic Search : A* Algorithm

Heuristic Search : A* Algorithm TIN 5013: Artificial Intelligence

Issues in Heuristic Search Searching using heuristic function does not solely on directed solution  but the best algorithm to find shortest path towards goal. Admissible  attempt to find possible shortest path to a goal whenever it exists. Informedness  question in what sense the heuristic function is better than another. Monotonicity  question if the best state is discovered by heuristic search, is there any guarantee that the same state won’t be found later at lowest searching cost?

References Cawsey, A. (1998). The Essence of Artificial Intelligence, Prentice Hall. Russell, S. and Norvig, P. (2003). Artificial Intelligence: A Modern Approach, Prentice-Hall 2nd Edition.