Iterative Improvement Algorithms For some problems, path to solution is irrelevant: just want solution Start with initial state, and change it iteratively.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Local Search Algorithms
Genetic Algorithms (Evolutionary Computing) Genetic Algorithms are used to try to “evolve” the solution to a problem Generate prototype solutions called.
LOCAL SEARCH AND CONTINUOUS SEARCH. Local search algorithms  In many optimization problems, the path to the goal is irrelevant ; the goal state itself.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2005.
02 -1 Lecture 02 Heuristic Search Topics –Basics –Hill Climbing –Simulated Annealing –Best First Search –Genetic Algorithms –Game Search.
Iterative Improvement Algorithms
Trading optimality for speed…
Imagine that I am in a good mood Imagine that I am going to give you some money ! In particular I am going to give you z dollars, after you tell me the.
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Informed Search Chapter 4 Adapted from materials by Tim Finin, Marie desJardins, and Charles R. Dyer CS 63.
Informed Search Next time: Search Application Reading: Machine Translation paper under Links Username and password will be mailed to class.
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Christoph F. Eick: Applying EC to TSP(n) Example: Applying EC to the TSP Problem  Given: n cities including the cost of getting from on city to the other.
D Goforth - COSC 4117, fall Note to 4 th year students  students interested in doing masters degree and those who intend to apply for OGS/NSERC.
Local Search and Optimization
Search CSE When you can’t use A* Hill-climbing Simulated Annealing Other strategies 2 person- games.
Genetic algorithms Prof Kang Li
An Introduction to Artificial Life Lecture 4b: Informed Search and Exploration Ramin Halavati In which we see how information.
Ch.12 Machine Learning Genetic Algorithm Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2011.
Local Search Algorithms This lecture topic Chapter Next lecture topic Chapter 5 (Please read lecture topic material before and after each lecture.
Informed Search Methods How can we make use of other knowledge about the problem to improve searching strategy? Map example: Heuristic: Expand those nodes.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms
Chapter 4.1 Beyond “Classic” Search. What were the pieces necessary for “classic” search.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Kasin Prakobwaitayakit Department of Electrical Engineering Chiangmai University.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
Artificial Intelligence for Games Online and local search
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
Evolution Programs (insert catchy subtitle here).
For Friday Finish chapter 6 Program 1, Milestone 1 due.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
Probabilistic Algorithms Evolutionary Algorithms Simulated Annealing.
Local Search and Optimization Presented by Collin Kanaley.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
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.
Genetic Algorithms MITM613 (Intelligent Systems).
Genetic Algorithms Chapter Description of Presentations
Local Search Algorithms and Optimization Problems
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
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.
Local Search Goal is to find the local maximum (or minimum) Example: – # seconds to spin wheels at 1.0 to move 2.0 meters.
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"
1 Intro to AI Local Search. 2 Intro to AI Local search and optimization Local search: –use single current state & move to neighboring states Idea: –start.
Informed Search Methods
Optimization via Search
Genetic Algorithms.
CSCI 4310 Lecture 10: Local Search Algorithms
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Local Search Algorithms
Example: Applying EC to the TSP Problem
Artificial Intelligence (CS 370D)
Example: Applying EC to the TSP Problem
Example: Applying EC to the TSP Problem
CSE 4705 Artificial Intelligence
More on Search: A* and Optimization
Heuristics Local Search
First Exam 18/10/2010.
Local Search Algorithms
Beyond Classical Search
Local Search Algorithms
Presentation transcript:

Iterative Improvement Algorithms For some problems, path to solution is irrelevant: just want solution Start with initial state, and change it iteratively to improve it Examples: “Is this config of 8-puzzle solvable?” Placing queens on a chessboard How many airline flights to have to where

Calculus approach If you know the function, can take derivative: solve derivative = 0 Example: Given fencing of length 100 feet, find dimensions to get maximum area

Hill-climbing search (or gradient descent) Example: Given 22 professors, allocate them to depts M&CS: 10, Physics: 5, English: 7 Goal: Maximize majors in 3 departments For a given arrangement of profs, I can estimate how many majors; but simulation takes an hour Start at a guess, then start hill climbing from there Show on blackboard

Hill-climbing in general Move in direction of increasing value Useful when path to solution is irrelevant Drawbacks: Local maxima Plateaux Ridges Can get around this some with random- restart hill climbing

Simulated Annealing Technique inspired by engineering practice of cooling liquid At each iteration make a random move If position is better than current, do it Over time, slowly drop “temperature” T If position is worse, do it with probability P P becomes smaller as T drops P = exp(change in value / T) Eventually, algorithm reverts to hill climbing Popular in VLSI layout

Genetic Algorithms (Evolutionary Computing) Genetic Algorithms used to try to “evolve” the solution to a problem Generate prototype solutions called chromosomes (individuals) Backpack problem as example: tml All individuals form the population Generate new individuals by reproduction Use fitness function to evaluate individuals Survival of the fittest: population has a fixed size Individuals with higher fitness are more likely to reproduce

Reproduction Methods Mutation Alter a single gene in the chromosome randomly to create a new chromosome Example Cross-over Pick a random location within chromosome New chromosome receives first set of genes from parent 1, second set from parent 2 Example Inversion Reverse the chromsome

Interpretation Genetic algorithms try to solve a hill climbing problem Method is parallelizable The trick is in how you represent the chromosome Tries to avoid local maxima by keeping many chromosomes at a time

Another Example: Traveling Sales Person Problem How to represent a chromosome? What effects does this have on crossover and mutation?

TSP Chromosome: Ordering of city numbers ( ) What can go wrong with crossover? To fix, use order crossover technique Take two chromosomes, and take two random locations to cut p1 = (1 9 2 | | 8 3) p2 = (4 5 9 | | 2 3) Goal: preserve as much as possible of the orderings in the chromosomes

Order Crossover p1 = (1 9 2 | | 8 3) p2 = (4 5 9 | | 2 3) New p1 will look like: c1 = (x x x | | x x) To fill in c1, first produce ordered list of cities from p2, starting after cut, eliminating cities in c Drop them into c1 in order c1 = ( ) Do similarly in reverse to obtain c2 = ( )

Mutation & Inversion What can go wrong with mutation? What is wrong with inversion?

Mutation & Inversion Redefine mutation as picking two random spots in path, and swapping p1 = ( ) c1 = ( ) Redefine inversion as picking a random middle section and reversing: p1 = (1 9 2 | | 3) c1 = (1 9 2 | | 3)

Online Search Online = “in real world”, “realtime” trying to solve the 8-puzzle with an 8- puzzle in front of you robot trying to navigate a maze Most of the search techniques we talked about don’t work Example: What goes wrong with BFS?

Options Depth-first search works just fine, assuming actions are reversible Hill climbing works fine, but how to avoid local maxima? Simulated annealing might help avoid them, but when you are stuck... Randomized restarts undoable How to handle?

LRTA* Learning Real Time A* At each state you visit, record heuristic on distance to goal If stuck in local minimum, find adjoining state with lowest heuristic estimate Update this state with that estimate plus cost of getting there Move on Example