CPSC 322, Lecture 15Slide 1 Stochastic Local Search Computer Science cpsc322, Lecture 15 (Textbook Chpt 4.8) February, 6, 2009.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems Russell and Norvig: Chapter
Local Search Jim Little UBC CS 322 – CSP October 3, 2014 Textbook §4.8
CPSC 322, Lecture 14Slide 1 Local Search Computer Science cpsc322, Lecture 14 (Textbook Chpt 4.8) Oct, 5, 2012.
Constraint Satisfaction Problems Russell and Norvig: Parts of Chapter 5 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Department of Computer Science Undergraduate Events More
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) February, 9, 2009.
CPSC 322, Lecture 14Slide 1 Local Search Computer Science cpsc322, Lecture 14 (Textbook Chpt 4.8) February, 3, 2010.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.6) February, 01, 2010.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
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.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.8) February, 02, 2009.
CPSC 322, Lecture 14Slide 1 Local Search Computer Science cpsc322, Lecture 14 (Textbook Chpt 4.8) February, 4, 2009.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Constraint Satisfaction Problems
Introduction to Artificial Intelligence Local Search (updated 4/30/2006) Henry Kautz.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
Constraint Satisfaction Problems
Constraint Satisfaction Problems
Stochastic Local Search CPSC 322 – CSP 6 Textbook §4.8 February 9, 2011.
An Introduction to Artificial Life Lecture 4b: Informed Search and Exploration Ramin Halavati In which we see how information.
Local Search CPSC 322 – CSP 5 Textbook §4.8 February 7, 2011.
Department of Computer Science Undergraduate Events More
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Computer Science CPSC 322 Lecture 16 CSP: wrap-up Planning: Intro (Ch 8.1) Slide 1.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
Search with Costs and Heuristic Search 1 CPSC 322 – Search 3 January 17, 2011 Textbook §3.5.3, Taught by: Mike Chiang.
Local Search Algorithms
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
CHAPTER 4, Part II Oliver Schulte Summer 2011 Local Search.
Local Search and Optimization Presented by Collin Kanaley.
A local search algorithm with repair procedure for the Roadef 2010 challenge Lauri Ahlroth, André Schumacher, Henri Tokola
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
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 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Lecture 6 – Local Search Dr. Muhammad Adnan Hashmi 1 24 February 2016.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) Oct, 11, 2013.
Domain Splitting, Local Search CPSC 322 – CSP 4 Textbook §4.6, §4.8 February 4, 2011.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
© J. Christopher Beck Lecture 16: Local Search.
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.
CPSC 322, Lecture 7Slide 1 Heuristic Search Computer Science cpsc322, Lecture 7 (Textbook Chpt 3.6) Sept, 20, 2013.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
CPSC 322, Lecture 15Slide 1 Stochastic Local Search Computer Science cpsc322, Lecture 15 (Textbook Chpt 4.8) Oct, 9, 2013.
Stochastic Local Search Computer Science cpsc322, Lecture 15
Department of Computer Science
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 13
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Lecture 11 SLS wrap up, Intro To Planning
Computer Science cpsc322, Lecture 14
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 13
Computer Science cpsc322, Lecture 14
Stochastic Local Search Variants Computer Science cpsc322, Lecture 16
Constraint Satisfaction Problems. A Quick Overview
Artificial Intelligence
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Presentation transcript:

CPSC 322, Lecture 15Slide 1 Stochastic Local Search Computer Science cpsc322, Lecture 15 (Textbook Chpt 4.8) February, 6, 2009

Announcements Thanks for the feedback, we’ll discuss it on Mon Assignment-2 on CSP will be out tonight (programming!) CPSC 322, Lecture 10Slide 2

CPSC 322, Lecture 15Slide 3 Lecture Overview Recap Local Search in CSPs Stochastic Local Search (SLS) Comparing SLS algorithms

CPSC 322, Lecture 15Slide 4 Local Search: Summary A useful method in practice for large CSPs Start from a possible world Generate some neighbors ( “similar” possible worlds) Move from current node to a neighbor, selected to minimize/maximize a scoring function which combines: Info about how many constraints are violated Information about the cost/quality of the solution (you want the best solution, not just a solution)

