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.

Slides:



Advertisements
Similar presentations
Chapter 4: Informed Heuristic Search
Advertisements

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,
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search in AI.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
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
Using Search in Problem Solving
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.
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
Problem Solving and Search in AI Heuristic Search
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.
Solving problems by searching
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
Informed Search Idea: be smart about what paths to try.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
3.0 State Space Representation of Problems 3.1 Graphs 3.2 Formulating Search Problems 3.3 The 8-Puzzle as an example 3.4 State Space Representation using.
Informed Search Strategies
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.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
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.
1 CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering
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 CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering
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.
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.
CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
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.
Search Methodologies Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3: Search, A*
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
Alternative Search Formulations and Applications
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.
Department of Computer Science
Artificial Intelligence Problem solving by searching CSC 361
Heuristic Search Generate and Test Hill Climbing Best First Search
Tree Searching Strategies
Lecture 4: Tree Search Strategies
Presentation transcript:

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 problems becomes a tree searching problem.

3 Satisfiability problem Tree Representation of Eight Assignments. If there are n variables x 1, x 2, …,x n, then there are 2 n possible assignments.

4 Satisfiability problem An instance: -x 1 …….. …… (1) x 1 …………..(2) x 2 v x 5 …. ….(3) x 3 ……. …….(4) -x 2 ……. …….(5) A Partial Tree to Determine the Satisfiability Problem. We may not need to examine all possible assignments.

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

6 Fig. 6-8 The Tree Representation of Whether There Exists a Hamiltonian Circuit of the Graph in Fig. 6-6

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

8 8-Puzzle Problem Initial State: Goal State:

9 Tree Representation of the solution of 8-puzzle problem

10 How to 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 expansion. 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 E.G.: the depth-first search E.g. 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 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 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