Beyond Classical Search: Local Search. CMPSCI 383 September 23, 2011

Similar documents
Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell)

Introduction to Artificial Intelligence 2 nd semester 2016/2017. Chapter 4: Beyond Classical Search

Informed search algorithms. Chapter 4

Artificial Intelligence

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld )

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

CS 331: Artificial Intelligence Local Search 1. Tough real-world problems

Outline. Best-first search. Greedy best-first search A* search Heuristics Local search algorithms

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld )

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld )

2006/2007 Intelligent Systems 1. Intelligent Systems. Prof. dr. Paul De Bra Technische Universiteit Eindhoven

Artificial Intelligence

ARTIFICIAL INTELLIGENCE. Informed search

CS:4420 Artificial Intelligence

CS 380: Artificial Intelligence Lecture #4

Problem Solving as Search. CMPSCI 383 September 15, 2011

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

CMU-Q Lecture 8: Optimization I: Optimization for CSP Local Search. Teacher: Gianni A. Di Caro

Informed search algorithms. Chapter 4

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n

BEYOND CLASSICAL SEARCH

TDT4136 Logic and Reasoning Systems

Informed Search Algorithms. Chapter 4

Beyond Classical Search

Ar#ficial)Intelligence!!

mywbut.com Informed Search Strategies-II

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

3.6.2 Generating admissible heuristics from relaxed problems

Beyond Classical Search

Gradient Descent. 1) S! initial state 2) Repeat: Similar to: - hill climbing with h - gradient descent over continuous space

Introduction to Computer Science and Programming for Astronomers

Beyond Classical Search

Artificial Intelligence

Iterative improvement algorithms. Today. Example: Travelling Salesperson Problem. Example: n-queens

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random

Outline for today s lecture. Informed Search. Informed Search II. Review: Properties of greedy best-first search. Review: Greedy best-first search:

Informed Search and Exploration

Informed Search and Exploration

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries.

CS 188: Artificial Intelligence

Artificial Intelligence

Local Search. CS 486/686: Introduction to Artificial Intelligence Winter 2016

Solving Problems: Intelligent Search

Chapters 3-5 Problem Solving using Search

Hill Climbing. Assume a heuristic value for each assignment of values to all variables. Maintain an assignment of a value to each variable.

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria

Artificial Intelligence

Informed Search and Exploration

Local Search. (Textbook Chpt 4.8) Computer Science cpsc322, Lecture 14. May, 30, CPSC 322, Lecture 14 Slide 1

Informed Search and Exploration

CS 188: Artificial Intelligence Spring Today

Informed search algorithms

Lecture 4: Local and Randomized/Stochastic Search

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability.

CS 188: Artificial Intelligence Fall 2008

Artificial Intelligence

Lecture 9. Heuristic search, continued. CS-424 Gregory Dudek

Local Search. CS 486/686: Introduction to Artificial Intelligence

Administrative. Local Search!

Advanced A* Improvements

Local Search (Greedy Descent): Maintain an assignment of a value to each variable. Repeat:

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms. Wolfram Burgard & Bernhard Nebel

Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search -

Local Search Methods. CS 188: Artificial Intelligence Fall Announcements. Hill Climbing. Hill Climbing Diagram. Today

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms

Outline. Informed Search. Recall: Uninformed Search. An Idea. Heuristics Informed search techniques More on heuristics Iterative improvement

Searching. Assume goal- or utilitybased. Next task to achieve is to determine the best path to the goal

Robot Programming with Lisp

