Stochastic Local Search Algorithms

Similar documents
Inteligencia Artificial Representación del conocimiento a través de restricciones (continuación)

Integer Programming: Algorithms - 3

Smart Graphics: Methoden 3 Suche, Constraints

On the Empirical Evaluation of Las Vegas Algorithms Position Paper

What is Artificial Intelligence?

Clustering & Visualization

Genetic Algorithm. Based on Darwinian Paradigm. Intrinsically a robust search and optimization mechanism. Conceptual Algorithm

CSCI-8940: An Intelligent Decision Aid for Battlefield Communications Network Configuration

Using Adaptive Random Trees (ART) for optimal scorecard segmentation

Chapter 13: Binary and Mixed-Integer Programming

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

Algorithm Configuration in the Cloud: A Feasibility Study

Social Media Mining. Data Mining Essentials

ACO Hypercube Framework for Solving a University Course Timetabling Problem

Optimization Algorithms in Function of Binary Character Recognition

Watson. An analytical computing system that specializes in natural human language and provides specific answers to complex questions at rapid speeds

Course Outline Department of Computing Science Faculty of Science. COMP Applied Artificial Intelligence (3,1,0) Fall 2015

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company

Effect of Using Neural Networks in GA-Based School Timetabling

Projects - Neural and Evolutionary Computing

Introduction to Machine Learning and Data Mining. Prof. Dr. Igor Trajkovski

Optimized Software Component Allocation On Clustered Application Servers. by Hsiauh-Tsyr Clara Chang, B.B., M.S., M.S.

Nurse Rostering. Jonathan Johannsen CS 537. Scheduling Algorithms

A Brief Study of the Nurse Scheduling Problem (NSP)

Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm

Doctor of Philosophy in Computer Science

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

Dynamic Load Balancing in Charm++ Abhinav S Bhatele Parallel Programming Lab, UIUC

New Modifications of Selection Operator in Genetic Algorithms for the Traveling Salesman Problem

Y. Xiang, Constraint Satisfaction Problems

Sequential Model-Based Optimization for General Algorithm Configuration (extended version)

CS MidTerm Exam 4/1/2004 Name: KEY. Page Max Score Total 139

Strategic planning in LTL logistics increasing the capacity utilization of trucks

APPLICATION OF ADVANCED SEARCH- METHODS FOR AUTOMOTIVE DATA-BUS SYSTEM SIGNAL INTEGRITY OPTIMIZATION

Page 1 of 5. (Modules, Subjects) SENG DSYS PSYS KMS ADB INS IAT

Evolutionary Detection of Rules for Text Categorization. Application to Spam Filtering

Interactive Timetabling

ENHANCED CONFIDENCE INTERPRETATIONS OF GP BASED ENSEMBLE MODELING RESULTS

Comparison of algorithms for automated university scheduling

A Systemic Artificial Intelligence (AI) Approach to Difficult Text Analytics Tasks

Research on a Heuristic GA-Based Decision Support System for Rice in Heilongjiang Province

OPTIMIZED STAFF SCHEDULING AT SWISSPORT

Solving the Vehicle Routing Problem with Genetic Algorithms

Protein Protein Interaction Networks

Guessing Game: NP-Complete?

The Master s Degree with Thesis Course Descriptions in Industrial Engineering

Data Mining Practical Machine Learning Tools and Techniques

Lab 4: 26 th March Exercise 1: Evolutionary algorithms

Alpha Cut based Novel Selection for Genetic Algorithm

D A T A M I N I N G C L A S S I F I C A T I O N

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

Berkeley CS191x: Quantum Mechanics and Quantum Computation Optional Class Project

CPSC 340: Machine Learning and Data Mining. Mark Schmidt University of British Columbia Fall 2015

Curriculum Vitae. Postdoctoral Research Fellow Department of Computer Science, University of British Columbia

Software & systems for the neuromorphic generation of computing. Peter Suma co-ceo peter.suma@appliedbrainresearch.

GAMS, Condor and the Grid: Solving Hard Optimization Models in Parallel. Michael C. Ferris University of Wisconsin

