CHAPTER 4, Part II Oliver Schulte Summer 2011 Local Search.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Informed search algorithms
Local Search Algorithms
Local Search Algorithms Chapter 4. Outline Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Ant Colony Optimization.
STRATEGI PENCARIAN DENGAN INFORMASI (INFORMED SEARCH STRATEGY)
Strategi Pencarian dengan Informasi (Informed Search Strategy)
LOCAL SEARCH AND CONTINUOUS SEARCH. Local search algorithms  In many optimization problems, the path to the goal is irrelevant ; the goal state itself.
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Local search algorithms
Local search algorithms
Two types of search problems
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Introduction to Artificial Intelligence Local Search (updated 4/30/2006) Henry Kautz.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Trading optimality for speed…
Adapted by Doug Downey from Bryan Pardo Fall 2007 Machine Learning EECS 349 Machine Learning Lecture 4: Greedy Local Search (Hill Climbing)
CSC344: AI for Games Lecture 4: Informed search
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.
Informed Search Methods
Local Search and Optimization
Informed Search Chapter 4 (b)
Search CSE When you can’t use A* Hill-climbing Simulated Annealing Other strategies 2 person- games.
An Introduction to Artificial Life Lecture 4b: Informed Search and Exploration Ramin Halavati In which we see how information.
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 search algorithms
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 Friday Finish chapter 6 Program 1, Milestone 1 due.
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.
Local Search and Optimization Presented by Collin Kanaley.
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.
Local Search Algorithms This lecture topic (two lectures) Chapter Next lecture topic Chapter 5 (Please read lecture topic material before and after.
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.
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"
Optimization via Search
Informed Search Chapter 4 (b)
Department of Computer Science
Local Search Algorithms
CMPT 310 Simon Fraser University CHAPTER 4 Oliver Schulte
Artificial Intelligence (CS 370D)
CMPT 310 Simon Fraser University CHAPTER 4 Oliver Schulte
Informed search algorithms
Informed search algorithms
CMPT 310 Simon Fraser University CHAPTER 4 Oliver Schulte
More on Search: A* and Optimization
Simon Fraser University
First Exam 18/10/2010.
Local Search Algorithms
Midterm Review.
CSC 380: Design and Analysis of Algorithms
Local Search Algorithms
Presentation transcript:

CHAPTER 4, Part II Oliver Schulte Summer 2011 Local Search

Outline Hill-Climbing Gradient Descent 2nd-order methods.

Environment Type Discussed In this Lecture Static Environment CMPT Blind Search 3 Fully Observable Deterministic Sequential yes Discrete yes Planning, heuristic search yes Control, cybernetics no Continuous Function Optimization Vector Search: Constraint Satisfaction no yes

Optimization Problems An optimization problem is of the form maximize f(x) subject to constraints on x where x is a vector of values. Equivalently minimize -f(x) subject to constraints on x If the constraints are linear (in)equalities, we have a linear programming problem. Very large literature built up over centuries.

AI examples Find the right angle of joints for pancake- flipping robots. Find the best weights for rules for reasoning. Basically, any problem with continuous variables at some point needs optimization to build the best agent.

Hill-climbing search Random-restart hill climbing over comes local maxima- Trivially complete Random Sideways move: escapes from shoulders, loops on flat maxima. Simple Video

Hill-climbing search

Example (discrete): n-queens Put n queens on an n × n board with no two queens on the same row, column, or diagonal Demo for n-Queens Hill-Climbing

Hill-climbing search: 8-queens problem h = number of pairs of queens that are attacking each other, either directly or indirectly h = 17 for the above state

Hill-climbing search: 8-queens problem A local minimum with h = 1

Gradient Descent: Choosing a direction. Intuition: think about trying to find street number 1000 on a block. You stop and see that you are at number 100. Which direction should you go, left or right? You initially check every 50 houses or so where you are. What happens when you get closer to the goal 1000? The fly and the window: the fly sees that the wall is darker, so the light gradient goes down: bad direction.

Gradient Descent In Multiple Dimensions Demo Wolfram Stochastic Version

Gradient Descent: Example. Try to find x,y that minimize f(x,y) = 3x + y 2. Your current location is x = 10, y = -3. What is ? ? Answer: the gradient vector is (3, 2y). Evaluated at the location (10,-3), the gradient is  = (3, -6). To minimize, we move in the opposite direction - . Letting the step size  = 1, your new location is (10,-3) - (3,-6) = (7, 3). Excel Demo

Better Approach: Newton-Raphson Uses information about second-order derivatives. Over 300 years old. Problem: find a root x such that g(x) = 0. Use update rule. x := x - g(x)/g'(x). Geometry: fit a line (tangent) to g(x), move to intersection with x-axis. Demo in 1 Dimension

Newton-Raphson for Optimization Want to find root of derivative: f'(z) = 0. NR update rule then becomes. z := z - f'(z)/f''(z). In our example with f(x,y) = 3x + y 2 there is no curvature in the x-dimension, so we use NR only in the second dimension with So the new location is (10,-3) - (3, -6/2) = (7,0). You can use NR with step sizes, but the method doesn’t require it. Change in Assignment 2: use the method without step sizes.

Newton-Raphson Geometry NR fits a quadratic function to the current location, then moves to the minimum of the quadratic. For more discussion and a picture see WikipediaWikipedia

Optimization Problems for Local Search As we get close to the minimum, a fixed step size can keep over/undershooting (oscillation).  See gradient descent example.  Simple solution: decrease step size with number of steps taken. No explicit goal statement – we don’t know when minimum has been reached.  Simple solution: stop searching when “not enough” progress has been made in the “last few” iterations.  These are user-defined parameters.

Refinements Many more strategies are used. Conjugate gradient descent: leave 0 gradient directions alone. Add probabilistic moves to avoid/escape from local minima (the fly again!). Random Restart. Stochastic Gradient Descent. Simulated Annealing (gradually reduce randomness). Genetic Algorithms (mutations). Try searching different locations (beam search). Learn during searching (tabu search).

Summary Greedy or Hill-Climbing Search: make local modifications to current state to find optimum. Use gradient information to find search direction. Main problem: get stuck in local optimum. Other problem: can be slow in high-dimensional spaces. Remember slow exploration of randomly moving robot. 2nd-order information speeds convergence.