Algorithms and their Applications CS2004 ( )

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Local optimization technique G.Anuradha. Introduction The evaluation function defines a quality measure score landscape/response surface/fitness landscape.
G5BAIM Artificial Intelligence Methods
Neural and Evolutionary Computing - Lecture 4 1 Random Search Algorithms. Simulated Annealing Motivation Simple Random Search Algorithms Simulated Annealing.
ISE480 Sequencing and Scheduling Izmir University of Economics ISE Fall Semestre.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Gizem ALAGÖZ. Simulation optimization has received considerable attention from both simulation researchers and practitioners. Both continuous and discrete.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) February, 9, 2009.
Spie98-1 Evolutionary Algorithms, Simulated Annealing, and Tabu Search: A Comparative Study H. Youssef, S. M. Sait, H. Adiche
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Tabu Search for Model Selection in Multiple Regression Zvi Drezner California State University Fullerton.
MAE 552 – Heuristic Optimization Lecture 24 March 20, 2002 Topic: Tabu Search.
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
1 Chapter 5 Advanced Search. 2 l
MAE 552 – Heuristic Optimization
Ant Colony Optimization Optimisation Methods. Overview.
A TABU SEARCH APPROACH TO POLYGONAL APPROXIMATION OF DIGITAL CURVES.
1 IOE/MFG 543 Chapter 14: General purpose procedures for scheduling in practice Section 14.4: Local search (Simulated annealing and tabu search)
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Ant Colony Optimization: an introduction
G5BAIM Artificial Intelligence Methods Tabu Search.
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
Genetic Algorithm.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Heuristic Optimization Methods
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Tabu Search UW Spring 2005 INDE 516 Project 2 Lei Li, HongRui Liu, Roberto Lu.
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
Optimization Problems - Optimization: In the real world, there are many problems (e.g. Traveling Salesman Problem, Playing Chess ) that have numerous possible.
Heuristic Optimization Methods Tabu Search: Advanced Topics.
Simulated Annealing.
Course: Logic Programming and Constraints
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Thursday, May 9 Heuristic Search: methods for solving difficult optimization problems Handouts: Lecture Notes See the introduction to the paper.
FORS 8450 Advanced Forest Planning Lecture 11 Tabu Search.
FORS 8450 Advanced Forest Planning Lecture 5 Relatively Straightforward Stochastic Approach.
G5BAIM Artificial Intelligence Methods
Single-solution based metaheuristics. Outline Local Search Simulated annealing Tabu search …
Reactive Tabu Search Contents A brief review of search techniques
Probabilistic Algorithms Evolutionary Algorithms Simulated Annealing.
Local Search and Optimization Presented by Collin Kanaley.
Optimization Problems
Heuristic Methods for the Single- Machine Problem Chapter 4 Elements of Sequencing and Scheduling by Kenneth R. Baker Byung-Hyun Ha R2.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) Oct, 11, 2013.
Selection and Recombination Temi avanzati di Intelligenza Artificiale - Lecture 4 Prof. Vincenzo Cutello Department of Mathematics and Computer Science.
Escaping Local Optima. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Exhaustive search Hill.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Tabu Search Subset of Slides from Lei Li, HongRui Liu, Roberto Lu Edited by J. Wiebe.
Optimization Problems
Optimization via Search
CSCI 4310 Lecture 10: Local Search Algorithms
Heuristic Optimization Methods
Digital Optimization Martynas Vaidelys.
School of Computer Science & Engineering
Local Search Algorithms
Tabu Search Review: Branch and bound has a “rigid” memory structure (i.e. all branches are completed or fathomed). Simulated Annealing has no memory structure.
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
Optimization Problems
Metaheuristic methods and their applications. Optimization Problems Strategies for Solving NP-hard Optimization Problems What is a Metaheuristic Method?
School of Computer Science & Engineering
Subset of Slides from Lei Li, HongRui Liu, Roberto Lu
More on Search: A* and Optimization
Local Search Algorithms
Presentation transcript:

Algorithms and their Applications CS2004 (2012-2013) Dr Stephen Swift 10.1 Tabu Search and ILS