Backdoors to Combinatorial Optimization: Feasibility and Optimality

OPTIMIZATION TECHNIQUES AND AN INTRODUCTION TO GENETIC ALGORITHMS AND SIMULATED ANNEALING Dr. T. Ghose Dept. of EEE BIT, Mesra

MAN VS. MACHINE. How IBM Built a Jeopardy! Champion x The Analytics Edge

Master of Science in Computer Science

Scenario: Optimization of Conference Schedule.

npsolver A SAT Based Solver for Optimization Problems

HYBRID GENETIC ALGORITHMS FOR SCHEDULING ADVERTISEMENTS ON A WEB PAGE

A Study of Crossover Operators for Genetic Algorithm and Proposal of a New Crossover Operator to Solve Open Shop Scheduling Problem

Example Problems. Channel Routing. Lots of Chip Real-estate. Same connectivity, much less space. Slide 1. Slide 2

CSC384 Intro to Artificial Intelligence

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

Resource Scheduling in Cloud using Bacterial Foraging Optimization Algorithm

Statistical Machine Translation: IBM Models 1 and 2

Practical Introduction to Machine Learning and Optimization. Alessio Signorini

CS Master Level Courses and Areas COURSE DESCRIPTIONS. CSCI 521 Real-Time Systems. CSCI 522 High Performance Computing

Introduction To Genetic Algorithms

Variable neighbourhood search in commercial VRP packages: evolving towards self-adaptive methods

An Integer Programming Model for the School Timetabling Problem

Evaluating Las Vegas Algorithms - Pitfalls and Remedies

Web based chemotherapy scheduling at St. James Hospital. Karl Baker Computer Science 2013/2014

Iterated Local Search for the Generator Maintenance Scheduling Problem

COMP 590: Artificial Intelligence

Machine Learning. CUNY Graduate Center, Spring Professor Liang Huang.

Improving Decision Making and Managing Knowledge

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

A Shift Sequence for Nurse Scheduling Using Linear Programming Problem

Applying Design Patterns in Distributing a Genetic Algorithm Application

Case-Based Reasoning as a Heuristic Selector in a Hyper-Heuristic for Course Timetabling Problems

About the Author. The Role of Artificial Intelligence in Software Engineering. Brief History of AI. Introduction 2/27/2013

Resource Allocation Modeling Techniques Applied to Air Force Crew Scheduling Problem

Planning and Scheduling in Manufacturing and Services

Load Balancing. Load Balancing 1 / 24

LECTURE - 3 RESOURCE AND WORKFORCE SCHEDULING IN SERVICES

Logistic Regression for Spam Filtering

Solving (NP-Hard) Scheduling Problems with ovirt & OptaPlanner. Jason Brooks Red Hat Open Source & Standards SCALE13x, Feb 2015

A Robust Method for Solving Transcendental Equations

Making Sense of the Mayhem: Machine Learning and March Madness

Lecture. Simulation and optimization

Highway Maintenance Scheduling Using Genetic Algorithm with Microscopic Traffic Simulation

Model-based Parameter Optimization of an Engine Control Unit using Genetic Algorithms

Integrating Benders decomposition within Constraint Programming

A Study of Local Optima in the Biobjective Travelling Salesman Problem

Embedded Systems 20 REVIEW. Multiprocessor Scheduling

Transcription:

Stochastic Local Search Algorithms Alan Mackworth UBC CS 322 CSP 7 February 8, 2013 Textbook 4.8

Lecture Overview Announcements Recap: stochastic local search (SLS) Types of SLS algorithms Algorithm configuration AI in the news: Watson and Siri 2

Announcements & Reminders Assignment 2 is due next Friday, February 15, 1:00pm Don t leave it to the last minute Reminder: midterm is Wednesday, March 6, 3:00 3:50pm Set of short questions to be provided: subset on midterm. Final exam is scheduled for Thursday, April 18, 8:30am Will schedule extra review session(s) after classes end, before exam 3

Practice exercises Who has used them? Try Exercise 5 for SLS practice in AIspace. 4

Lecture Overview Announcements Recap: stochastic local search (SLS) Types of SLS algorithms Algorithm configuration AI in the news: Watson and Siri 5

