Artificial Intelligence (CS 370D)

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Lights Out Issues Questions? Comment from me.
Informed Search Algorithms
Notes Dijstra’s Algorithm Corrected syllabus.
Informed search algorithms
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Solving Problem by Searching
G5BAIM Artificial Intelligence Methods Graham Kendall Blind Searches.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
Problem Solving by Searching
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Introduction to Artificial Intelligence A* Search Ruth Bergman Fall 2002.
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.
Artificial Intelligence
Introduction to Artificial Intelligence A* Search Ruth Bergman Fall 2004.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Problem Solving and Search in AI Heuristic Search
CSC344: AI for Games Lecture 4: Informed search
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Rutgers CS440, Fall 2003 Heuristic search Reading: AIMA 2 nd ed., Ch
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms
1 CS 2710, ISSP 2610 Chapter 4, Part 1 Heuristic Search.
1 Shanghai Jiao Tong University Informed Search and Exploration.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
CSC3203: AI for Games Informed search (1) Patrick Olivier
Informed Search I (Beginning of AIMA Chapter 4.1)
Artificial Intelligence Problem solving by searching.
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Heuristic Search Foundations of Artificial Intelligence.
Introduction to Artificial Intelligence (G51IAI)
Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
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.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Review: Tree search Initialize the frontier using the starting state
Last time: Problem-Solving
Heuristic Functions.
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
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*
CS 4100 Artificial Intelligence
EA C461 – Artificial Intelligence
COMP 8620 Advanced Topics in AI
Informed search algorithms
Informed search algorithms
Artificial Intelligence
Artificial Intelligence
Solving Problems by Searching
Artificial Intelligence: Theory and Practice Ch. 3. Search
Informed Search.
Presentation transcript:

Artificial Intelligence (CS 370D) Princess Nora University Faculty of Computer & Information Systems Artificial Intelligence (CS 370D) Computer Science Department

(Chapter-3-Part3) Problem Solving and Search

Searching algorithm Uninformed Search Algorithms( Blind Search) 3.1 Breadth first Search 3.2 Depth First Search 3.3 Depth limited Search 3.4 Iterative Deeping Search 3. 5 Bidirectional Search Informed Search (Heuristic Search) Best First Search Greedy Search Perfect Information Search A* Search Iterative Deepening A* Search A* with PathMax

informed Search Algorithms (Heuristic Search) Best First Search Greedy Search Perfect Information Search A* Search Iterative Deepening A* Search A* with PathMax

Uninformed versus Informed Uninformed search Informed search does not have any additional information on the quality of states. So, it is impossible to determine which state is the better than others. As a result, search efficiency depends only on the structure of a state space heuristically informed search uses a certain kind of information about states in order to guide search along promising branches within a state space. Using problem specific knowledge as hints to guide the search.

Uninformed versus Informed (cont) Uninformed search Informed search look for solutions by systematically generating new states and checking each of them against the goal. It is very inefficient in most cases. Most successor states are “obviously” a bad choice. Such strategies do not use problem-specific knowledge They are almost always more efficient than uninformed strategies. May reduce time and space complexities. Evaluation function f(n) measures distance to the goal. Order nodes in Frontier according to f(n) and decide which node to expand next.

Informed search & Exploration Modified version from blind search algorithm Greedy best first search A* and its relatives The family of local search includes methods inspired by statistical physics [simulated annealing ] evolutionary biology [genetic algorithms] online search [in which agent is faced with state space that is completely unknown]

Informed search & Exploration Best first search Main idea: use an evaluation function f(n) for each node Implementation: Order the nodes in Frontier in decreasing order of desirability (from low f(n) which means high desirability to high f(n) which means low desirability. ) There is a whole family of best-first search strategies, each with a different evaluation function. Special cases: Greedy best-first search. A* search.

Best-first search Algorithm 1-greedy best first search Tries to expand the node that is closest to the goal Use straight line distance ex : hSLD(IN(Arad))=366 [note that the values of fn hSLD cannot be computed from the problem description itself]

