Local Search Algorithms

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

G5BAIM Artificial Intelligence Methods
CS6800 Advanced Theory of Computation
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Neural and Evolutionary Computing - Lecture 4 1 Random Search Algorithms. Simulated Annealing Motivation Simple Random Search Algorithms Simulated Annealing.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) February, 9, 2009.
Local and Stochastic Search based on Russ Greiner’s notes.
Spie98-1 Evolutionary Algorithms, Simulated Annealing, and Tabu Search: A Comparative Study H. Youssef, S. M. Sait, H. Adiche
Tabu Search for Model Selection in Multiple Regression Zvi Drezner California State University Fullerton.
Local search algorithms
Local Search Algorithms.  involve finding a grouping, ordering, or assignment of a discrete set of objects which satisfies certain constraints  arise.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Local and Stochastic Search Based on Russ Greiner’s notes.
Introduction to Artificial Intelligence Local Search (updated 4/30/2006) Henry Kautz.
Intelligent Agents What is the basic framework we use to construct intelligent programs?
MAE 552 – Heuristic Optimization
Imagine that I am in a good mood Imagine that I am going to give you some money ! In particular I am going to give you z dollars, after you tell me the.
Ant Colony Optimization Optimisation Methods. Overview.
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.
Informed Search Next time: Search Application Reading: Machine Translation paper under Links Username and password will be mailed to class.
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
Metaheuristics The idea: search the solution space directly. No math models, only a set of algorithmic steps, iterative method. Find a feasible solution.
Elements of the Heuristic Approach
Local Search CS311 David Kauchak Spring 2013 Some material borrowed from: Sara Owsley Sood and others.
Escaping local optimas Accept nonimproving neighbors – Tabu search and simulated annealing Iterating with different initial solutions – Multistart local.
Genetic Algorithms and Ant Colony Optimisation
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.
Heuristic Optimization Methods
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.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti
CS 484 – Artificial Intelligence1 Announcements Homework 2 due today Lab 1 due Thursday, 9/20 Homework 3 has been posted Autumn – Current Event Tuesday.
Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!
Escaping Local Optima. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Random restart General.
Simulated Annealing.
Local Search: walksat, ant colonies, and genetic algorithms.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
Lecture 3: Uninformed Search
G5BAIM Artificial Intelligence Methods
Single-solution based metaheuristics. Outline Local Search Simulated annealing Tabu search …
1 Genetic Algorithms and Ant Colony Optimisation.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Probabilistic Algorithms Evolutionary Algorithms Simulated Annealing.
Local Search and Optimization Presented by Collin Kanaley.
Presenter: Leo, Shih-Chang, Lin Advisor: Frank, Yeong-Sung, Lin /12/16.
Optimization Problems
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Local Search Algorithms and Optimization Problems
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) Oct, 11, 2013.
Escaping Local Optima. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Exhaustive search Hill.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
1 Intro to AI Local Search. 2 Intro to AI Local search and optimization Local search: –use single current state & move to neighboring states Idea: –start.
Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
CSCI 4310 Lecture 10: Local Search Algorithms
School of Computer Science & Engineering
Local Search Strategies: From N-Queens to Walksat
Artificial Intelligence (CS 370D)
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
metaheuristic methods and their applications
Study Guide for ES205 Yu-Chi Ho Jonathan T. Lee Nov. 7, 2000
Metaheuristic methods and their applications. Optimization Problems Strategies for Solving NP-hard Optimization Problems What is a Metaheuristic Method?
Multi-Objective Optimization
School of Computer Science & Engineering
Design & Analysis of Algorithms Combinatorial optimization
Presentation transcript:

Local Search Algorithms

Local Search

Combinatorial problems ... involve finding a grouping, ordering, or assignment of a discrete set of objects which satisfies certain constraints arise in many domains of computer science and various application areas have high computational complexity (NP-hard) are solved in practice by searching an exponentially large space of candidate / partial solutions