Comparing runtime distributions SLS algorithms are randomized The time taken until they solve a problem is a random variable Runtime distributions x axis: runtime (or number of steps, typically log scale) y axis: proportion (or number) of runs solved in that runtime Fraction of solved runs, i.e. P(solved by this time) If we run less than 10 steps, red is the best algorithm Crossover point: if we run longer than 80 steps, green is the best algorithm Slow, but does not stagnate 57% solved after 80 steps, then stagnate 28% solved after 10 steps, then stagnate # of steps

Pro s and Con s of SLS Typically no guarantee to find a solution even if one exists Most SLS algorithms can sometimes stagnate Not clear whether problem is infeasible or the algorithm stagnates Very hard to analyze theoretically Some exceptions: guaranteed to find global minimum as time In particular random sampling and random walk: strictly positive probability of making N lucky choices in a row Anytime algorithms maintain the node with best h found so far (the incumbent ) given more time, can improve their incumbent Generality: can optimize arbitrary functions with n inputs Example: constraint optimization Example: RNA secondary structure design Generality: dynamically changing problems 7

SLS generality: Constraint Optimization Problems Constraint Satisfaction Problems Hard constraints: need to satisfy all of them All models are equally good Constraint Optimization Problems Hard constraints: need to satisfy all of them Soft constraints: need to satisfy them as well as possible Can have weighted constraints Minimize h(n) = sum of weights of constraints unsatisfied in n Hard constraints have a very large weight Some soft constraints can be more important than other soft constraints larger weight All local search methods we will discuss work just as well for constraint optimization all they need is an evaluation function h 8

Example for constraint optimization problem Exam scheduling Hard constraints: Cannot have an exam in too small a room Cannot have multiple exams in the same room in the same time slot Soft constraints Student should not have to write two exams at the same time (important) Students should not have multiple exams on the same day It would be nice if students had their exams spread out 9

SLS generality: optimization of arbitrary functions SLS is even more general SLS s generality doesn t stop at constraint optimization We can optimize arbitrary functions f(x 1,, x n ) that we can evaluate for any complete assignment of their n inputs The function s inputs correspond to our possible worlds, i.e. to the SLS search states Example: RNA secondary structure design 10

Example: SLS for RNA secondary structure design RNA strand made up of four bases: cytosine (C), guanine (G), adenine (A), and uracil (U) 2D/3D structure RNA strand folds into is important for its function Predicting structure for a strand is easy : O(n 3 ) But what if we want a strand that folds into a certain structure? Local search over strands Search for one that folds into the right structure Evaluation function for a strand Run O(n 3 ) prediction algorithm Evaluate how different the result is from our target structure Only defined implicitly, but can be evaluated by running the prediction algorithm RNA strand GUCCCAUAGGAUGUCCCAUAGGA Easy Hard Secondary structure Best algorithm to date: Local search algorithm RNA-SSD developed at UBC [Andronescu, Fejes, Hutter, Condon, and Hoos, Journal of Molecular Biology, 2004] 11

SLS generality: dynamically changing problems The problem may change over time Particularly important in scheduling E.g., schedule for airline: Thousands of flights and thousands of personnel assignments A storm can render the schedule infeasible Goal: Repair the schedule with minimum number of changes Often easy for SLS starting from the current schedule Other techniques usually: Require more time Might find solution requiring many more changes 12

Lecture Overview Announcements Recap: stochastic local search (SLS) Types of SLS algorithms Algorithm configuration AI in the news: Watson and Siri 13

Many different types of local search There are many different SLS algorithms - Each could easily be a lecture by itself - We will only touch on each of them very briefly - Only need to know them on a high level For more details, see - UBC CS grad course Empirical Algorithmics by Holger Hoos - Book Stochastic Local Search: Foundations and Applications by Holger Hoos & Thomas Stützle, 2004 (in reading room) 14