Previously On CS2004 – Part 1 So far we have looked at: Concepts of Computation and Algorithms Comparing algorithms Some mathematical foundation The Big-Oh notation Computational Complexity Data Structures Sorting Algorithms Graphs and Graph Algorithms Tabu Search and ILS

Previously On CS2004 – Part 2 We then moved focus to Heuristic Search Algorithms: Concepts Fitness Representation Search Space Methods Hill Climbing Stochastic Hill Climbing Random Restart Hill Climbing Simulated Annealing Tabu Search and ILS

Introduction In this lecture we are going to look into two Heuristic Search methods: Tabu Search (TS) Iterated Local Search (ILS) We are then going to look into some of the implementation details involved in applying ILS to the Scales problem Representation improvements An Updatable Fitness Function Performance Tabu Search and ILS

Heuristics A “rule of thumb” No guarantees on quality of solution Usually fast and are widely used Sometimes we run them multiple times and analyse the results Studied experimentally on benchmark datasets Tabu Search and ILS

Popular Heuristics Hill Climbing Simulated Annealing Always go up hill (accept only better quality solutions) Simulated Annealing The concepts of annealing and temperature Iterated Local Search See later slide Tabu Search Genetic Algorithms Simulated evolution See later lecture Ant Colony Optimisation Pheromones and cooperation …… Tabu Search and ILS

Local View of Search Tabu Search and ILS

Tabu (Taboo) Search Tabu search tries to model human memory processes Key idea: Use aspects of search history (memory) to escape from local minima A tabu-list is maintained throughout the search Associate tabu attributes with candidate solutions or solution components Moves according to the items on the list are forbidden Tabu Search and ILS

Flow Chart of a Standard Tabu Search Algorithm START Initialise solution Create a candidate list of solutions Evaluate solutions Stopping conditions satisfied? Update Tabu & Aspiration Conditions Choose the best admissible solution No END Yes Final solution Tabu Search and ILS Slide 9

Tabu Search – Key Concepts A search (similar to Hill Climbing) that remembers sets of points in the search space These are called the Tabu list and are to be avoided The idea is that this helps in avoiding local optima However if a point is evaluated to be better than any points discovered so far, then the Tabu list may be updated Aspiration Criteria Tabu Search and ILS

Tabu Search Stopping Conditions Some immediate stopping conditions: No feasible solution in the neighborhood of solution The maximum amount of iterations or CPU time has been exceeded The number of iterations since the last improvement is larger than a specified number Evidence can be given than an optimum solution has been obtained Tabu Search and ILS Slide 11

Parameters of Tabu Search Local search procedure Neighborhood structure Tabu attributes Aspiration conditions Form of tabu moves Maximum size of tabu list Stopping rule Tabu Search and ILS Slide 12

Pros and Cons for Tabu Search The use of a Tabu list Can be applied to both discrete and continuous solution spaces A meta-heuristic that guides a local search procedure to explore the solution space beyond local optimality For larger and more difficult problems (scheduling, quadratic assignment and vehicle routing), tabu search obtains solutions that rival and often surpass the best solutions previously found by other approaches Cons: Too many parameters to be determined Number of iterations could be very large Global optimum may not be found, depends on parameter settings Tabu list can grow out of control Tabu Search and ILS Slide 13

Iterated Local Search (ILS) Key Concepts ILS uses another local search algorithm as part of the algorithm E.g. Hill Climbing It uses information regarding previously discovered local optima (and/or starting points) to locate new (and hopefully better) local optima The key algorithmic steps are as follows: s0 = Generate initial solution s* = LocalSearch(s0) history =  Repeat history = history  s* [Remember previous optima and maybe start] scurrent = Perturb(s*,history) [Try to avoid similar starting points] scurrent* = LocalSearch(scurrent) s* = Accept(s*, scurrent*, history) [Often just accept best] Until termination condition met Care must be taken to assure that the perturbation step is not just mimicking the local search algorithm Note: Random Restart Hill Climbing is NOT ILS – Why? Tabu Search and ILS

