Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Local Search Algorithms
Problem Solving by Searching
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Local search algorithms
Review: Search problem formulation
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Beyond Classical Search
Introduction to Artificial Intelligence Local Search (updated 4/30/2006) Henry Kautz.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Informed Search CSE 473 University of Washington.
Trading optimality for speed…
Simulated Annealing 10/7/2005.
CSC344: AI for Games Lecture 4: Informed search
PROBLEM SOLVING BY SEARCHING (2)
Informed Search Chapter 4 Adapted from materials by Tim Finin, Marie desJardins, and Charles R. Dyer CS 63.
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Local Search and Optimization
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
Search CSE When you can’t use A* Hill-climbing Simulated Annealing Other strategies 2 person- games.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
1 Beyond Classical Search Chapter 3 covered problems that considered the whole search space and produced a sequence of actions leading to a goal. Chapter.
Local Search Algorithms This lecture topic Chapter Next lecture topic Chapter 5 (Please read lecture topic material before and after each lecture.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms
Informed (Heuristic) Search
Informed search algorithms
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
1 Shanghai Jiao Tong University Informed Search and Exploration.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
Local Search Algorithms
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Local search algorithms In many optimization problems, the state space is the space of all possible complete solutions We have an objective function that.
Optimization Problems
Announcement "A note taker is being recruited for this class. No extra time outside of class is required. If you take clear, well-organized notes, this.
Problem Spaces & Search Dan Weld CSE 573. © Daniel S. Weld 2 Logistics Read rest of R&N chapter 4 Also read chapter 5 PS 1 will arrive by , so be.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Chapter 4 (Section 4.3, …) 2 nd Edition or Chapter 4 (3 rd Edition) Local Search and Optimization.
Lecture 6 – Local Search Dr. Muhammad Adnan Hashmi 1 24 February 2016.
Local Search Algorithms and Optimization Problems
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Local Search and Optimization Chapter 4 Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld…) 1.
Local Search Algorithms CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
Constraints Satisfaction Edmondo Trentin, DIISM. Constraint Satisfaction Problems: Local Search In many optimization problems, the path to the goal is.
Local search algorithms In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution State space = set of "complete"
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
CSCI 4310 Lecture 10: Local Search Algorithms
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Logistics Problem Set 1 Mailing List Due 10/13 at start of class
Local Search Algorithms
Artificial Intelligence (CS 370D)
Heuristics Local Search
More on Search: A* and Optimization
Heuristics Local Search
Artificial Intelligence
More on HW 2 (due Jan 26) Again, it must be in Python 2.7.
More on HW 2 (due Jan 26) Again, it must be in Python 2.7.
First Exam 18/10/2010.
Local Search Algorithms
Local Search Algorithms
Presentation transcript:

Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best first search is not optimal, not complete, and has complexity O(bm).

Review A* search uses f(n) = g(n) + h(n). A* search is complete. A* is optimal if h(n) is admissable h(n) <= h*(n) for true cost h* with tree search with graph search, if it discards the more expensive of any 2 paths to the same node or if h(n) is consistent h(n) <= c(n,a,n’)+h(n’).

Performance of Heuristics How do we evaluate a heuristic function? effective branching factor If A* using h finds a solution at depth d using N nodes, then the effective branching factor is b | N ~ 1 + b + b + . . . + b Example 2 3 d =

Table of Effective Branching Factors b d N 2 2 7 2 5 63 3 2 13 3 5 364 3 10 88573 6 2 43 6 5 9331 6 10 72,559,411 How might we use this idea to evaluate a heuristic?

Complexity of A* Time complexity is exponential in the length of the solution path unless |h(n) – h(n*)| < O(log h*(n)) which we can’t guarantee. But, this is AI, computers are fast, and a good heuristic helps a lot. Space complexity is also exponential, because it keeps all generated nodes in memory.

Why not always use A*? Pros Cons

Iterative-Deepening A* Like iterative-deepening depth-first, but... Depth bound modified to be an f-limit Start with limit = h(start) Prune any node if f(node) > f-limit Next f-limit=min-cost of any node pruned FL=21 e FL=15 d a f How would this work? b c

