Biologically Inspired Computing: Introduction to Evolutionary Algorithms This is lecture four of `Biologically Inspired Computing’ Contents: Local Search.

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

CS6800 Advanced Theory of Computation
Biologically Inspired Computation Really finishing off EC.
Biologically Inspired Computing: Introduction to Evolutionary Algorithms This is lecture three of `Biologically Inspired Computing’ Contents: EA intro.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
EvoNet Flying Circus Introduction to Evolutionary Computation Brought to you by (insert your name) The EvoNet Training Committee The EvoNet Flying Circus.
Biologically Inspired Computing: Evolutionary Algorithms: Encodings, Operators and Related Issues: Timetables and Groups This is a lecture seven of `Biologically.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Local search algorithms
EvoNet Flying Circus Introduction to Evolutionary Computation Brought to you by (insert your name) The EvoNet Training Committee The EvoNet Flying Circus.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
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.
EAs for Combinatorial Optimization Problems BLG 602E.
Chapter 14 Genetic Algorithms.
Evolutionary Computational Intelligence Lecture 8: Memetic Algorithms Ferrante Neri University of Jyväskylä.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Biologically Inspired Computing: Evolutionary Algorithms: Hillclimbing, Landscapes, Neighbourhoods This is lecture 4 of `Biologically Inspired Computing’
Genetic Algorithms: A Tutorial
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
Evolutionary Algorithms BIOL/CMSC 361: Emergence Lecture 4/03/08.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
Biologically Inspired Computing: Evolutionary Algorithms: Encodings, Operators and Related Issues: Rules, Trees, Graphs This is additional material for.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
Artificial Intelligence Lecture No. 31 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!
PSO and ASO Variants/Hybrids/Example Applications & Results Lecture 12 of Biologically Inspired Computing Purpose: Not just to show variants/etc … for.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
1 Chapter 14 Genetic Algorithms. 2 Chapter 14 Contents (1) l Representation l The Algorithm l Fitness l Crossover l Mutation l Termination Criteria l.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Kasin Prakobwaitayakit Department of Electrical Engineering Chiangmai University.
Biologically Inspired Computation Some of the images in this lecture come from slides for a Course in Swarm Intelligence given at : Lecture 5: Introducing.
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Biologically Inspired Computing: Optimisation This is mandatory additional material for `Biologically Inspired Computing’ Contents: Optimisation; hard.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
1 Genetic Algorithms and Ant Colony Optimisation.
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.
Probabilistic Algorithms Evolutionary Algorithms Simulated Annealing.
Local Search and Optimization Presented by Collin Kanaley.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Biologically Inspired Computing: Evolutionary Algorithms: Some Details and Examples This is additional material for lecture 2 of `Biologically Inspired.
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.
Genetic Algorithms Chapter Description of Presentations
Biologically Inspired Computing: Indirect Encodings, and Hyperheuristics This is DWC’s lecture 7 for `Biologically Inspired Computing’ Contents: direct.
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
Genetic Algorithms. Solution Search in Problem Space.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Chapter 14 Genetic Algorithms.
CSCI 4310 Lecture 10: Local Search Algorithms
Evolution Strategies Evolutionary Programming
School of Computer Science & Engineering
Artificial Intelligence (CS 370D)
Comparing Genetic Algorithm and Guided Local Search Methods
Advanced Artificial Intelligence Evolutionary Search Algorithm
`Biologically Inspired Computing’
Metaheuristic methods and their applications. Optimization Problems Strategies for Solving NP-hard Optimization Problems What is a Metaheuristic Method?
Artificial Intelligence
This is lecture 4 of `Biologically Inspired Computing’ Contents:
This is additional material for week 2 of
Traveling Salesman Problem by Genetic Algorithm
Presentation transcript:

Biologically Inspired Computing: Introduction to Evolutionary Algorithms This is lecture four of `Biologically Inspired Computing’ Contents: Local Search Encodings

Typical Landscapes As we home in on the good areas, we can identify broad types of Landscape feature. Most landscapes of interest are predominantly multimodal. Despite being locally smooth, they are globally rugged Unimodal Plateau Multimodal Deceptive