Iterated Local Search – Part 1 ILS can be interpreted as walks in the space of local optima Perturbation is key Needs to be chosen so that it cannot be undone easily by subsequent local search It may consist of many perturbation steps Strong perturbation: more effective escape from local optima but similar drawbacks as random restart Weak perturbation: short subsequent local search phase but risk of revisiting previous optima Acceptance criteria: usually either the more recent or the best Tabu Search and ILS

Iterated Local Search – Part 2 Often leads to very good performance Only requires few lines of additional code to existing local search algorithm State-of-the-art results with further optimisations Tabu Search and ILS

ILS and The Scales – Part 1 We are going to look at some performance considerations that can be applied to all Heuristic Search Methods applied to the Scales Problem We will then look at how we implement ILS to tackle the Scales Problem Tabu Search and ILS

ILS and The Scales – Part 2 Representation At the moment we are representing a solution as a Binary String or Array of Integers Is this a good idea? How much redundancy is there in the representation? Each digit or part is either 0 or 1 This just needs one bit, but we are using 32 bits!!! Tabu Search and ILS

ILS and The Scales – Part 3 Representation We can save space and thus efficiency (speed) by just using the number of bits we need For n weights and b bits (32) we would need the following number of integers (m) to represent our weight/scales allocation We would need 32 integers for 1000 weights... Tabu Search and ILS

ILS and The Scales – Part 4 Luckily the latest version of Java comes with a built in class! import java.util.BitSet; public class BitSetTest { public static void main(String args[]) int n = 25; BitSet bs = new BitSet(n); bs.set(0,n,true); ShowBits(bs,n); bs.flip(0,n); bs.set(17,true); } private static void ShowBits(BitSet bs,int n) for(int i=0;i<n;++i) System.out.print((bs.get(i))?"1":"0"); System.out.println(); Output: 1111111111111111111111111 0000000000000000000000000 0000000000000000010000000 Tabu Search and ILS

ILS and The Scales – Part 5 Fitness Our fitness function for the Scales problem is an O(n) algorithm However note the following: If we record and remember the LHS and RHS totals and the position (index) of the last small change If we changed a ‘1’ to a ‘0’ (moved from right to left) NewLHS = LHS + weight(index) NewRHS = RHS – weight(index) If we changed a ‘0’ to a ‘1’ (moved from left to right) NewLHS = LHS – weight(index) NewRHS = RHS + weight(index) Tabu Search and ILS

ILS and The Scales – Part 6 Fitness Thus we have created an updatable fitness function New Fitness = Old Fitness + Value based on small change We have reduced our time complexity from O(n) to O(1) I.e. For 1000 weights our program could be up to 1000 times faster!!! Combining this with the more compact representation discussed previously we now have a much more efficient algorithm Tabu Search and ILS

ILS and The Scales – Part 7 Implementation We will base our algorithms on the Random Restart Hill Climbing method We will reuse any code we might have We need a way of generating starting positions that are not entirely random These starting positions should be generated such that they are different to any previous starting points and local optima There are many ways of doing this, the version we are going to look at is a very simple version Tabu Search and ILS

ILS and The Scales – Part 8 Implementation We generate the first starting point randomly We also remember the local optima We bias the way that each bit is generated based on the recorded starting points and local optima Given m recorded points we generate a biased probability Let bij be the ith bit of starting point j (0 or 1) Tabu Search and ILS

ILS and The Scales – Part 9 Implementation Let p1i be the biased probability that position i was a one previously We set the starting point at position i to one with probability 1.0-p1i and to zero otherwise Tabu Search and ILS

ILS and The Scales – Part 10 Results Experiments were conducted on 10,000 weights generated randomly (UR) between 100 and 1000 100 Repeats All methods were allowed 10,000 fitness function calls Worst Fitness = 5524223.536 RMHC = 65.418 RRHC = 8.248 ILSHC = 8.192 Tabu Search and ILS

ILS and The Scales – Part 11 Results ILS is less than 1% better than RRHC! Better ways of combining the starting positions and previously discovered local optima might results in a better performance… Tabu Search and ILS

This Weeks Laboratory The next laboratory session has no new worksheets Use this time to make sure that you have caught up with any worksheets that are outstanding Tabu Search and ILS

Next Lecture There are no more lectures until the start of next term! The next topic we will study is: Applications Parameter optimisation Tabu Search and ILS