Biologically Inspired Computing: Indirect Encodings, and Hyperheuristics This is DWC’s lecture 7 for `Biologically Inspired Computing’ Contents: direct.

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Artificial Intelligence Presentation
Constraint Optimization We are interested in the general non-linear programming problem like the following Find x which optimizes f(x) subject to gi(x)
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Improved Algorithms for Inferring the Minimum Mosaic of a Set of Recombinants Yufeng Wu and Dan Gusfield UC Davis CPM 2007.
School of Computer Science
Biologically Inspired Computation Really finishing off EC.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Bio-Inspired Optimization. Our Journey – For the remainder of the course A brief review of classical optimization methods The basics of several stochastic.
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 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Tirgul 10 Rehearsal about Universal Hashing Solving two problems from theoretical exercises: –T2 q. 1 –T3 q. 2.
EvoNet Flying Circus Introduction to Evolutionary Computation Brought to you by (insert your name) The EvoNet Training Committee The EvoNet Flying Circus.
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
Polynomial time approximation scheme Lecture 17: Mar 13.
EAs for Combinatorial Optimization Problems BLG 602E.
B + -Trees (Part 1) Lecture 20 COMP171 Fall 2006.
B + -Trees (Part 1). Motivation AVL tree with N nodes is an excellent data structure for searching, indexing, etc. –The Big-Oh analysis shows most operations.
B + -Trees (Part 1) COMP171. Slide 2 Main and secondary memories  Secondary storage device is much, much slower than the main RAM  Pages and blocks.
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Biologically Inspired Computing: Evolutionary Algorithms: Hillclimbing, Landscapes, Neighbourhoods This is lecture 4 of `Biologically Inspired Computing’
CS 447 Advanced Topics in Artificial Intelligence Fall 2002.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Biologically Inspired Computing: Introduction to Evolutionary Algorithms This is lecture four of `Biologically Inspired Computing’ Contents: Local Search.
Radial Basis Function Networks
Genetic Algorithm.
Nelishia Pillay School of Mathematics, Statistics and Computer Science University of KwZulu-Natal
Applications of Evolutionary Algorithms Michael J. Watts
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
Soft Computing Lecture 18 Foundations of genetic algorithms (GA). Using of GA.
Biologically Inspired Computing: Evolutionary Algorithms: Encodings, Operators and Related Issues: Rules, Trees, Graphs This is additional material for.
Spring 2015 Mathematics in Management Science Bin Packing The Problem The Algorithms.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
PSO and ASO Variants/Hybrids/Example Applications & Results Lecture 12 of Biologically Inspired Computing Purpose: Not just to show variants/etc … for.
The Course Timetabling Problem Presented by Ben Paechter Napier University.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Kasin Prakobwaitayakit Department of Electrical Engineering Chiangmai University.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Biologically Inspired Computation Some of the images in this lecture come from slides for a Course in Swarm Intelligence given at : Lecture 5: Introducing.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜.
Algorithms and their Applications CS2004 ( ) 13.1 Further Evolutionary Computation.
Biologically Inspired Computing: Optimisation This is mandatory additional material for `Biologically Inspired Computing’ Contents: Optimisation; hard.
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.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Power of Heuristic; non- conventional search.
The bin packing problem. For n objects with sizes s 1, …, s n where 0 < s i ≤1, find the smallest number of bins with capacity one, such that n objects.
Biologically Inspired Computing: Evolutionary Algorithms: Some Details and Examples This is additional material for lecture 2 of `Biologically Inspired.
Genetic Algorithms MITM613 (Intelligent Systems).
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Introduction to Genetic Algorithms
Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.
Evolutionary Algorithms Jim Whitehead
Evolution Strategies Evolutionary Programming
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
School of Computer Science & Engineering
Data Mining (and machine learning)
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
Advanced Artificial Intelligence Evolutionary Search Algorithm
`Biologically Inspired Computing’
Artificial Intelligence
Dr. Unnikrishnan P.C. Professor, EEE
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
This is additional material for week 2 of
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Presentation transcript:

