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.

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
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*
Part2 AI as Representation and Search
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
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Search Techniques MSc AI module. Search In order to build a system to solve a problem we need to: Define and analyse the problem Acquire the knowledge.
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.
Search in AI.
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.
Informed Search (no corresponding text chapter). Recall: Wanted " An algorithm and associated data structure(s) that can: 1) Solve an arbitrary 8-puzzle.
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
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Problem Solving and Search in AI Heuristic Search
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.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
Using Search in Problem Solving
Ch 13 – Backtracking + Branch-and-Bound
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.
Branch and Bound Algorithm for Solving Integer Linear Programming
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.
1 Structures and Strategies for State Space Search 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
Search  Exhaustive/Blind Search Methods Depth First Search Breadth First Search  Heuristic Methods Hill Climbing Beam Search Best First Search…
Backtracking.
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.
Problem Solving and Search Andrea Danyluk September 11, 2013.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Search.
Search: Heuristic &Optimal Artificial Intelligence CMSC January 16, 2003.
Various Heuristic Searches Lecture Module 5. Heuristic Search Heuristics are criteria for deciding which among several alternatives be the most effective.
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.
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 Branch and Bound Searching Strategies Updated: 12/27/2010.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
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.
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.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
1 CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering
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
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.
Branch and Bound Searching Strategies
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.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
For Monday Read chapter 4 exercise 1 No homework.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
Artificial Intelligence Problem solving by searching CSC 361
Analysis and design of algorithm
Branch and Bound Searching Strategies
Tree Searching Strategies
Lecture 4: Tree Search Strategies
Presentation transcript:

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 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 How to expand the tree ? Breadth-First Search Depth-First Search Hill Climbing Best-First Search Branch-and-Bound Strategy (for optimization problems)

9 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. Otherwise, go to step 3. Step3 Step3: Remove the first element from the queue. Add the first element ’ s descendants, if any, to the end of the queue. Step4 Step4: If the queue is empty, then signal failure. Otherwise, go to Step 2.

Goal Node

11 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 queue is a goal node. If it is, stop. Otherwise, go to step 3. Step3 Step3: Remove the top element from the stack. Add the first element ’ s descendants, if any, to the top of the stack. Step4 Step4: If the stack is empty, then signal failure. Otherwise, go to Step 2.

12 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.

13 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.

14 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 queue is a goal node. If it is, stop. Otherwise, go to step 3. 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.

15 An 8-Puzzle Problem Solved by the Hill Climbing Method

16 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.

17 Best-First Search Scheme Step1 Step1:Form a one-element list consisting of the root node. Step2 Step2:Remove the first element from the list. Expand the first element. If one of the descendants of the first element is a goal node, then stop; otherwise, add the descendants into the list. Step3 Step3:Sort the entire list by the values of some estimation function. Step4 Step4:If the list is empty, then signal failure. Otherwise, go to Step 2.

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

19 The branch-and-bound strategy This strategy can be used to solve optimization problems without an exhaustive search. (DFS, BFS, hill climbing and best-first search can not be used to solve optimization problems.) E.g. A Multi-Stage Graph Searching Problem.

20 E.G.:A Multi-Stage Graph Searching Problem

21 Solved by branch-and-bound

22 Solved by branch-and-bound

23 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so that many braches can be terminated. Although it is usually very efficient, a very large tree may be generated in the worst case. It is efficient in the sense of average case.

24 Exercise Use BFS, DFS, Hill-Climbing and Best-First Search schemes to solve the following 8-puzzle problem with the evaluation function being the number of misplaced tiles Initial State: Goal State: