Other partial solution strategies. Partial solution algorithms greedy  branch and bound  A*  divide and conquer  dynamic programming.

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Heuristic Searches. Feedback: Tutorial 1 Describing a state. Entire state space vs. incremental development. Elimination of children. Closed and the solution.
Review: Search problem formulation
Informed search algorithms
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
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.
Traveling Salesperson Problem
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2004.
Solving Problem by Searching
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
States and Search Core of intelligent behaviour. D Goforth - COSC 4117, fall The simple problem solver Restricted form of general agent: Figure.
Parsimony based phylogenetic trees Sushmita Roy BMI/CS 576 Sep 30 th, 2014.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Search by partial solutions. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Random restart General.
Route Planning Branch & Bound CIS548 November 15, 2006.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
Games with Chance Other Search Algorithms CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 3 Adapted from slides of Yoonsuck Choe.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
E.G.M. PetrakisAlgorithms and Complexity1 The sphere of algorithmic problems.
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
MAE 552 – Heuristic Optimization Lecture 26 April 1, 2002 Topic:Branch and Bound.
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.
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.
Ch 13 – Backtracking + Branch-and-Bound
5-Nov-2003 Heuristic Search Techniques What do you do when the search space is very large or infinite? We’ll study three more AI search algorithms: Backtracking.
Backtracking.
Problem-solving agents
Informed Search Idea: be smart about what paths to try.
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.
BackTracking CS335. N-Queens The object is to place queens on a chess board in such as way as no queen can capture another one in a single move –Recall.
P ROBLEM Write an algorithm that calculates the most efficient route between two points as quickly as possible.
Exact methods for ALB ALB problem can be considered as a shortest path problem The complete graph need not be developed since one can stop as soon as in.
Computer Science CPSC 322 Lecture 9 (Ch , 3.7.6) Slide 1.
Search by partial solutions.  nodes are partial or complete states  graphs are DAGs (may be trees) source (root) is empty state sinks (leaves) are complete.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
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..
COMP261 Lecture 6 Dijkstra’s Algorithm. Connectedness Is this graph connected or not? A Z FF C M N B Y BB S P DDGG AA R F G J L EE CC Q O V D T H W E.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
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.
Parsimony-Based Approaches to Inferring Phylogenetic Trees BMI/CS 576 Colin Dewey Fall 2015.
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
Ricochet Robots Mitch Powell Daniel Tilgner. Abstract Ricochet robots is a board game created in Germany in A player is given 30 seconds to find.
Informed Search CSE 473 University of Washington.
Constraint Propagation influenced by Dr. Rina Dechter, “Constraint Processing”
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
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
Optimization Problems The previous examples simply find a single solution What if we have a cost associated with each solution and we want to find the.
Constraints in Evolutionary Algorithms. Constraints: the big questions, page 233  how to evaluate and compare feasible and infeasible solutions  avoid,
For Monday Read chapter 4 exercise 1 No homework.
School of Computer Science & Engineering
Traveling Salesperson Problem
BackTracking CS255.
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Back Tracking.
Branch and Bound Searching Strategies
Lecture 3: Environs and Algorithms
Algorithms Lecture # 29 Dr. Sohail Aslam.
Backtracking and Branch-and-Bound
Informed Search Idea: be smart about what paths to try.
We have the following incomplete B&B tree:
Informed Search Idea: be smart about what paths to try.
Lecture 4: Tree Search Strategies
Presentation transcript:

Other partial solution strategies

Partial solution algorithms greedy  branch and bound  A*  divide and conquer  dynamic programming

4 queens: separate row and column complete solutions possible pruning More in next slide set…

Branch and Bound  eliminate subtrees of possible solutions based on evaluation of partial solutions complete solutions

e.g., branch and bound TSP complete solutions current best solution distance 498 distance so far 519

Branch and Bound requirement  a bound on best solution possible from current partial solution (e.g., if distance so far is 519, total distance is >519)  ‘tight’ as possible  quick to calculate  a current best solution (e.g., 498)

Tight bounds  value of partial solution plus  estimate of value of remaining steps must be ‘optimistic estimate’ example: path so far:519 remainder of path: 0 (not tight) bounded estimate:519

Optimistic but Tight Bound optimistic tight Current best Actual values if calculated

Example - b&b for TSP  Estimate a lower bound for the path length: Fast to calculate Easy to revise ABCDE A B C D87910 E

Example - b&b for TSP 1.Assume shortest edge to each city: ( ) = 40 A B C D E 2.Assume two shortest edges to each: ((7+8)+(7+7)+(9+10)+(7+8)+(10+11))/2 = = 42 Which is better? ABCDE A B C D87910 E

Tight Bound Path so far 0 40 Path so far Path so far = ( ) = 40 ABCDE A B C D87910 E Best Path found 46

B&B algorithm  Depth first traversal of partial solution space - leaves are complete solutions  Subtrees are pruned below a partial solution that cannot be better than the current best solution

Partial solution algorithms greedy branch and bound  A*  divide and conquer  dynamic programming

A* algorithm - improved b&b  Ultimate partial solution search  Based on tree searching algorithms you already know - bfs, dfs  Two versions: Simple - used on trees Advanced - used on general graphs

general search algorithm for trees* algorithm search (startState, fitnessFn()) returns bestState openList = new StateCollection(); openList.insert(startState) bestState = null bestFitness = min // assuming maximum wanted while (notEmpty(openList) && resourcesAvailable) state = openList.get() fitness = fitnessFn(state) if (state is complete and fitness > bestFitness ) bestFitness = fitness bestState = state for all values k in domain of next variable nextState = state.include(k) openList.insert(nextState) return solutionState *For graphs, cycles are a problem

Versions of general search  Based on the openList collection class Breadth first search Depth first search (->branch and bound) Best first search (informed search)  Best first  A*

A CBD FEGHIJKLMNOP QR ST UVWXYZabcdefghij kl mn algorithm search (startState, fitnessFn()) returns bestState openList = new StateCollection(); openList.insert(startState) bestState = null bestFitness = min // assuming maximum wanted while (notEmpty(openList) && resourcesAvailable) state = openList.get() fitness = fitnessFn(state) if (state is complete and fitness > bestFitness ) bestFitness = fitness bestState = state for all values k in domain of next variable nextState = state.include(k) openList.insert(nextState) return solutionState

A*  Best first search with a heuristic fitness function: Admissible (never pessimistic) Tradeoff: Simplicity vs accuracy/tightness  The heuristic heuristic: “Reduced problem” strategy e.g., min path length in TSP