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.

Slides:



Advertisements
Similar presentations
Local Search Algorithms
Advertisements

CS6800 Advanced Theory of Computation
Farmer, Wolf, Goat, Cabbage Farmer, Fox, Chicken, Corn Farmer Dog, Rabbit, Lettuce The Farmer, Wolf, Duck, Corn Problem A farmer with his wolf, duck and.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
Local search algorithms
Local search algorithms
Two types of search problems
Iterative improvement algorithms Prof. Tuomas Sandholm Carnegie Mellon University Computer Science Department.
Iterative Improvement Algorithms
EAs for Combinatorial Optimization Problems BLG 602E.
Iterative Improvement Algorithms For some problems, path to solution is irrelevant: just want solution Start with initial state, and change it iteratively.
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.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Solution methods for Discrete Optimization Problems.
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Informed Search Methods
Genetic Algorithms and Ant Colony Optimisation
Computer Implementation of Genetic Algorithm
Local Search and Optimization
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
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.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
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,
Evolution Programs (insert catchy subtitle here).
For Friday Finish chapter 6 Program 1, Milestone 1 due.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
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.
Probabilistic Algorithms Evolutionary Algorithms Simulated Annealing.
Local Search and Optimization Presented by Collin Kanaley.
When A* doesn’t work CIS 391 – Intro to Artificial Intelligence A few slides adapted from CS 471, Fall 2004, UBMC (which were adapted from notes by Charles.
Local search algorithms In many optimization problems, the state space is the space of all possible complete solutions We have an objective function that.
Optimization Problems
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).
Local Search Algorithms and Optimization Problems
Genetic Search Algorithms Matt Herbster. Why Another Search?  Designed in the 1950s, heavily implemented under John Holland (1970s)  Genetic search.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Intro. ANN & Fuzzy Systems Lecture 37 Genetic and Random Search Algorithms (2)
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
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.
Genetic Algorithms. Solution Search in Problem Space.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Hirophysics.com The Genetic Algorithm vs. Simulated Annealing Charles Barnes PHY 327.
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.
Games: Expectimax MAX MIN MAX Prune if α ≥ β. Games: Expectimax MAX MIN MAX
Optimization Problems
School of Computer Science & Engineering
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
Optimization Problems
Metaheuristic methods and their applications. Optimization Problems Strategies for Solving NP-hard Optimization Problems What is a Metaheuristic Method?
Stochastic Local Search Variants Computer Science cpsc322, Lecture 16
Beyond Classical Search
Presentation transcript:

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 value of x and y x and y in the range of 0 to 10

x y z

Optimizing Search (Iterative Improvement Algorithms) I.e Hill climbing, Simulated Annealing Genetic Algorithms Optimizing search is different to the path finding search we have studied in many ways. The problems are ones for which exhaustive and heuristic search are NP-hard. The path is not important (for that reason we typically don’t bother to keep a tree around) (thus we are CPU bound, not memory bound). Every state is a “solution”. The search space is (often) continuous. Usually we abandon hope of finding the best solution, and settle for a very good solution. The task is usually to find the minimum (or maximum) of a function.

Example Problem I (Continuous) y = f(x) Finding the maximum (minimum) of some function (within a defined range).

The Traveling Salesman Problem (TSP) A salesman spends his time visiting n cities. In one tour he visits each city just once, and finishes up where he started. In what order should he visit them to minimize the distance traveled? There are (n-1)!/2 possible tours. Example Problem II (Discrete)

Function Fitting Depending on the way the problem is setup this, could be continuous and/or discrete. Discrete part Finding the form of the function is it X 2 or X 4 or ABS(log(X)) + 75 Continuous part Finding the value for X is it X= 3.1 or X= 3.2 Example Problem III (Continuous and/or discrete)

Assume that we can Represent a state. Quickly evaluate the quality of a state. Define operators to change from one state to another. y = log(x) + sin(tan(y-x)) x = 2; y = 7; log(2) + sin(tan(7-2)) = x = add_10_percent (x) y = subtract_10_percent (y) …. A C F K W…..Q A A to C = 234 C to F = 142 … Total10,231 A C F K W…..Q A A C K F W…..Q A Function Optimizing Traveling Salesman

Hill-Climbing I function Hill-Climbing (problem) returns a solution state inputs : problem // a problem. local variables : current // a node. next // a node. current  Make-Node ( Initial-State [ problem ]) // make random loop do // initial state. next  a highest-valued successor of current if Value [next] < Value [current] then return current current  next end

How would Hill- Climbing do on the following problems? How can we improve Hill-Climbing? Random restarts! Intuition: call hill- climbing as many times as you can afford, choose the best answer.

function Simulated-Annealing ( problem, schedule ) returns a solution state inputs : problem // a problem schedule // a mapping from time to "temperature" local variables : current // a node next // a node T // a "temperature" controlling the probability of downward steps current  Make-Node ( Initial-State [ problem ]) for t  1 to  do T  schedule [ t ] if T = 0 then return current next  a randomly selected successor of current  E  Value [ next ] - Value [ current ] if  E > 0 then current  next else current  next only with probability e  E/T

Genetic Algorithms I (R and N, pages ) Variation (members of the same species are differ in some ways). Heritability (some of variability is inherited). Finite resources (not every individual will live to reproductive age). Given the above, the basic idea of natural selection is this. Some of the characteristics that are variable will be advantageous to survival. Thus, the individuals with the desirable traits are more likely to reproduce and have offspring with similar traits... And therefore the species evolve over time… Richard Dawkins Since natural selection is known to have solved many important optimizations problems it is natural to ask can we exploit the power of natural selection?

Genetic Algorithms II The basic idea of genetic algorithms (evolutionary programming). Initialize a population of n states (randomly) While time allows Measure the quality of the states using some fitness function. “kill off” some of the states. Allow the surviving states to reproduce (sexually or asexually or..) end Report best state as answer. All we need do is...(A) Figure out how to represent the states. (B) Figure out a fitness function. (C) Figure out how to allow our states to reproduce.

Genetic Algorithms III log(x y ) + sin(tan(y-x)) y x - tan sin + log y pow x One possible representation of the states is a tree structure… Another is a bitstring… For problems where we are trying to find the best order to do some thing (TSP), a linked list might work...

Genetic Algorithms IIII y x - tan sin + log y pow x Usually the fitness function is fairly trivial. For the function maximizing problem we can evaluate the given function with the state (the values for x, y, z... etc) For the function finding problem we can evaluate the function and see how close it matches the data. For TSP the fitness function is just the length of the tour represented by the linked list

Genetic Algorithms V y x - tan sin + log y pow x 5 + cos y / x y x - tan sin + cos y / x Parent state A Parent state B Child of A and B Parent state A Parent state B Child of A and B Sexual Reproduction (crossover)

Genetic Algorithms VI Parent state A Child of A Asexual Reproduction Mutation 5 + cos y / x 5 + tan y / x Mutation Parent state A Child of A Parent state A Child of A

Discussion of Genetic Algorithms It turns out that the policy of “keep the best n individuals” is not the best idea… Genetic Algorithms require many parameters... (population size, fraction of the population generated by crossover; mutation rate, number of sexes... ) How do we set these? Genetic Algorithms are really just a kind of hill-climbing search, but seem to have less problems with local maximums… Genetic Algorithms are very easy to parallelize... Applications Protein Folding, Circuit Design, Job-Shop Scheduling Problem, Timetabling, designing wings for aircraft….

y x - tan sin + log y pow x 5 + cos y / x