CPSC 322, Lecture 15Slide 5 Problems with these strategy… (Plateau) …called Greedy Descent when selecting the neighbor which minimizes a scoring function. Hill Climbing when selecting the neighbor which maximizes a scoring function.

CPSC 322, Lecture 15Slide 6 Lecture Overview Recap Local Search in CSPs Stochastic Local Search (SLS) Comparing SLS algorithms

CPSC 322, Lecture 15Slide 7 Stochastic Local Search GOAL: We want our local search to be guided by the scoring function Not to get stuck in local maxima/minima, plateaus etc. SOLUTION: We can alternate a) Hill-climbing steps b) Random steps: move to a random neighbor. c) Random restart: reassign random values to all variables.

CPSC 322, Lecture 15Slide 8 Two extremes versions hill climbing with random steps Two 1-dimensional search spaces; step right or left: Stochastic local search typically involves both kinds of randomization, but for illustration let’s consider hill climbing with random restart

CPSC 322, Lecture 15Slide 9 Random Steps (Walk) Let’s assume that neighbors are generated as assignments that differ in one variable's value How many neighbors there are given n variables with domains with d values? One strategy to add randomness to the selection variable-value pair. Sometimes choose the pair According to the scoring function A random one E.G in 8-queen How many neighbors? ……..

CPSC 322, Lecture 15Slide 10 Random Steps (Walk): two-step Another strategy: select a variable first, then a value: Sometimes select variable: 1. that participates in the largest number of conflicts. 2. at random, any variable that participates in some conflict. 3. at random Sometimes choose value a)That minimizes # of conflicts b)at random Aispace 2 a: Greedy Descent with Min-Conflict Heuristic

CPSC 322, Lecture 15Slide 11 Successful application of SLS Scheduling of Hubble Space Telescope: reducing time to schedule 3 weeks of observations: from one week to around 10 sec.

CPSC 322, Lecture 15Slide 12 (Stochastic) Local search advantage: Online setting When the problem can change (particularly important in scheduling) E.g., schedule for airline: thousands of flights and thousands of personnel assignment Storm can render the schedule infeasible Goal: Repair with minimum number of changes This can be easily done with a local search starting form the current schedule Other techniques usually: require more time might find solution requiring many more changes

CPSC 322, Lecture 15Slide 13 SLS:Limitations Typically no guarantee they will find a solution even if one exists Not able to show that no solution exists

CPSC 322, Lecture 15Slide 14 Lecture Overview Recap Local Search in CSPs Stochastic Local Search (SLS) Comparing SLS algorithms

CPSC 322, Lecture 15Slide 15 Comparing Stochastic Algorithms: Challenge Summary statistics, such as mean run time, median run time, and mode run time don't tell the whole story What is the running time for the runs for which an algorithm never finishes (infinite? stopping time?) 100% runtime / steps ….. % of solved runs

CPSC 322, Lecture 15Slide 16 First attempt…. How can you compare three algorithms when A. one solves the problem 30% of the time very quickly but doesn't halt for the other 70% of the cases B. one solves 60% of the cases reasonably quickly but doesn't solve the rest C. one solves the problem in 100% of the cases, but slowly? 100% Mean runtime / steps of solved runs % of solved runs

CPSC 322, Lecture 15Slide 17 Runtime Distributions are even more effective Plots runtime (or number of steps) and the proportion (or number) of the runs that are solved within that runtime. log scale on the x axis is commonly used

CPSC 322, Lecture 15Slide 18 What are we going to look at in AIspace When selecting a variable first followed by a value: Sometimes select variable: 1. that participates in the largest number of conflicts. 2. at random, any variable that participates in some conflict. 3. at random Sometimes choose value a)That minimizes # of conflicts b)at random AIspace terminology Random sampling Random walk Greedy Descent Greedy Descent Min conflict Greedy Descent with random walk Greedy Descent with random restart …..

CPSC 322, Lecture 4Slide 19 Learning Goals for today’s class You can: Implement SLS with random steps (1-step, 2-step versions) random restart Compare SLS algorithms with runtime distributions

CPSC 322, Lecture 15Slide 20 Next Class More SLS variants Finish CSPs Start planning Assign-2 Will be out by tonight Assignments will be weighted: A0 (12%), A1…A4 (22%) each