Beyond Hillclimbing HC clearly has problems with typical landscapes: There are two broad ways to improve HC, from the algorithm viewpoint: 1.Allow downhill moves – a family of methods called Local Search does this in various ways. 2.Have a population – so that different regions can be explored inherently in parallel – I.e. we keep `poor’ solutions around and give them a chance to `develop’.

Local Search Initialise: Generate a random solution c; evaluate its fitness, f(s) = b; call c the current solution, and call b the best so far. Repeat until termination conditon reached: 1.Search the neighbourhood of c, and choose one, m Evaluate fitness of m, call that x. 2. According to some policy, maybe replace c with x, and update c and b as appropriate. E.g. Monte Carlo search: 1. same as hillclimbing; 2. If x is better, accept it as new current solution;if x is worse, accept it with some probabilty (e.g. 0.1). E.g. tabu search: 1. evaluate all immediate neighbours of c 2. choose the best from (1) to be the next current solution, unless it is `tabu’ (recently visited), in which choose the next best, etc.

Population-Based Search Local search is fine, but tends to get stuck in local optima, less so than HC, but it still gets stuck. In PBS, we no longer have a single `current solution’, we now have a population of them. This leads directly to the two main algorithmic differences between PBS and LS –Which of the set of current solutions do we mutate? We need a selection method – With more than one solution available, we needn’t just mutate, we can [mate, recombine, crossover, etc …] two or more current solutions. So this is an alternative route towards motivating our nature-inspired EAs – and also starts to explain why they turn out to be so good.

Basics of Encodings

Encoding / Representation Maybe the main issue in (applying) EC Note that: Given an optimisation problem to solve, we need to find a way of encoding candidate solutions There can be many very different encodings for the same problem Each way affects the shape of the landscape and the choice of best strategy for climbing that landscape.

E.g. encoding a timetable I 4, 5, 13, 1, 1, 7, 13, 2 Generate any string of 8 numbers between 1 and 16, and we have a timetable! Fitness may be + + etc … Figure out an encoding, and a fitness function, and you can try to evolve solutions. montuewedthur 9:00E4, E5 E2E3, E7 11:00E8 2:00E6 4:00E1 Exam1 in 4 th slot Exam2 in 5 th slot Etc …

Mutating a Timetable with Encoding 1 4, 5, 13, 1, 1, 7, 13, 2 montuewedthur 9:00E4, E5 E2E3, E7 11:00E8 2:00E6 4:00E1 Using straightforward single-gene mutation Choose a random gene

Mutating a Timetable with Encoding 1 4, 5, 6, 1, 1, 7, 13, 2 montuewedthur 9:00E4, E5 E2E7 11:00E8E3 2:00E6 4:00E1 Using straightforward single-gene mutation One mutation changes position of one exam

Alternative ways to do it This is called a `direct’ encoding. Note that: A random timetable is likely to have lots of clashes. The EA is likely (?) to spend most of its time crawling through clash-ridden areas of the search space. Is there a better way?

E.g. encoding a timetable II 4, 5, 13, 1, 1, 7, 13, 2 montuewedthur 9:00E4, E5 E2E3, E7 11:00E8 2:00E6 4:00E1 Use the 4 th clash-free slot for exam1 Use the 5 th clash-free slot for exam2 Use the 13 th clash-free slot for exam3 Etc …

E.g. encoding a timetable III H1, H3, H2, H2, H1, H1 … montuewedthur 9:00E4, E5 E2E3, E7 11:00E8 2:00E6 4:00E1 Use heuristic H1 to schedule exam1 (first fit) Use heuristic H3 to schedule exam2 (best fit based on consecs) Use heuristic H2 to schedule exam3 (reduce future conflicts) Etc …

One of the very first applications. Determine the internal shape of a two-phase jet nozzle that can achieve the maximum possible thrust under given starting conditions Ingo Rechenberg was the very first, with pipe-bend design This is slightly later work in the same lab, by Schwefel Starting point EA (ES) running Result A recurring theme: design freedom  entirely new and better designs based on principles we don’t yet understand.

A Real Encoding (and: How EAs can innovate, rather than just optimize) D1, D2, D3, D4 D5 D6 D1 >= D2 >= D3, D4 <= D5 <= D6 Fixed at six diameters, five sections

E.g. How EAs can innovate, rather than just optimize 2, 1.8, 1.1, D1 >= D2 >= D3, D4 <= D5 <= D6 Fixed at six diameters, five sections

E.g. How EAs can innovate, rather than just optimize Z1, Z2, D1, D2, D3 Dsmall…, Dn, Dn+1, … Middle section constrained to be smallest, That’s all Mutations can change diameters, add sections, and delete sections Num sections before smallest Num sections after smallest Section diameters

Constructive Methods Problems like timetabling, scheduling, and other `logistics’ activities are often `solved’ in practice via constructive heuristics, These are also called greedy heuristics. A constructive method is a technique that builds a single solution step by step, trying to be clever (often) about each step.

Examples Prim’s algorithm for building the minimal spanning tree (see an earlier lecture) is an example. Djikstra’s shortest path algorithm is also an example. In both of these cases, the optimal solution is guaranteed to be found, since MST and SP are easy problems. But usually we see constructive methods used to give very fast `OK’ solutions to hard problems.

