UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Heuristic Search Notes for Ch.12 of Bratko and Ch.2 of Shoham For CSCE 580.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
PROBLEM SOLVING AND SEARCH
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
Tree Searching. Tree searches A tree search starts at the root and explores nodes from there, looking for a goal node (a node that satisfies certain conditions,
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
Breadth-First and Depth-First Search
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 excerpts Graphs (breadth-first-search)
CS171 Introduction to Computer Science II Graphs Strike Back.
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
CS 261 – Recitation 9 & 10 Graphs & Final review
#1© K.Goczyła GRAPHS Definitions and data structuresDefinitions and data structures Traversing graphsTraversing graphs Searching for paths in graphsSearching.
State Space Search Algorithms CSE 472 Introduction to Artificial Intelligence Autumn 2003.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Blind State-Space Search Notes for Ch.11 of Bratko For CSCE 580 Sp03 Marco.
Review: Search problem formulation
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Controlling Backtracking Notes for Ch.5 of Bratko For CSCE 580 Sp03 Marco Valtorta.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Program 1 Fall 2008 Marco Valtorta
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.3 [P]: Searching Fall 2009 Marco Valtorta.
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
Using Search in Problem Solving
1 CMPUT 412 Search Algorithms Csaba Szepesvári University of Alberta TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Using Search in Problem Solving
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
Graphs & Graph Algorithms Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
Uninformed Search (cont.)
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Dijkstra’s Algorithm: Notes to Complement.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Monkey and Bananas Exercise Notes on Exercise 3.10 of Bratko For CSCE 580 Sp03.
State-Space Searches. 2 State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
State-Space Searches.
CS261 Data Structures DFS and BFS – Edge List Representation.
Dijkstra’s Algorithm and Heuristic Graph Search David Johnson.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Informed Search Strategies
Logic Programming Lecture 7: Search Strategies: Problem representations Depth-first, breadth-first, and AND/OR search.
GRAPHS
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
AND/OR Graphs Ivan Bratko Faculty of Information and Computer Sc. University of Ljubljana Useful for solving problems by problem decomposition Searching.
P ROBLEM Write an algorithm that calculates the most efficient route between two points as quickly as possible.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Artificial Intelligence LECTURE 4 ARTIFICIAL INTELLIGENCE LECTURES BY ENGR. QAZI ZIA.
Lecture 13 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
COMP261 Lecture 7 A* Search. A* search Can we do better than Dijkstra's algorithm? Yes! –want to explore more promising paths, not just shortest so far.
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.
Lecture 3: Uninformed Search
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Informed Search CSE 473 University of Washington.
COSC 2007 Data Structures II
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
Breadth First Search and Depth First Search. Greatest problem in Computer Science Has lead to a lot of new ideas and data structures Search engines before.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
Logic Programming Lecture 7: Search Strategies:
Solving problems by searching Uninformed search algorithms Discussion Class CS 171 Friday, October, 2nd (Please read lecture topic material before and.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Problem solving by searching CSC 361
Presentation transcript:

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Heuristic Search Notes for Ch.12 of Bratko and Ch.2 of Shoham For CSCE 580 Sp03 Marco Valtorta

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Generic Search Procedure procedure search(graph,startnode,goal) OPEN := [startnode]; CLOSED := [ ] found := false while OPEN is not empty and not found transfer a node N from OPEN to CLOSED if goal(N) then found := true else find all neighbors of N in the graph that are neither in OPEN nor in CLOSED and add them to OPEN if found then return N else fail

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Example Graph a i b c d e f l hj kg

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Depth-First Search The OPEN list is treated as a stack New paths are appended “on top” of the stack Complexity is quadratic in the length of solution path found, because of the membership test for OPEN and CLOSED: –each call to the test requires time proportional to the length of OPEN and CLOSED –the test is performed once per edge traversed, and in the worst case all edges will be traversed sect2_4.pl

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Complexity of DFS Complexity is quadratic in the length of solution path found, because of the membership test for OPEN and CLOSED: –each call to the test requires time proportional to the length of OPEN and CLOSED –the test is performed once per edge traversed, and in the worst case all edges will be traversed Version with side effects exploits the Prolog indexing mechanism to speed up tests

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Breadth-First Search sect2_5.pl In DFS, OPEN is treated as a stack: –append(NewPaths,MoreOPEN,NewOPEN) In BFS, OPEN is treated as a queue –append(MoreOPEN, NewPaths, NewOPEN) In the fast implementation, OPEN is implemented as a difference list

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Best-First Search BFS uses a heuristic function to estimate the promise of a node A* uses f = g + h as the heuristic h is admissible if is a lower bound (on h*). h is monotone (consistent) if h(n) <= h(m) + c(n,m) when n is a successor of m a_star in sect2_7.pl IDA* is an iterative deepening version of A*.