1 Tree Searching Strategies 2010/12/03. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems.

Slides:



Advertisements
Similar presentations
Chapter 4: Informed Heuristic Search
Advertisements

Traveling Salesperson Problem
Informed search algorithms
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*
5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
Branch & Bound Algorithms
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
1 Tree Searching Strategies Updated: 2010/12/27. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search in AI.
Artificial Intelligence Lecture
Mahgul Gulzai Moomal Umer Rabail Hafeez
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
Branch and Bound Searching Strategies
6 - 1 § 6 The Searching Strategies e.g. satisfiability problem x1x1 x2x2 x3x3 FFF FFT FTF FTT TFF TFT TTF TTT.
Toy Problem: Missionaries and Cannibals
Informed Search (no corresponding text chapter). Recall: Wanted " An algorithm and associated data structure(s) that can: 1) Solve an arbitrary 8-puzzle.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
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.
Find a Path s A D B E C F G Heuristically Informed Methods  Which node do I expand next?  What information can I use to guide this.
Using Search in Problem Solving
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.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Breadth-first search (BFS) 8-puzzle problem The breadth-first search uses a queue to hold all expanded nodes.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
Solving problems by searching
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
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Various Heuristic Searches Lecture Module 5. Heuristic Search Heuristics are criteria for deciding which among several alternatives be the most effective.
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.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
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
1 Solving problems by searching 171, Class 2 Chapter 3.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Basic Search Procedure 1. Start with the start node (root of the search tree) and place in on the queue 2. Remove the front node in the queue and If the.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
1 search CS 331/531 Dr M M Awais REPRESENTATION METHODS Represent the information: Animals are generally divided into birds and mammals. Birds are further.
State space representations and search strategies - 2 Spring 2007, Juris Vīksna.
Rooted Tree a b d ef i j g h c k root parent node (self) child descendent leaf (no children) e, i, k, g, h are leaves internal node (not a leaf) sibling.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
Searching for Solutions
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Branch and Bound Searching Strategies
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
© 2006 Pearson Addison-Wesley. All rights reserved14 B-1 Chapter 14 (continued) Graphs.
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.
Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Graphs Chapter 20.
Breadth First and Depth First
Artificial Intelligence Problem solving by searching CSC 361
Breadth-First Searches
Branch and Bound Searching Strategies
Heuristic Search Generate and Test Hill Climbing Best First Search
Tree Searching Strategies
Lecture 4: Tree Search Strategies
Presentation transcript:

1 Tree Searching Strategies 2010/12/03

2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree searching problem.

Sir William Rowan Hamilton (4 August 1805–2 September 1865) was an Irish physicist, astronomer, and mathematician 3

4 Hamiltonian circuit problem E.g. the Hamiltonian circuit problem A Graph Containing a Hamiltonian Circuit

5 Fig. 6-8 The tree representation of whether there exists a Hamiltonian circuit of the graph in Fig. 6-6

6 A tree showing the non-existence of any Hamiltonian circuit.

The Traveling Salesperson Problem (TSP) The traveling salesperson problem asks for a Hamiltonian circuit of the minimum length. (NP-complete problem) 7

8 8-Puzzle Problem Initial State: Goal State:

9 Tree Representation of the solution of 8-puzzle problem

10 How to visit and expand the tree ? Breadth-First Search Depth-First Search Hill Climbing Best-First Search

11 Breadth-First Search Scheme In breadth-first search, all the nodes on one level of the tree are examined before the nodes on the next level are examined. It can be accomplished with the help of the queue.

12 Breadth-First Search Scheme Step1 Step1: Form a one-element queue consisting of the root node. Step2 Step2: Test to see if the first element in the queue is a goal node. If it is, stop. Step3 Step3: Remove the first element from the queue. Add all descendants of the first element, if any, to the end of the queue one by one. Step4 Step4: If the queue is empty, then signal failure. Otherwise, go to Step 2.

Goal Node

14 Depth-First Search Scheme The depth-first search always selects the deepest node for further expansion (visiting- and-expanding). It can be accomplished with the help of the stack.

15 Depth-First Search Scheme Step1 Step1: Form a one-element stack consisting of the root node. Step2 Step2: Test to see if the top element in the stack is a goal node. If it is, stop. Step3 Step3: Remove the top element from the stack. Add all descendants of the first element, if any, to the top of the stack one by one. Step4 Step4: If the stack is empty, then signal failure. Otherwise, go to Step 2.

16 Example: The sum of subset problem solved by depth-first search The sum of subset problem: Given a set S={7, 5, 1, 2, 10}, answer if  S ’  S  sum of S ’ = 9. The sum of subset problem solved by depth-first search

17 Hill Climbing A variant of depth-first search The method selects the locally optimal node to expand. E.G.: For the 8-puzzle problem, evaluation function is f(n) = w(n), where w(n) is the number of misplaced tiles in node n.

18 Hill Climbing Search Scheme Step1 Step1: Form a one-element stack consisting of the root node. Step2 Step2: Test to see if the top element in the stack is a goal node. If it is, stop. Step3 Step3: Remove the top element from the stack. Add the first element ’ s descendants, if any, to the top of the stack according to the order computed by the evaluation function. Step4 Step4: If the stack is empty, then signal failure. Otherwise, go to Step 2.

19 An 8-puzzle problem solved by the hill climbing method

20 Best-first search strategy Combing depth-first search and breadth-first search Selecting the node with the best estimated cost among all nodes. This method has a global view.

21 Best-First Search Scheme Step1 Step1:Consturct a heap by using the evaluation function. First, form a 1-element heap consisting of the root node. Step2 Step2:Test to see if the root element in the heap is a goal node. If it is, stop. Step3 Step3:Remove the root element from the heap and expand the element, i.e., add all descendants of the element into the heap. Step4 Step4:If the heap is empty, then signal failure. Otherwise, go to Step 2.

22 An 8-Puzzle Problem Solved by the Best-First Search Scheme Goal Node

Q&A 23