Simulated Annealing Annealing: a metallurgical process where metals are hardened by being slowly cooled so settle into lowest energy state Analogy: start with a high temperature : great tendency to take random steps Over time, cool down: only take random steps that are not too bad Details: At node n, select a random neighbour n If h(n ) < h(n), move to n (i.e. accept all improving steps) Otherwise, adopt it with a probability depending on How much worse n is than n the current temperature T: high T tends to accept even very bad moves Probability of accepting worsening move: exp( (h(n) h(n ) )/ T ) Temperature reduces over time, according to an annealing schedule Finding a good annealing schedule is an art E.g. geometric cooling: every step multiply T by some constant < 1 15

Tabu Search Mark partial assignments as tabu ( taboo = forbidden) Prevents repeatedly visiting the same (or similar) local minima Maintain a queue of k variable=value assignments that are tabu E.g., when changing V 7 s value from 2 to 4, we cannot change V 7 back to 2 for the next k steps k is a parameter that needs to be optimized empirically 16

Iterated Local Search Perform iterative best improvement to get to local minimum Perform perturbation step to get to different parts of the search space E.g. a series of random steps (random walk) Or a short tabu search 17

Beam Search Keep not just 1 assignment, but k assignments at once A beam with k different assignments (k is the beam width ) The neighbourhood is the union of the k neighbourhoods At each step, keep only the k best neighbours Never backtrack When k=1, this is identical to: Greedy descent Breadth first search Best first search Single node, always move to best neighbour: greedy descent When k=, this is basically: Greedy descent Breadth first search Best first search At step m, the beam contains all nodes m steps away from the start node Like breadth first search, but expanding a whole level of the search tree at once The value of k lets us limit space and parallelism 18

Stochastic Beam Search Like beam search, but you probabilistically choose the k nodes at the next step ( generation ) The probability that neighbour n is chosen depends on h(n) Neighbours with low h(n) are chosen more frequently E.g. rank-based: node n with lowest h(n) has highest probability probability only depends on the order, not the exact differences in h This maintains diversity amongst the nodes Biological metaphor: like asexual reproduction: each node gives its mutations and the fittest ones survive 19

Genetic Algorithms Like stochastic beam search, but pairs of nodes are combined to create the offspring For each generation: Choose pairs of nodes n 1 and n 2 ( parents ), where nodes with low h(n) are more likely to be chosen from the population For each pair (n 1, n 2 ), perform a cross-over: create offspring combining parts of their parents Mutate some values for each offspring Select from previous population and all offspring which nodes to keep in the population 20

Example for Crossover Operator Given two nodes: X 1 = a 1, X 2 = a 2,, X m = a m X 1 = b 1 ; X 2 = b 2,, X m = b m Select i at random, form two offspring: X 1 = a 1, X 2 = a 2,, X i = a i, X i+1 = b i+1,, X m = b m X 1 = b 1, X 2 = b 2,, X i = b i, X i+1 = a i+1,, X m = a m Many different crossover operators are possible Genetic algorithms is a large research field Appealing biological metaphor Several conferences are devoted to the topic 21

Lecture Overview Announcements Recap: stochastic local search (SLS) Types of SLS algorithms Algorithm configuration AI in the news: IBM Watson 22

Parameters in stochastic local search Simple SLS Neighbourhoods, variable and value selection heuristics, percentages of random steps, restart probability Tabu Search Tabu length (or interval for randomized tabu length) Iterated Local Search Perturbation types, acceptance criteria Genetic algorithms Population size, mating scheme, cross-over operator, mutation rate Hybridizations of algorithms: many more parameters 23

The Algorithm Configuration Problem Definition Given: Find: Runnable algorithm A, its parameters and their domains Benchmark set of instances B Performance metric m Parameter setting ( configuration ) of A optimizing m on B UBC Ph.D. thesis (Hutter, 2009): Automated configuration of algorithms for solving hard computational problems Motivation for automated algorithm configuration Customize versatile algorithms for different application domains Fully automated Saves valuable human time Solver Solver Can improve performance dramatically config 1 config 2 24