Chapter4. Tree Search (Reviewed, Fig. 3.9) Best-First Search. Search Strategies. Best-First Search (cont.-2) Best-First Search (cont.

N-Queens problem. Administrative. Local Search

CS 188: Artificial Intelligence

Problem Solving. Russell and Norvig: Chapter 3

Local Search and Constraint Reasoning. CS 510 Lecture 3 October 6, 2009

Review Search. This material: Chapter 1 4 (3 rd ed.) Read Chapter 18 (Learning from Examples) for next week

Review Adversarial (Game) Search ( ) Review Constraint Satisfaction ( ) Please review your quizzes and old CS-271 tests

Contents. Foundations of Artificial Intelligence. General Algorithm. Best-First Search

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit

Downloaded from ioenotes.edu.np

Artificial Intelligence

Local Search (Ch )

Foundations of Artificial Intelligence

Lecture 4. Convexity Robust cost functions Optimizing non-convex functions. 3B1B Optimization Michaelmas 2017 A. Zisserman

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018

Data Mining Chapter 8: Search and Optimization Methods Fall 2011 Ming Li Department of Computer Science and Technology Nanjing University

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit

CS 4700: Artificial Intelligence

Solving Problems using Search

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies

Vorlesung Grundlagen der Künstlichen Intelligenz

Week 8: Constraint Satisfaction Problems

CS 188: Artificial Intelligence Spring Announcements

Foundations of Artificial Intelligence

K-Consistency. CS 188: Artificial Intelligence. K-Consistency. Strong K-Consistency. Constraint Satisfaction Problems II

Introduction to Design Optimization: Search Methods

ITCS 6150 Intelligent Systems. Lecture 6 Informed Searches

Constraint Satisfaction Problems (CSPs) Lecture 4 - Features and Constraints. CSPs as Graph searching problems. Example Domains. Dual Representations

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17

Artificial Intelligence Informed search. Peter Antal Tadeusz Dobrowiecki

Transcription:

Beyond Classical Search: Local Search CMPSCI 383 September 23, 2011 1

Today s lecture Local Search Hill-climbing Simulated annealing Local beam search Genetic algorithms Genetic programming Local search in continuous state spaces 2

Recall: Evaluating a search strategy Completeness Does it always find a solution if one exists? Optimality Does it find the best solution? Time complexity Space complexity 3

Example: Breadth-first search Complete? Optimal? Time Yes (if b finite) Yes, if cost = 1 per step Not optimal in general 1+b+b 2 +b 3 +...+b d +b(b d -1) = O(b d+1 ) Space O(b d+1 ) 4

Is O(b d+1 ) a big deal? Depth 2 4 6 8 10 12 14 Time.11 sec 11 sec 19 min 31 hours 129 days 35 years 3523 years Memory 1 megabyte 106 megabytes 10 gigabytes 1 terabytes 101 terabytes 10 petabytes 1 exabyte How can we ease up on completeness and optimality in the interest of improving time and space complexity? 5

Local search algorithms In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution In such cases, we can use local search algorithms keep a single current state, try to improve it 6

What is unique about local search? Many search problems only require finding a goal state, not the path to that goal state Examples Actual physical (vs. virtual) navigation Configuration problems e.g., n-queens problem, determining good compiler parameter settings Design problems e.g., VLSI layout or oil pipeline network design State space is set of configurations. 7

Example: n-queens Put n queens on an n n board with no two queens on the same row, column, or diagonal 8

Optimization Problems Aim is to find the best state according to an objective function. No goal test No path cost cf. Evolution 9

Why use local search? Low memory requirements Usually constant Effective Can often find good solutions in extremely large state spaces 10

State-space landscape 11

Hill-climbing search ( Steepest Ascent version) Like trying to find the top of Mount Everest in a thick fog while suffering from amnesia. 12

Challenges for hill climbing Local maxima Once a local maximum is reached, there is no way to backtrack or move out of that maximum Ridges Ridges can produce a series of local maxima Plateaux Hillclimbing can have difficult time finding its way off of a flat portion of the state space landscape 13

Hill-climbing search: 8-queens problem Complete-state formulation Actions: move a single queen to any other square in same column h = number of pairs of queens that are attacking each other, either directly or indirectly h = 17 for the above state 14

Hill-climbing search: 8-queens problem A local minimum with h = 1 15

A state-space landscape From: http://classes.yale.edu/fractals/ca/ga/fitness/fitness.html 16

Another state-space landscape From: Richard Wein (2002). Not a Free Lunch But a Box of Chocolates. http://www.talkorigins.org/design/faqs/nfl/ 17

Variants of local hill climbing Stochastic hill climbing Select randomly from all moves that improve the value of the evaluation function First-choice hill climbing Generate successors randomly and select the first improvement Random-restart hill climbing Conducts a series of hill-climbing searches, starting from random positions Very frequently used general method in AI 18

Simulated annealing search Idea: escape local maxima by allowing some bad moves but gradually decrease their frequency 19

Properties of simulated annealing search One can prove: If T decreases slowly enough, then simulated annealing search will find a global optimum with probability approaching 1 Widely used in VLSI layout, airline scheduling, etc. 20

Local beam search Analogy Hill-climbing trying to find the top of Mt. Everest in a thick fog while suffering amnesia. Local beam search Doing this with several friends, each of whom has a short-range radio and an altimeter. 21

Local beam search Keep track of k states rather than just one Start with k randomly generated states At each iteration, all the successors of all k states are generated If any one is a goal state, stop; else select the k best successors from the complete list and repeat Stochastic beam search Select successors at random weighted by value 22

Genetic algorithms A variant of stochastic beam search where new states are generated by combining existing states Basic components Population A set of states, initially generated randomly Fitness function An evaluation function Reproduction A method for generating new states from pairs of old ones (e.g., crossover) Mutation A method for randomly modifying states to create variation in the population 23

Genetic algorithms Fitness function: number of non-attacking pairs of queens (min = 0, max = 8 7/2 = 28) 24/(24+23+20+11) = 31% 23/(24+23+20+11) = 29% etc 24

Genetic algorithms 25

Genetic Programming A specialization of genetic algorithms where each individual is a program 26

GP Genetic Operators Subtree crossover Subtree mutation 27

Local Search in Continuous Spaces Spaces consisting of real-valued vectors Can discretize the space Gradient Ascent (descent) Line search Newton-Raphson Constrained optimization Linear Programming Convex optimization 28

Gradient Methods 29

Gradient Descent 30

Gradient Descent: Rosenbrock Function 31

Gradient Descent 32

Newton Raphson 33

Conjugate Gradient Method 34

Linear Programming 35

Convex Optimization 36

Local Search In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution In such cases, we can use local search algorithms keep a single current state, try to improve it 37

Next Class Nondeterministic Actions and Partial Observations; Online Search Sec. 4.3, 4.4, 4.5 38