Problem Solving with Constraints Local Search for CSPs1 Foundations of Constraint Processing CSCE496/896, Fall2011 www.cse.unl.edu/~choueiry/F11-496-896/

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Local Search Algorithms
Local Search Jim Little UBC CS 322 – CSP October 3, 2014 Textbook §4.8
LOCAL SEARCH AND CONTINUOUS SEARCH. Local search algorithms  In many optimization problems, the path to the goal is irrelevant ; the goal state itself.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) February, 9, 2009.
CPSC 322, Lecture 15Slide 1 Stochastic Local Search Computer Science cpsc322, Lecture 15 (Textbook Chpt 4.8) February, 6, 2009.
Foundations of Constraint Processing, Spring 2008 Evaluation to BT SearchApril 16, Foundations of Constraint Processing CSCE421/821, Spring 2008:
Constraint Systems Laboratory Oct 21, 2004Guddeti: MS thesis defense1 An Improved Restart Strategy for Randomized Backtrack Search Venkata P. Guddeti Constraint.
Iterative improvement algorithms Prof. Tuomas Sandholm Carnegie Mellon University Computer Science Department.
Multi-agent Oriented Constraint Satisfaction Authors: Jiming Liu, Han Jing and Y.Y. Tang Speaker: Lin Xu CSCE 976, May 1st 2002.
Iterative Improvement Techniques for Solving Tight Constraint Satisfaction Problems Hui Zou Constraint Systems Laboratory Department of Computer Science.
Multi-Agent Based Search vs. Local Search and Backtrack Search for Solving Tight CSPs: A Practical Case Study Hui Zou and Berthe Y. Choueiry Constraint.
Foundations of Constraint Processing Evaluation to BT Search 1 Foundations of Constraint Processing CSCE421/821, Spring
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Solvable problem Deviation from best known solution [%] Percentage of test runs ERA RDGR RGR LS Over-constrained.
Introduction to Artificial Intelligence Local Search (updated 4/30/2006) Henry Kautz.
Foundations of Constraint Processing, Fall 2005 November 2, 2005Local Search for CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
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.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
Informed Search Chapter 4 Adapted from materials by Tim Finin, Marie desJardins, and Charles R. Dyer CS 63.
Foundations of Constraint Processing, Fall 2005 November 2, 2005Weak Commitment1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
Foundations of Constraint Processing, Fall 2004 November 18, 2004More on BT search1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Local Search and Optimization
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
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.
Computer Science CPSC 322 Lecture 16 CSP: wrap-up Planning: Intro (Ch 8.1) Slide 1.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
Single-solution based metaheuristics. Outline Local Search Simulated annealing Tabu search …
CHAPTER 4, Part II Oliver Schulte Summer 2011 Local Search.
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
Local Search and Optimization Presented by Collin Kanaley.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2009.
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.
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
Foundations of Constraint Processing Local Search for CSPs1 Foundations of Constraint Processing CSCE421/821, Spring
Escaping Local Optima. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Exhaustive search Hill.
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.
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
CSCI 4310 Lecture 10: Local Search Algorithms
Informed Search Chapter 4 (b)
Heuristic Optimization Methods
Foundations of Constraint Processing
Local Search Algorithms
Local Search Strategies: From N-Queens to Walksat
Computer Science cpsc322, Lecture 14
Artificial Intelligence (CS 370D)
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
Prof. Marie desJardins September 20, 2010
Local Search and Optimization
Evaluation of (Deterministic) BT Search Algorithms
Artificial Intelligence
Foundations of Constraint Processing
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.
Local Search Algorithms
Beyond Classical Search
Local Search Algorithms
Presentation transcript:

Problem Solving with Constraints Local Search for CSPs1 Foundations of Constraint Processing CSCE496/896, Fall Berthe Y. Choueiry (Shu-we-ri) Avery Hall, Room 360 Tel: +1(402) Local Search