Generality of Algorithm Configuration Arbitrary problems, e.g. SAT, MIP, Timetabling, Probabilistic Reasoning, Protein Folding, AI Planning,. Arbitrary parameterized algorithms, e.g. Local search Neighbourhoods, restarts, perturbation types, tabu length, etc Genetic algorithms & evolutionary strategies Population size, mating scheme, crossover operators, mutation rate, hybridizations, etc Systematic tree search (advanced versions of arc consistency + domain splitting) Branching heuristics, no-good learning, restart strategy, preprocessing, etc 25

Simple Manual Approach for Configuration Start with some configuration repeat Modify a single parameter if results on benchmark set improve then keep new configuration until no more improvement possible (or good enough") Manually executed local search 26

The ParamILS Framework [Hutter, Hoos & Stützle; AAAI '07 & Hutter, Hoos, Leyton-Brown & Stützle; JAIR'09] Iterated Local Search in parameter configuration space: 27

Example application for ParamILS: solver for mixed integer programming (MIP) IP: NP-hard constraint optimization problem MIP = IP with only some integer variables Commercial state-of-the-art MIP solver IBM ILOG CPLEX: licensed by > 1000 universities and 1300 corporations, including ⅓ of the Global 500 Transportation/Logistics: SNCF, United Airlines, UPS, United States Postal Service, Supply chain management software: Oracle, SAP, Up to 50-fold speedups just by optimizing the parameters! Production planning and optimization: Airbus, Dell, Porsche, Thyssen Krupp, Toyota, Nissan,

Learning Goals for local search Implement local search for a CSP. Implement different ways to generate neighbors Implement scoring functions to solve a CSP by local search through either greedy descent or hill-climbing. Implement SLS with random steps (1-step, 2-step versions) random restart Compare SLS algorithms with runtime distributions Understand principles of types of SLS algorithms

Lecture Overview Announcements Recap: stochastic local search (SLS) Types of SLS algorithms Algorithm configuration AI in the news: Watson and Siri 30

IBM s Watson Automated AI system participated in real Jeopardy! Won practice round against two all-time Jeopardy champions 3-day match on air February 14-16, 2011 Jeopardy website with videos: http://www.jeopardy.com/minisites/watson/ NYTimes article: What Is I.B.M. s Watson? http://www.nytimes.com/2010/06/20/magazine/20computer-t.html Wired magazine: IBM s Watson Supercomputer Wins Practice Jeopardy Round http://www.wired.com/epicenter/2011/01/ibm-watson-jeopardy/# More technical: AI magazine Building Watson: An Overview of the DeepQA Project http://www.stanford.edu/class/cs124/aimagzine-deepqa.pdf 31

IBM s Watson: some videos IBM and the Jeopardy Challenge : http://www.youtube.com/watch?v=fc3irywr4c8 IBM's Supercomputer Beats Miles O'Brien at Jeopardy : http://www.youtube.com/watch?v=otbecmpekts Video of practice round: http://www.engadget.com/2011/01/13/ibms-watsonsupercomputer-destroys-all-humans-in-jeopardy-pract/ Watson won against Jeopardy champions Ken Jennings and Brad Rutter (by a small margin) Including interview describing some of the underlying AI But if you re really interested, see the AI magazine article "Doctor" Watson To Inform Medical Decisions http://www.medicalnewstoday.com/articles/234253.php 32

Watson as an intelligent agent (see lecture 1) Knowledge Representation Machine Learning Mix of knowledge representations. Machine learning to rate confidence from each system Learned confidence from 10,000s example questions Reasoning + Decision Theory Betting strategy! Some, fairly simple Natural Language Generation Natural Language Understanding + Computer Vision Speech Recognition + Physiological Sensing Mining of Interaction Logs + Robotics + Human Computer /Robot Interaction State of the art NLP components Combination and tuning of over 100 (!) approaches.

Apple s Siri Original SIRI is an offshoot of the DARPA-funded project, CALO, based at SRI. It was part of DARPA's PAL initiative (Personalized Assistant that Learns). http://www.apple.com/iphone/features/siri.html Interact with the calendar. Search contacts. Read and write messages (text and email). Interact with the Maps app and location services. Forward search phrases to certain pre-defined data providers (Yahoo! Weather, Yahoo! Finance, Yelp, Wolfram Alpha, or Wikipedia). Dick Tracy s watch next. 34