Depth-First Branch & Bound Single DF search  uses linear space Keep track of best solution so far If f(n) = g(n)+h(n)  cost(best-soln) Then prune n Requires Finite search tree, or Good upper bound on solution cost Adapted from Richard Korf presentation

Local Search Algorithms and Optimization Problems Complete state formulation For example, for the 8 queens problem, all 8 queens are on the board and need to be moved around to get to a goal state Equivalent to optimization problems often found in science and engineering Start somewhere and try to get to the solution from there Local search around the current state to decide where to go next

Hill Climbing “Gradient ascent” solution Note: solutions shown here as max not min. Often used for numerical optimization problems. How does it work?

AI Hill Climbing Steepest-Ascent Hill Climbing current <- start state; if it’s a goal return it. loop initialize best_successsor for each operator apply operator to current to get next if next is a goal, return it and quit if next is better than best_successor, best_successor <- next if best-successor is better than current, current <- best_successor end loop

Hill Climbing Search current 4 10 3 2 8

Hill Climbing Problems Local maxima Plateaus Diagonal ridges What is it sensitive to? Does it have any advantages?

Solving the Problems Allow backtracking (What happens to complexity?) Stochastic hill climbing: choose at random from uphill moves, using steepness for a probability Random restarts: “If at first you don’t succeed, try, try again.” Several moves in each of several directions, then test Jump to a different part of the search space

Simulated Annealing Variant of hill climbing (so up is good) Tries to explore enough of the search space early on, so that the final solution is less sensitive to the start state May make some downhill moves before finding a good way to move uphill.

Simulated Annealing heat cool Comes from the physical process of annealing in which substances are raised to high energy levels (melted) and then cooled to solid state. The probability of moving to a higher energy state, instead of lower is p = e^(-E/kT) where E is the positive change in energy level, T is the temperature, and k is Bolzmann’s constant. heat cool

Simulated Annealing At the beginning, the temperature is high. As the temperature becomes lower kT becomes lower E/kT gets bigger (-E/kT) gets smaller e^(-E/kT) gets smaller As the process continues, the probability of a downhill move gets smaller and smaller.

For Simulated Annealing E represents the change in the value of the objective function. Since the physical relationships no longer apply, drop k. So p = e^(-E/T) We need an annealing schedule, which is a sequence of values of T: T0, T1, T2, ...

Simulated Annealing Algorithm current <- start state; if it’s a goal, return it for each T on the schedule /* need a schedule */ next <- randomly selected successor of current evaluate next; it it’s a goal, return it E <- value(next) – value(current) /* already negated */ if E > 0 then current <- next /* better than current */ else current <- next with probability e^(E/T) How would you do this probabilistic selection?

Simulated Annealing Properties At a fixed “temperature” T, state occupation probability reaches the Boltzman distribution If T is decreased slowly enough (very slowly), the procedure will reach the best state. Slowly enough has proven too slow for some researchers who have developed alternate schedules. p(x) = e^(E(x)/kT)

Simulated Annealing Schedules Acceptance criterion and cooling schedule

Simulated Annealing Applications Basic Problems Traveling salesman Graph partitioning Matching problems Graph coloring Scheduling Engineering VLSI design Placement Routing Array logic minimization Layout Facilities layout Image processing Code design in information theory

Local Beam Search Keeps more previous states in memory Simulated annealing just kept one previous state in memory. This search keeps k states in memory. - randomly generate k initial states - if any state is a goal, terminate - else, generate all successors and select best k - repeat What does your book say is good about this?

Genetic Algorithms Crossover Mutation 174629844710 174611094281 Start with random population of states Representation serialized (ie. strings of characters or bits) States are ranked with “fitness function” Produce new generation Select random pair(s) using probability: probability ~ fitness Randomly choose “crossover point” Offspring mix halves Randomly mutate bits Crossover Mutation 174629844710 174611094281 164611094281   776511094281 776529844710 776029844210