Examples for combinatorial problems: finding shortest/cheapest round trips (TSP) finding models of propositional formulae (SAT) planning, scheduling, time-tabling resource allocation protein structure prediction genome sequence assembly

The Propositional Satisfiability Problem (SAT)

SAT

The Traveling Salesperson Problem (TSP) TSP – optimization variant: For a given weighted graph G = (V,E,w), find a Hamiltonian cycle in G with minimal weight, i.e., find the shortest round-trip visiting each vertex exactly once. TSP – decision variant: For a given weighted graph G = (V,E,w), decide whether a Hamiltonian cycle with minimal weight ≤ b exists in G.

TSP instance: shortest round trip through 532 US cities

Search Methods Types of search methods: systematic ←→ local search deterministic ←→ stochastic sequential ←→ parallel

Local Search (LS) Algorithms search space S (SAT: set of all complete truth assignments to propositional variables) solution set (SAT: models of given formula) neighborhood relation (SAT: neighboring variable assignments differ in the truth value of exactly one variable) evaluation function g : S → R+ (SAT: number of clauses unsatisfied under given assignment)

Local Search: start from initial position iteratively move from current position to neighboring position use evaluation function for guidance Two main classes: local search on partial solutions local search on complete solutions

local search on partial solutions

Local search for partial solutions Order the variables in some order. Span a tree such that at each level a given value is assigned a value. Perform a depth-first search. But, use heuristics to guide the search. Choose the best child according to some heuristics. (DFS with node ordering)

Construction Heuristics for partial solutions search space: space of partial solutions search steps: extend partial solutions with assignment for the next element solution elements are often ranked according to a greedy evaluation function

Nearest Neighbor heuristic for the TSP:

Nearest neighbor tour through 532 US cities

DFS Once a solution has been found (with the first dive into the tree) we can continue search the tree with DFS and backtracking. In fact, this is what we did with DFBnB. DFBnB with node ordering.

Limited Discrepancy Search At each node, the heuristic prefers one of the children. A discrepancy is when you go against the heuristic. Perform DFS from the root node with k discrepancies Start with k=0 Then increasing k by 1 Stop at anytime.

Number of Discrepancies Assume a binary tree where the heuristic always prefers the left child. 1 1 2 1 2 2 3 1

Limited Discrepancy Search Advantages: Anytime algorithm Solutions are ordered according to heuristics

local search on complete solutions

Iterative Improvement (Greedy Search): • initialize search at some point of search space • in each step, move from the current search position to a neighboring position with better evaluation function value

Iterative Improvement for SAT initialization: randomly chosen, complete truth assignment neighborhood: variable assignments are neighbors iff they differ in truth value of one variable neighborhood size: O(n) where n = number of variables evaluation function: number of clauses unsatisfied under given assignment

f-value = evaluation(state) Hill climbing Choose the nieghbor with the largest improvment as the next state states f-value f-value = evaluation(state) while f-value(state) > f-value(next-best(state)) state := next-best(state)

Hill climbing function Hill-Climbing(problem) returns a solution state current  Make-Node(Initial-State[problem]) loop do next  a highest-valued successor of current if Value[next] < Value[current] then return current current next end

Problems with local search Typical problems with local search (with hill climbing in particular) getting stuck in local optima being misguided by evaluation/objective function

Stochastic Local Search randomize initialization step randomize search steps such that suboptimal/worsening steps are allowed improved performance & robustness typically, degree of randomization controlled by noise parameter

Stochastic Local Search Pros: for many combinatorial problems more efficient than systematic search easy to implement easy to parallelize Cons: often incomplete (no guarantees for finding existing solutions) highly stochastic behavior often difficult to analyze theoretically/empirically

Simple SLS methods Random Search (Blind Guessing): In each step, randomly select one element of the search space. (Uninformed) RandomWalk: In each step, randomly select one of the neighbouring positions of the search space and move there.

Random restart hill climbing אם הפתרון שמצאת טוב יותר מהפתרון הטוב ביותר שנמצא עד כה – שמור אותו. חזור ל-1. מתי נסיים? – לאחר מספר קבוע של איטרציות. – לאחר מספר קבוע של איטרציות שבהן לא נמצא שיפור לפתרון הטוב ביותר שנמצא עד כה.