Problem Solving with Constraints Local Search for CSPs2 Lecture sources Required reading 1.Dechter: Chapter 7, Section 7.1 and 7.2 Recommended 1.R. Bartak’s online guide: 1.AIMA: Section 4.4 (1 st edition) Section 4.3 (2 nd edition) 1.Bresina 96: Heuristic-Biased Stochastic Sampling. AAAI/IAAI, Vol AAAI/IAAI, Vol :

Problem Solving with Constraints Local Search for CSPs3 Solving CSPs CSPs are typically solved with a combination of 1.Constraint propagation (inference) 2.Search (conditioning) Backtrack search Local search We focus on local search

Problem Solving with Constraints Local Search for CSPs4 Outline General principle Main types: greedy & stochastic When nothing works… Evaluation methods

Problem Solving with Constraints Local Search for CSPs5 Backtrack search Properties –Systematic and exhaustive –Deterministic or heuristic –Sound and complete Shortcomings –worst-case time complexity prohibitive –often unable to solve large problems. Thus, theoretical soundness and completeness do not mean much in practice Idea –Use approximations: sacrifice soundness and/or completeness –Can quickly solve very large problems (that have many solutions)

Problem Solving with Constraints Local Search for CSPs6 Local search: the picture States are laid up on a surface State quality/cost is its height State space forms a landscape Optimum state: –maximizes solution quality –minimizes solution cost Move around from state to state and try to reach the optimum state Exploration restricted to neighboring states, thus ‘local’ search (ref. Holger & Hoos)

Problem Solving with Constraints Local Search for CSPs7 Components of a local search State –is a complete assignment of values to variables, a possibly inconsistent solution Possible moves –are modifications to the current state, typically by changing the value of a single variable. Thus, ‘local’ repair (ref. Dechter) –Examples: SAT: Flipping the value of a Boolean variable (GSAT), CSPs: Min-conflict heuristic (variations) Evaluation (cost) function –rates the quality of a state, typically in the number of violated constraints

Problem Solving with Constraints Local Search for CSPs8 Generic Mechanism Cost function: number of broken constraints General principle –Start with a full but arbitrary assignment of values to variables –Reduce inconsistencies by local repairs (heuristic) –Repeat until A solution is found (global minimum) The solution cannot be repaired (local minimum) … You run out of patience ( max-tries ) A.k.a. –Iterative repair (decision problems) –Iterative improvement (optimization problems)

Problem Solving with Constraints Local Search for CSPs9 Outline General principle Main types: greedy & stochastic When nothing works… Evaluation methods

Problem Solving with Constraints Local Search for CSPs10 Main types of local search 1.Greedy: –Use a heuristic to determine the best move 2.Stochastic (improvement) –Sometimes (randomly) disobey the heuristic

Problem Solving with Constraints Local Search for CSPs11 Greedy local search At any given point, –make the best decision you can given the information you have and proceed. –Typically, move to the state that minimizes the number of broken constraints Example: –hill climbing (a.k.a. gradient descent/ascent) –Local beam search: keep track of k states

Problem Solving with Constraints Local Search for CSPs12 Greedy local search Problems: –local optima (stuck), –plateau (errant), –ridge (oscillates from side to side, slow progress)

Problem Solving with Constraints Local Search for CSPs13 Stochastic Local Search Sometimes (randomly) move to a state that is not the best: use randomization to escape local optimum Examples: RandomWalk (stochastic noise) Tabu Search Simulated Annealing Generic algorithms Breakout method (constraint weighting) ERA (multi-agent search)

Problem Solving with Constraints Local Search for CSPs14 Simulated Annealing: idea Analogy to physics: –Process of gradually cooling a liquid until it freezes –If temperature is lowered sufficiently slowly, material will attain lowest-energy configuration (perfect order) Basic idea: –When stuck in a local optimum, allow few steps towards less good neighbors to escape the local maximum

Problem Solving with Constraints Local Search for CSPs15 Simulated Annealing: Mechanism Start from any state at random, start countdown and loop until time is over: –Pick up a neighbor at random –Set d = quality of neighbor – quality of current state –If d>0 (there is improvement) Then move to neighbor & restart countdown Else, move to neighbor with a transition probability p<1 Transition probability proportional to e d/t –d is negative, and t is time countdown –As times passes, less and less likely to make the move towards unattractive neighbors Under some very restrictive assumptions, guaranteed to find optimum