A constructive method for the TSP Start with a random current city c; mark c as visited: Initialise Tour = {} (empty) Repeat ncities-1 times: choose, BTR, the closest unvisited city to c (call it d) add the edge c  d to Tour mark d as visited Let d be the current city Try it yourself a few times. Can you construct examples where this will give a very poor result?

A constructive method for exam timetabling Repeat nexams times: choose an exam, e, randomly. let V be the set of valid timeslots for e – I.e. slots it can go in without introducing a clash. If V is empty, mark e as unplaced Else choose random slot t from V, and assign e to t. Is this how people do timetabling, or is there an even better way?

A (usually) better constructive method for exam timetabling Assign a difficulty score to each exam – e.g. this could be the number of other exams with which it clashes. Repeat nexams times: choose an unscheduled exam e with highest difficulty,BTR. Find V, the set of slots it can go in without introducing a clash. If V is empty, mark e as unplaced Else for each slot in V, find its usability score – e.g. the number of unplaced exams that could go in that slot without introducing a clash Choose a slot t with minimal usability score. Assign e to t.

Back to encoding … We can use constructive methods as encodings in the following sort of way; this is sometimes called a `hybrid’ approach. The EA searches through the space of orderings of items (e.g. exams to schedule, edges to put in a graph, etc…). When evaluating fitness, a constructive method builds a solution using the ordering provided in the chromosome, and then evaluates fitness in the normal way.

Think about these things How could you design a `smart’ mutation operator for the direct timetable encoding? (hint – when you’ve randomly chosen a gene to mutate, can you do better than give it a random new slot?) How could you design a smart mutation operator for the indirect timetable encoding? (hint – hard)

Direct vs Indirect Encodings Direct: straightforward genotype (encoding)  phenotype (individual) mapping Easy to estimate effects of mutation Fast interpretation of chromosome (hence speedier fitness evlaluation) Indirect/Hybrid: Easier to exploit domain knowledge – (e.g. use this in the constructive heuristic) Hence, possible to `encode away’ undesirable features Hence, can seriously cut down the size of the search space But, slow interpretation Neighbourhoods are highly rugged.

Back to Bin-Packing The bin-packing encoding that you will use in your assignment is a direct one. But there are some well-known constructive heuristics for bin-packing: the following ones are used when the bins have fixed capaities, and the problem is to pack the items into the smallest number of bins: First-fit-random (FFR): Repeat nitems times: Choose an item i randomly and place it in the first bin in which it will fit. First-fit-descending (FFD): Order the items from heaviest to lightest (BTR) For each item in order: place it into the first bin in which it will fit. How might you invent an indirect encoding for bin-packing?

An important aside about constructive methods Some Constructive Heuristics are deterministic. I.e. they give the same answer each time. Some are stochastic – I.e. they may give a different solution in different runs. Usually, if we have a deterministic constructive method such as FFD, we can engineer a stochastic version of it. E.g. instead of choosing the next-lightest item in each step, we might choose randomly between the lightest three unplaced items. When applying EAs, it is often found that a stochastic constructive heuristic is very useful for building an initial population. But care has to be taken with such an approach – why?

This week’s additional material Further encodings: Grouping problems, Rules, Trees.