Beyond Classical Search

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Local Search Algorithms
Local Search Algorithms Chapter 4. Outline Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Ant Colony Optimization.
LOCAL SEARCH AND CONTINUOUS SEARCH. Local search algorithms  In many optimization problems, the path to the goal is irrelevant ; the goal state itself.
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Local search algorithms
Trading optimality for speed…
CSC344: AI for Games Lecture 4: Informed search
Tutorial 1 Temi avanzati di Intelligenza Artificiale - Lecture 3 Prof. Vincenzo Cutello Department of Mathematics and Computer Science University of Catania.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithm.
Evolutionary Intelligence
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
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.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Artificial Intelligence Chapter 4. Machine Evolution Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
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
1 Shanghai Jiao Tong University Informed Search and Exploration.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Artificial Intelligence Chapter 4. Machine Evolution.
Algorithms and their Applications CS2004 ( ) 13.1 Further Evolutionary Computation.
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,
1 Genetic Algorithms and Ant Colony Optimisation.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
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.
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.
Automated discovery in math Machine learning techniques (GP, ILP, etc.) have been successfully applied in science Machine learning techniques (GP, ILP,
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Local Search Algorithms and Optimization Problems
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
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.
March 1, 2016Introduction to Artificial Intelligence Lecture 11: Machine Evolution 1 Let’s look at… Machine Evolution.
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"
Games: Expectimax MAX MIN MAX Prune if α ≥ β. Games: Expectimax MAX MIN MAX
Introduction to Genetic Algorithms
Genetic Algorithms.
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
Evolution Strategies Evolutionary Programming
Local Search Algorithms
Artificial Intelligence (CS 370D)
CS621: Artificial Intelligence
Artificial Intelligence Chapter 4. Machine Evolution
Artificial Intelligence Chapter 4. Machine Evolution
GENETIC ALGORITHMS & MACHINE LEARNING
Introduction to Artificial Intelligence Lecture 11: Machine Evolution
Artificial Intelligence Chapter 4. Machine Evolution
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
Artificial Intelligence Chapter 4. Machine Evolution
Artificial Intelligence
First Exam 18/10/2010.
Local Search Algorithms
Population Based Metaheuristics
Local Search Algorithms
Presentation transcript:

Beyond Classical Search Shanghai Jiao Tong University

Outline Local search algorithms Hill-climbing search Simulated annealing search Local beam search Genetic algorithms

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" configurations Find configuration satisfying constraints, e.g., n-queens In such cases, we can use local search algorithms, keep a single "current" state, try to improve it

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

Hill-climbing search "Like climbing Everest in thick fog with amnesia"

Local Search in Continuous Spaces

Hill-climbing search Problem: depending on initial state, can get stuck in local maxima

Hill-climbing search: 8-queens problem h = number of pairs of queens that are attacking each other, either directly or indirectly h = 17 for the above state

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

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.

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

Outline Local search algorithms Hill-climbing search Simulated annealing search Local beam search Genetic algorithms

Biological Basis Biological systems adapt themselves to a new environment by evolution. Generations of descendants are produced that perform better than do their ancestors. Biological evolution Production of descendants changed from their parents Selective survival of some of these descendants to produce more descendants

Evolutionary Computation What is the Evolutionary Computation? Stochastic search (or problem solving) techniques that mimic the metaphor of natural biological evolution. Metaphor(隐喻) EVOLUTION Individual Fitness Environment PROBLEM SOLVING Candidate Solution Quality Problem

Basic Concepts 个体 individual 种群 population 进化 evolution 适应度 fitness 选择 selection 复制 reproduction 交叉 crossover 变异 mutation

General Framework of EC Generate Initial Population Fitness Function Evaluate Fitness Termination Condition? Yes Best Individual No Select Parents Crossover, Mutation Generate New Offspring

Geometric Analogy - Mathematical Landscape

Paradigms in EC Evolutionary Programming (EP) [L. Fogel et al., 1966] FSMs, mutation only, tournament selection Evolution Strategy (ES) [I. Rechenberg, 1973] Real values, mainly mutation, ranking selection Genetic Algorithm (GA) [J. Holland, 1975] Bitstrings, mainly crossover, proportionate selection Genetic Programming (GP) [J. Koza, 1992] Trees, mainly crossover, proportionate selection

(Simple) Genetic Algorithm (1) Genetic Representation Chromosome A solution of the problem to be solved is normally represented as a chromosome which is also called an individual. This is represented as a bit string. This string may encode integers, real numbers, sets, or whatever. Population GA uses a number of chromosomes at a time called a population. The population evolves over a number of generations towards a better solution.

Genetic Algorithm (2) Fitness Function The GA search is guided by a fitness function which returns a single numeric value indicating the fitness of a chromosome. The fitness is maximized or minimized depending on the problems. Eg) The number of 1's in the chromosome Numerical functions