Random restart hill climbing states f-value f-value = evaluation(state)

Randomized Iterative Improvement: initialize search at some point of search space search steps: with probability p, move from current search position to a randomly selected neighboring position otherwise, move from current search position to neighboring position with better evaluation function value. Has many variations of how to choose the randomly neighbor, and how many of them Example: Take 100 steps in one direction (Army mistake correction) – to escape from local optima.

Simulated annealing Combinatorial search technique inspired by the physical process of annealing [Kirkpatrick et al. 1983, Cerny 1985] Outline Select a neighbor at random. If better than current state go there. Otherwise, go there with some probability. Probability goes down with time (similar to temperature cooling)

Simulated annealing eE/T

Generic choices for annealing schedule

Pseudo code function Simulated-Annealing(problem, schedule) returns solution state current  Make-Node(Initial-State[problem]) for t  1 to infinity T  schedule[t] // T goes downwards. if T = 0 then return current next  Random-Successor(current) E  f-Value[next] - f-Value[current] if E > 0 then current  next else current next with probability eE/T end

Example application to the TSP [Johnson & McGeoch 1997] baseline implementation: start with random initial solution use 2-exchange neighborhood simple annealing schedule;  relatively poor performance improvements: look-up table for acceptance probabilities neighborhood pruning low-temperature starts

Summary-Simulated Annealing is historically important is easy to implement has interesting theoretical properties (convergence), but these are of very limited practical relevance achieves good performance often at the cost of substantial run-times

Tabu Search Combinatorial search technique which heavily relies on the use of an explicit memory of the search process [Glover 1989, 1990] to guide search process memory typically contains only specific attributes of previously seen solutions simple tabu search strategies exploit only short term memory more complex tabu search strategies exploit long term memory

Tabu search – exploiting short term memory in each step, move to best neighboring solution although it may be worse than current one to avoid cycles, tabu search tries to avoid revisiting previously seen solutions by basing the memory on attributes of recently seen solutions tabu list stores attributes of the tl most recently visited solutions; parameter tl is called tabu list length or tabu tenure solutions which contain tabu attributes are forbidden

Tabu Search Problem: previously unseen solutions may be tabu  use of aspiration criteria to override tabu status Stopping criteria: all neighboring solutions are tabu maximum number of iterations exceeded number of iterations without improvement  Robust Tabu Search [Taillard 1991], Reactive Tabu Search[Battiti & Tecchiolli 1994–1997]

Example: Tabu Search for SAT / MAX-SAT Neighborhood: assignments which differ in exactly one variable instantiation Tabu attributes: variables Tabu criterion: flipping a variable is forbidden for a given number of iterations Aspiration criterion: if flipping a tabu variable leads to a better solution, the variable’s tabu status is overridden [Hansen & Jaumard 1990; Selman & Kautz 1994]

Genetic algorithms Combinatorial search technique inspired by the evolution of biological species. population of individual solutions represented as strings individuals within population are evaluated based on their “fitness” (evaluation function value) population is manipulated via evolutionary operators – mutation – crossover – selection

Genetic algorithms How to generate the next generation. 1) Selection: we select a number of states from the current generation. (we can use the fitness function in any reasonable way) 2) crossover : select 2 states and reproduce a child. 3) mutation: change some of the genues.

General Genetic algorithm Pop= initial population Repeat{ NEW_POP = EMPTY; for i=1 to POP_SIZE{ x=fit_individual; // natural selection y=fit_individual; child=cross_over(x,y); if(small random probability) mutate(child); add child to NEW_POP } POP=NEW_POP } UNTIL solution found Return(best state in POP)

Example

8-queen example

Summary: Genetic Algorithms use populations, which leads to increased search space exploration allow for a large number of different implementation choices typically reach best performance when using operators that are based on problem characteristics achieve good performance on a wide range of problems