Greedy Search Example 1 Straight line distances between cities which are additionally provided

The greedy best first search using hSLD finds a solution without ever expanding a node that is not on solution path, hence its cost is minimal This show why the algorithm is called greedy [at each step it tries to get as close to goal as it can]

Greedy Search Example 2 Straight line distances between cities which are additionally provided

Greedy best first search Consider the problem of getting from Iasi to Fagras The heuristic suggests that Neamt be expanded first because it is closest to Fagaras but it is like dead end The solution is to go first to Vaslui a step that is actually farther from the goal according to the heuristic & then continue to Urzicent, Bucharest and Fagaras. In this case , then heuristic causes unnecessary needs to be expanded Greedy best first search Resembles depth first search in the way it prefers to follow a single path all the way to goal but it will back up when it hits a dead end It is not optimal (greedy) and incomplete (because of backtracking)

f(state) = g(state) + h(state) Best-first search Algorithm 2-A* best first search Main idea: avoid expanding paths that are already expensive. Minimizing the total estimated solution cost It evaluate a node by F(n) = g(n) + h(n) Cost so far to reach n Estimated Cost to get from n to goal Path cost is g and heuristic function is h f(state) = g(state) + h(state) Choose smallest overall path cost (known + estimate)

Straight Line Distances to Bucharest A* Search Example Straight Line Distances to Bucharest Town SLD Arad 366 Bucharest Craiova 160 Dobreta 242 Eforie 161 Fagaras 178 Giurgiu 77 Hirsova 151 Iasi 226 Lugoj 244 Town SLD Mehadai 241 Neamt 234 Oradea 380 Pitesti 98 Rimnicu 193 Sibiu 253 Timisoara 329 Urziceni 80 Vaslui 199 Zerind 374 We can use straight line distances as an admissible heuristic as they will never overestimate the cost to the goal. This is because there is no shorter distance between two cities than the straight line distance. Press space to continue with the slideshow.

A* Search Example

A* Search Example

A* Search Example

Properties of A* Complete? Yes Time? Exponential Space? Keeps all nodes in memory Optimal? Yes

Examples

Find a shortest path from v0 to v3??? Shortest paths Find a shortest path from v0 to v3??? Can the greedy method solve this problem??? The shortest path: 1 + 2 + 4 = 7.

Shortest paths on a multi-stage graph Find a shortest path from v0 to v3 in the multi-stage graph. Greedy method: v0v1,2v2,1v3 = 23 Optimal: v0v1,1v2,2v3 = 7 The greedy method does not work.

Admissible heuristics (accepted evaluation function) h1(n) = number of misplaced tiles[tiles in wrong places) h2(n) = total Manhattan distance [how many moves to reach right place] (i.e., no. of squares from desired location of each tile) Start state Goal state h1(S) = ? h2(S) = ?

Admissible heuristics (accepted evaluation function) h1(n) = number of misplaced tiles[tiles in wrong places) h2(n) = total Manhattan distance [how many moves to reach right place] (i.e., no. of squares from desired location of each tile) h1(S) = 8 h2(S) = ?

Admissible heuristics (accepted evaluation function) E.g., for the 8-puzzle: h1(n) = number of misplaced tiles[tiles in wrong places) h2(n) = total Manhattan distance [how many moves to reach right place] (i.e., no. of squares from desired location of each tile) h1(S) = 8 h2(S) = 3+1+2+2+2+3+3+2 = 18

Dominance (which is better) If h2(n) ≥ h1(n) for all n (both admissible) then h2 dominates h1 h2 is better for search Typical search costs (average number of nodes expanded): d=12 IDS = 3,644,035 nodes A*(h1) = 227 nodes A*(h2) = 73 nodes d=24 IDS = too many nodes A*(h1) = 39,135 nodes A*(h2) = 1,641 nodes

Thank you End of Chapter 3-Part3