Genetic Algorithm (3) Selection Selecting individuals to be parents Chromosomes with a higher fitness value will have a higher probability of contributing one or more offspring in the next generation Variation of Selection Proportional (Roulette wheel) selection Tournament selection Ranking-based selection

Genetic Algorithm (4) Genetic Operators Crossover (1-point) A crossover point is selected at random and parts of the two parent chromosomes are swapped to create two offspring with a probability which is called crossover rate. This mixing of genetic material provides a very efficient and robust search method. Several different forms of crossover such as k-points, uniform

Genetic Algorithm (5) Mutation Reproduction Mutation changes a bit from 0 to 1 or 1 to 0 with a probability which is called mutation rate. The mutation rate is usually very small (e.g., 0.001). It may result in a random search, rather than the guided search produced by crossover. Reproduction Parent(s) is (are) copied into next generation without crossover and mutation.

Example of Genetic Algorithm

Machine Programmer Question: is it possible for a machine to develop a computer program to solve a problem?

Genetic Programming Genetic programming uses variable-size tree-representations rather than fixed-length strings of binary values. Program tree = S-expression = LISP parse tree Tree = Functions (Nonterminals) + Terminals

GP Tree: An Example Function set: internal nodes Functions, predicates, or actions which take one or more arguments Terminal set: leaf nodes Program constants, actions, or functions which take no arguments S-expression: (+ 3 (/ ( 5 4) 7)) Terminals = {3, 4, 5, 7} Functions = {+, , /}

Setting Up for a GP Run The set of terminals The set of functions The fitness measure The algorithm parameters population size, maximum number of generations crossover rate and mutation rate maximum depth of GP trees etc. The method for designating a result and the criterion for terminating a run.

Crossover: Subtree Exchange + + b   a +   a b b  a + +   +    a b b  b a b a

Mutation + + / + /   - b  a b b  a b b a a

Example: Wall-Following Robot Program Representation in GP Functions AND (x, y) = 0 if x = 0; else y OR (x, y) = 1 if x = 1; else y NOT (x) = 0 if x = 1; else 1 IF (x, y, z) = y if x = 1; else z Terminals Actions: move the robot one cell to each direction {north, east, south, west} Sensory input: its value is 0 whenever the coressponding cell is free for the robot to occupy; otherwise, 1. {n, ne, e, se, s, sw, w, nw}

A Wall-Following Program

Evolving a Wall-Following Robot Experimental Setup Population size: 5,000 Fitness measure: the number of cells next to the wall that are visited during 60 steps Perfect score (320) One Run (32)  10 randomly chosen starting points Termination condition: found perfect solution Selection: tournament selection

Creating Next Generation 500 programs (10%) are copied directly into next generation. Tournament selection 7 programs are randomly selected from the population 5,000. The most fit of these 7 programs is chosen. 4,500 programs (90%) are generated by crossover. A mother and a father are each chosen by tournament selection. A randomly chosen subtree from the father replaces a randomly selected subtree from the mother. In this example, mutation was not used.

Two Parents Programs and Their Children

Result (1) Generation 0 The most fit program (Fitness = 92)

Result (2) Generation 2 The most fit program (fitness = 117) Smaller than the best one of generation 0, but it does get stuck in the lower-right corner.

Result (3) Generation 6 The most fit program (fitness = 163) Following the wall perfectly but still gets stuck in the bottom-right corner.

Result (4) Generation 10 The most fit program (fitness = 320) Following the wall around clockwise and moves south to the wall if it doesn’t start next to it.

Result (5) Fitness Curve Fitness as a function of generation number The progressive (but often small) improvement from generation to generation

Genetic algorithms

Local Search in Continuous Spaces

Questions? What further problems will we meet? Constraints Multi-agents Uncertainty

End of the Talk