Biologically Inspired Computing: Indirect Encodings, and Hyperheuristics This is DWC’s lecture 7 for `Biologically Inspired Computing’ Contents: direct vs indirect encodings / ‘hyperheuristics’

Encodings (aka representations) Direct vs Indirect

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.

Direct encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 Generate any string of 8 numbers between 1 and 16, and we have a timetable! Fitness may be + + etc …, and is to be minimised montuewedthur 9:00E4, E5 E2E3, E7 11:00E8 2:00 4:00E1, E6 Exam1 in 4 th slot Exam2 in 5 th slot Etc … - Assume 8 exams, E1…E slots (mon9am to thur4pm) - fitness function knows the student data … i.e. which students take which exams

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

Mutating a directly-encoded timetable 4, 5, 13, 9, 1, 4, 13, 2 montuewedthur 9:00 E5 E2E4E3, E7 11:00E8 2:00 4:00E1, E6 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?

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 11:00 2:00 4:00E1 Use the 4 th clash-free slot for exam1 The encoded solution tells us how to build the timetable step by step E1 is the first one scheduled, so there are no possible clashes – 4 th slot is also 4 th “clash-free” slot

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 11:00 E2 2:00 4:00E1 Use the 5 th clash-free slot for exam2 The encoded solution tells us how to build the timetable step by step Suppose the problem data tells us that E1 and E2 would clash. 5 th clash-free slot is therefore slot 6 Would clash with E2 No clash with E2

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E3 11:00 E2 2:00 4:00E1 Use the 13 th clash-free slot for exam3 The encoded solution tells us how to build the timetable step by step Suppose the problem data tells us that E3 has no clashes with E1 or E2, then 13 th clash-free slot is therefore slot 13

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E4 E3 11:00 E2 2:00 4:00E1 Use the 1 st clash-free slot for exam4 The encoded solution tells us how to build the timetable step by step Nothing before now in slot 1, so this is Obviously the 1 st clash-free slot

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E4 E3 11:00 E5E2 2:00 4:00E1 Use the 1 st clash-free slot for exam5 The encoded solution tells us how to build the timetable step by step Suppose E4 and E5 have students in common, so 1 st clash-free slot for E5 is slot 2

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E4 E3 11:00 E5E2,E6 2:00 4:00E1 Use the 4 th clash-free slot for exam6 The encoded solution tells us how to build the timetable step by step Suppose E6 would clash with E4 and E1; so 4 th clash-free slot for E6 is slot 6

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E4 E3,E7 11:00 E5E2,E6 2:00 4:00E1 Use the 13 th clash-free slot for exam7 The encoded solution tells us how to build the timetable step by step Suppose E7 has no students in common with any other exam, so 13 th slot is 13 th clash-free slot

An indirect encoding for exam timetabling 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E4 E3,E7 11:0 0 E5E2,E6 2:00 4:00E1,E8 Use the 2 nd clash-free slot for exam8 The encoded solution tells us how to build the timetable step by step Suppose E8 clashes with E4 and E5 but not E1

MonTuewedthur 9:00 E4 E3,E7 11:00 E5E2,E6 2:00 4:00E1,E8 Mutating an indirectly-encoded timetable 4, 5, 13, 1, 1, 4, 13, 2 Using straightforward single-gene mutation Choose a random gene

Mutating an indirectly-encoded timetable 4, 5, 13, 9, 1, 4, 13, 2 Using straightforward single-gene mutation One mutation causes considerable change MonTuewedthur 9:00 E5 E6E4E3,E7 11:00 E2 2:00E8 4:00E1

Direct encoding | an indirect encoding 4, 5, 13, 1, 1, 4, 13, 2 MonTuewedthur 9:00 E4 E3,E7 11:00 E5E2,E6 2:00 4:00E1,E8 4, 5, 13, 1, 1, 4, 13, 2 montuewedthur 9:00E4, E5 E2E3, E7 11:00E8 2:00 4:00E1, E6 There are clashes at Mon 9am and Mon 4pm No clashes, and good slot utilisation …

Direct encoding Indirect encodings The genotype (the data structure that encodes a solution) is basically the same as the Phenotype (the solution). There is a simple and ‘direct’ mapping between them. This can help with design and understanding of operators and landscapes. You basically know what type of effect a mutation will have, But: often means very bad solutions can be easily generated. Lots of ‘dross’ to evolve past. The genotype provides the parameters of and/or inputs to an algorithm that builds the Phenotype (the solution). There is a very ‘indirect’ mapping between them. This means small changes in the genotype could have huge effects on the phenotype, that are difficult to understand in advance But: often means even the initial ‘random’ solutions are quite good, and the evolution process focusses only on a much smaller search space of good candidates.

Hyper-heuristics: a specific type of indirect encoding … Indirect encoding: –Don’t encode a candidate solution directly –… instead encode parameters/features for a constructive algorithm that builds a candidate solution Hyperheuristic encoding: –Usually, this is an encoding where each ‘gene’ is a constructive algorithm (usually a simple one) which builds one part of the solution

In next few slides we will look at examples of the ‘simple heuristics’ that hyperheuristic encodings use Then we will look at a simple ‘hyperheuristic’ encoding.

HH have been most commonly researched for: bin- packing problems…

Including 2D bin-packing (also called ‘stock-cutting’)– given collection of shapes, find how to cut them out of large lamina leaving the minimum possible wastage.

Example using ‘First-Fit Ascending’ (FFA) constructive algorithm for bin-packing FFA FFA means we pack them one by one, Each time taking the smallest unpacked item

First-fit Ascending

Example using First-Fit Descending First-fit Descending FFA means we pack them one by one, Each time taking the largest unpacked item

First-Fit Descending

Other bin-packing - heuristics FFA would choose this:

Other bin-packing - heuristics FFD would choose this:

Other bin-packing - heuristics But, this one fits exactly into the partially full bin, moving it to capacity

Other bin packing heuristics … FFA - pack smallest remaining into 1 st available bin it will fit in FFD - pack largest remaining into 1 st available bin it will fit in BF - 1. consider all gaps in partially full bins; find an item that exactly fills a gap. 2. If no such item currently available, do FFA BF(2) - 1. consider all gaps in partially full bins; find an item that exactly fills a gap. 2. If no such item, find a pair of items that will together exactly fill a gap. 3. Otherwise, do FFA FFAH(p) - if the number of Huge items remaining is < p%, use FFA, otherwise use BF FFAS(p) - if the number of Small items remaining is < p%, use FFD, otherwise use BF(2) …. Etc … many other possibilities “Huge” (item is >= 2/3 of bin capacity) “small” ( item is < 1/3 of bin capacity)

hyper-heuristics … is a research area which is based on the idea of using indirect encodings for logistics problems (mainly), where the genotype is (often) a list of heuristics Used for: timetabling, scheduling, bin-packing, stock-cutting, vehicle routing, etc... Note at least two main kinds of indirect encoding that make use of ‘heuristics’. Consider timetabling: A. 1, 2, 4, 1, 7, 6 …. Use H1 with parameter 1, use H1 with parameter 2, use H1 with parameter 4, use H1 with parameter 1, etc … (our indirect encoding for timetabling was like this) B. 1, 2, 4, 1, 7,6 … Use H1, then use H2, then use H4, then use H1, … (a ‘hyper-heuristic’ encoding – see next 2 slides) … and of course there are approaches that mix up styles A and B It gets called a ‘hyper-heuristic’ approach if there is a strong ‘type B’ element.

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 8 heuristic choices each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 pack first item with BF 0.5

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 pack next item with FFD 5

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 pack next item(s) with BF(2) 55

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 pack next item with FFD 55 4

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 pack next item(s) with BF(2) 55 5

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 pack next item(s) with FFA

Example simple hyper-heuristic encoding for bin packing weights: bin capacity: 5 encoding 1 = FFA, 2 = FFD, 3 = BF, 4 = BF(2) Genotype is a list of 7 heuristic choices, (why 7 ?), each either 1, 2, 3 or 4 Let’s interpret: 3,2,4,2,4,1,2,1 only one item left, use FFD 55 55

The original HH paper: open-shop scheduling Hsiao-Lan Fang, Peter Ross, David Corne. "A promising hybrid GA/heuristic approach for open-shop scheduling problems." In Proc. 11 th European Conf. on Artificial Intelligence, List of choices of these heuristics:

Notes: constructive algorithms Each heuristic we have seen is a simple constructive algorithm – it performs the next step in constructing a solution to the problem There are many constructive heuristics for bin packing, timetabling, scheduling, etc.... often called ‘dispatch heuristics’ There are well-known constructive heuristics for many other problems, e.g. Prim’s algorithm for building the minimal spanning tree (see an earlier lecture), Djikstra’s shortest path algorithm for networks, etc… Suitably engineered, Prim’s algorithm can be used as part of an indirect encoding for solving hard constrained spanning-tree problems --- similar for Djikstra’s algorithm and network-path problems. And so on …

Direct vs Indirect Encodings: summary & other notes Direct: straightforward genotype (encoding)  phenotype (actual solution) 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, interpretation of genotype could become computationally expensive Neighbourhoods tend to be highly rugged.  tradeoff between size of search space and ruggedness - sensible engineering of the indirect encoding often beats the direct - however, direct encodings with smarts built-in to the operators can be the best choice … that’s for further reading or an advanced module…

Mandatory reading slides for - Operators (typical mutation and crossover operators for different types of encoding) - Selection (various standard selection methods) - More encodings