Problem Solving with Constraints Local Search for CSPs16 Properties Non-systematic and non-exhaustive Liable to getting stuck in local optima (optima/minima) Non-deterministic: –outcome may depend on where you start Typically, heavy tailed: –probability of improving solution as time goes by quickly becomes small but does not die out

Problem Solving with Constraints Genetic Algorithms Basic step: Combinations two complete assignments (parents) to generate offsprings Mechanism –Starts from an initial population –Encodes assignments in a compact manner (a string) –Combines partial solutions to generate new solutions (next generation) Local Search for CSPs17

Problem Solving with Constraints Genetic Algorithm (2) Fitness Function ranks a state’s quality, assigns probability for selection Selection randomly chooses pairs for combination depending on fitness Crossover point randomly chosen for two individuals, offsprings are generated Mutation randomly changes a state Local Search for CSPs18

Problem Solving with Constraints Local Search for CSPs19 Breakout strategies [Bresina] Increase the weights of the broken constraints so that they are less likely to be broken in subsequent iterations Quite effective for recovering from local optima

Problem Solving with Constraints Local Search for CSPs20 ERA: Environment, Rules, Agents [Liu et al, AIJ 02] Environment is an nxa board Each variable is an agent Each position on board is a value of a domain Agent moves in a row on board Each position records the number of violations caused by the fact that agents are occupying other positions Agents try to occupy positions where no constraints are broken (zero position) Agents move according to reactive rules

Problem Solving with Constraints Local Search for CSPs21 Reactive rules [Liu et al, AIJ 02] Reactive rules : –Least-move: choose a position with the min. violation value –Better-move: choose a position with a smaller violation value –Random-move: randomly choose a position Combinations of these basic rules form different behaviors.

Problem Solving with Constraints Local Search for CSPs22 Big picture Agents do not communicate but share a common context Agents keep kicking each other out of their comfortable positions until every one is happy Charecterization: [Hui Zou, 2003] –Amazingly effective in solving very tight but solvable instances –Unstable in over-constrained cases Agents keep kicking each other out (livelock) Livelocks may be exploited to identify bottlenecks

Problem Solving with Constraints Local Search for CSPs23 ERA performance ERA performance on solvable instances ERA performance on unsolvable instances Observation : Solvable vs. unsolvable instances: stable on solvable instances oscillates on unsolvable cases

Problem Solving with Constraints Local Search for CSPs24 Agent’s movement Motion of agents variable stable constant Observations : SolvableUnsolvable Variable NoneMost Stable A few Constant MostNone

Problem Solving with Constraints Local Search for CSPs25 Outline General principle Main types: greedy & stochastic When nothing works… Evaluation methods

Problem Solving with Constraints Local Search for CSPs26 Random restart Principle –When no progress is made, restart from a new randomly selected state –Save best results found so far (anytime algorithm) Repeat random restart –For a fixed number of iterations –Until best results have not been improved on for a certain number of iterations. E.g., Geometric law

Problem Solving with Constraints Local Search for CSPs27 Outline General principle Main types: greedy & stochastic When nothing works… Evaluation methods

Problem Solving with Constraints November 2, 2005Local Search for CSPs28 Evaluation: empirical Test on –a given problem instance –an ensemble of problem instances (representative of a population ) Experiment –Run the algorithm thousands of times –Measure some metric as a random variable (e.g., the time needed to find a solution)

Problem Solving with Constraints Local Search for CSPs29 Comparing techniques Provide –The probability distribution function (approximated by the number of runs that took a given time to find a solution) –The cumulative distribution function (approximated by the number of runs that found a solution within a given time)

Problem Solving with Constraints Local Search for CSPs30 Comparing techniques Compare algorithms’ performance using statistical tests (for confidence levels) –t-test: assumes normal distribution of the measured metrics –Nonparametric tests do not. Some match pairs, some do not. Consult/work with a statistician