Evolutionary Computation - Lecture 1:...

54
Introduction Evolutionary Computation Lecture 1: Introduction Claus Aranha [email protected] Department of Computer Science July 17, 2013 Claus Aranha (Department of Computer Science) July 17, 2013 1 / 43

Transcript of Evolutionary Computation - Lecture 1:...

Page 1: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Introduction

Evolutionary ComputationLecture 1: Introduction

Claus [email protected]

Department of Computer Science

July 17, 2013

Claus Aranha (Department of Computer Science) July 17, 2013 1 / 43

Page 2: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Introduction Description

Course Contents

In this course we will overview of the class of optimization algorithmscalled Evolutionary Computation.The course will cover the basics of Genetic Algorithms, includingtheory, application and implementation. We will also discuss somecommon variations of GA, such as DE, GP and MOGA.

Claus Aranha (Department of Computer Science) July 17, 2013 2 / 43

Page 3: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Introduction Description

Course Goals

By the end of this course, the student should have a general view ofthe Evolutionary computation Field. We expect the student will be ableto:

Analyze an optimization problem and determine if it is possible touse some form of evolutionary computation method to it.When using a Genetic Algorithm, being able to chooseappropriate operators and parameters from the literature.Be able to design the code for a simple Genetic Algorithm System.Be able to discuss theoretical concepts involving EvolutionaryComputation.

Claus Aranha (Department of Computer Science) July 17, 2013 3 / 43

Page 4: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Introduction Description

Requirements and Reports

GradingThe course will be graded on a written report and a programmingassignment. The assignments will be described in the last week, andthe students will have 2 weeks to complete them.

Programming examples and exercises in the course will be mostlydone in python or python-like pseudocode. We will use the py-evolvepackage a lot.Most programming examples will be discussed in the second and thirdclasses - I suggest you study a bit of python before then - it is fun!

Claus Aranha (Department of Computer Science) July 17, 2013 4 / 43

Page 5: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

Evolutionary Algorithms: The elevator pitch

Machine Learning Method;An algorithm that auto-adapts to problems;

Auto-adaptation takes place through evolution;Solutions found by evolution are robust to changes in the problem;Does not require too much knowledge about context;Deals well with multi-modal, discontinuous, high-dimentionalproblem spaces;

Claus Aranha (Department of Computer Science) July 17, 2013 5 / 43

Page 6: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

Evolutionary Algorithms: The elevator pitch

Machine Learning Method;An algorithm that auto-adapts to problems;Auto-adaptation takes place through evolution;Solutions found by evolution are robust to changes in the problem;

Does not require too much knowledge about context;Deals well with multi-modal, discontinuous, high-dimentionalproblem spaces;

Claus Aranha (Department of Computer Science) July 17, 2013 5 / 43

Page 7: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

Evolutionary Algorithms: The elevator pitch

Machine Learning Method;An algorithm that auto-adapts to problems;Auto-adaptation takes place through evolution;Solutions found by evolution are robust to changes in the problem;Does not require too much knowledge about context;Deals well with multi-modal, discontinuous, high-dimentionalproblem spaces;

Claus Aranha (Department of Computer Science) July 17, 2013 5 / 43

Page 8: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

Evolutionary Algorithms: The elevator pitch

Machine Learning Method;An algorithm that auto-adapts to problems;Auto-adaptation takes place through evolution;Solutions found by evolution are robust to changes in the problem;Does not require too much knowledge about context;Deals well with multi-modal, discontinuous, high-dimentionalproblem spaces;

How much of this is accurate?

Claus Aranha (Department of Computer Science) July 17, 2013 5 / 43

Page 9: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

An evolutionary Story

Lamarck and the Giraffes;Darwin and the English Butterflies;

Claus Aranha (Department of Computer Science) July 17, 2013 6 / 43

Page 10: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

An evolutionary Story

Lamarck and the Giraffes;Darwin and the English Butterflies;

The evolutionary computation analogy

Claus Aranha (Department of Computer Science) July 17, 2013 6 / 43

Page 11: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

Evolutionary Algorithm Example: Box2d Evo Cars

Claus Aranha (Department of Computer Science) July 17, 2013 7 / 43

Page 12: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

Outline of an Evolutionary Algorithm

Problem EnvironmentSolutions PopulationOperators Search Heuristics

Utility Fitness FunctionsIterations Generations

Claus Aranha (Department of Computer Science) July 17, 2013 8 / 43

Page 13: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

What do Evolutionary Algorithms DO then?

1 Generate random solutions to a problem;2 Select the best solutions by some metrics;3 Create new solutions based on the selected best solutions;

Claus Aranha (Department of Computer Science) July 17, 2013 9 / 43

Page 14: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The dream behind GA?

What do Evolutionary Algorithms DO then?

1 Generate random solutions to a problem;2 Select the best solutions by some metrics;3 Create new solutions based on the selected best solutions;

Keep this in mind, we are going to repeat it many times

Claus Aranha (Department of Computer Science) July 17, 2013 9 / 43

Page 15: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch What is evolution?

Biological Evolution

Why do we care?It is important to have a clear image about how recent ideas ofevolution work. This can be useful for having new ideas regardingevolutionary algorithms, or to understand the world.

Claus Aranha (Department of Computer Science) July 17, 2013 10 / 43

Page 16: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch What is evolution?

Biological Evolution

Why do we care?It is important to have a clear image about how recent ideas ofevolution work. This can be useful for having new ideas regardingevolutionary algorithms, or to understand the world.

Beware of forcing too much biology into your algorithms!

Claus Aranha (Department of Computer Science) July 17, 2013 10 / 43

Page 17: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch What is evolution?

An individual and its genome

GenotypeThe genetic code of an individual, determines how the development ofthat individual’s entire body will proceed. In general identical genomewill result in almost identical individuals, and similar genomes willresult in similar individuals.

PhenotypeThe expression of the genome into an individual. A physical body thatinterfaces with the environment.

Claus Aranha (Department of Computer Science) July 17, 2013 11 / 43

Page 18: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch What is evolution?

An individual and its genome

GenotypeThe genetic code of an individual, determines how the development ofthat individual’s entire body will proceed. In general identical genomewill result in almost identical individuals, and similar genomes willresult in similar individuals.

PhenotypeThe expression of the genome into an individual. A physical body thatinterfaces with the environment.

There are also some “Developmental” issues, but we don’t need to godeep into them right now

Claus Aranha (Department of Computer Science) July 17, 2013 11 / 43

Page 19: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch What is evolution?

Biological Evolution

What is EvolutionEvolution is the change in the distribution of genotypes in a populationover time

What about survival of the fittest?Darwin’s theory of natural selection explains how the gene distributionchanges. In other words, it is the difference between evolution and thetheory of evolution.

(For example, another “theory of evolution” was Lamarck’s theory...)

Claus Aranha (Department of Computer Science) July 17, 2013 12 / 43

Page 20: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The Field and Lingo of Evolutionary Computation

Evolutionary Computation and its Relatives

Evolutionary Computation;General term for computer methods using some form ofevolutionary analogy.Evolution Strategies;Early evolutionary method, non-populational.Evolutionary Algorithms;Used with many different senses;Genetic Algorithms;Classic evolutionary method, individuals in the population encodecandidate solutions for the problem.

Claus Aranha (Department of Computer Science) July 17, 2013 13 / 43

Page 21: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The Field and Lingo of Evolutionary Computation

Evolutionary Computation and its Relatives

Genetic Programming;More “recent” method where the individuals encode programs thatcan be used to solve the proposed problem.Differential Evolution;Even more recent method with specialized mutation andcrossover operators for genomes composed of real values.Interactive Evolution;The Fitness function is provided by a human user. Normally usedin artistic domains (Evolutionary Art).Evolutionary Neural Networks and others;

Claus Aranha (Department of Computer Science) July 17, 2013 14 / 43

Page 22: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Elevator Pitch The Field and Lingo of Evolutionary Computation

Evolutionary Computation Lingo

Beware of mixing algorithmic therms with biological terms!

Iteration;Convergence;Epigenetic;Diversity;Generational,non-generational;Genotype and Phenotype;

Exploration and Exploitation;Local Search and GlobalSearch;Overfitting;Genetic Drift;Candidate Solution;

Claus Aranha (Department of Computer Science) July 17, 2013 15 / 43

Page 23: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Looking at Evolutionary Computation from aAlgorithmic point of view

Evolutionary Computation methods as Meta-heuristic searchalgorithms.

Claus Aranha (Department of Computer Science) July 17, 2013 16 / 43

Page 24: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Search Algorithms

Search Algorithms enumerate all the States of a problem, in order tofind a goal, or optimal state.

Breadth First Search;Depth First Search;Random Search;Etc;

Claus Aranha (Department of Computer Science) July 17, 2013 17 / 43

Page 25: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Search Space

Search spaces are defined as the set of all the possible states for aproblem. For interesting problems, the search space is usually notenumerable.

Search space qualitiesImplicit, explicit, Unimodal, Multimodal, Continuous, Discontinuous,Monotonic, non-monotonic, etc

Claus Aranha (Department of Computer Science) July 17, 2013 18 / 43

Page 26: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Heuristics

Problem: Finding the shortest path on a maze

How can we improve on the simple DFS, if we are looking for a way outon a grid-like maze?

Claus Aranha (Department of Computer Science) July 17, 2013 19 / 43

Page 27: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Heuristics

Problem: Finding the shortest path on a maze

How can we improve on the simple DFS, if we are looking for a way outon a grid-like maze?

Hint: Dijkstra’s Algorithm

Claus Aranha (Department of Computer Science) July 17, 2013 19 / 43

Page 28: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Heuristics

Problem: Finding the shortest path on a maze

How can we improve on the simple DFS, if we are looking for a way outon a grid-like maze?

Hint: Dijkstra’s Algorithm

Heuristics bring extra information that can be used to guide the searcheffort.

Claus Aranha (Department of Computer Science) July 17, 2013 19 / 43

Page 29: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Heuristics: Example

What would be a good heuristic search for:

A Sudoku Puzzle?Climbing a mountain in an unknown area?Playing a connect-4 game?

Claus Aranha (Department of Computer Science) July 17, 2013 20 / 43

Page 30: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Basic Definitions

Heuristics: Example

What would be a good heuristic search for:

A Sudoku Puzzle?Climbing a mountain in an unknown area?Playing a connect-4 game?

Notice that the two last examples do not include complete informationabout the problem.

Claus Aranha (Department of Computer Science) July 17, 2013 20 / 43

Page 31: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Evolutionary Algorithms as a Search Heuristic

Why is EC a search heuristic?

The basic genetic algorithm:

Generate multiple candidate solutions;Select the best solutions;Generate new candidate solutions based on the best solutions;

Claus Aranha (Department of Computer Science) July 17, 2013 21 / 43

Page 32: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Evolutionary Algorithms as a Search Heuristic

Why is EC a search heuristic?

The basic genetic algorithm:

Generate multiple candidate solutions;Select the best solutions;Generate new candidate solutions based on the best solutions;

Claus Aranha (Department of Computer Science) July 17, 2013 21 / 43

Page 33: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Evolutionary Algorithms as a Search Heuristic

What is EC doing, from a search-space point of view?

The individuals in a population are a sample from the search space.The evolutionary algorithm (implicitely) estimates the shape of thesearch space based on the fitness value of the individuals. Newsamples are taken from the search space based on the (implicit)estimate from the previous sample.

Let’s try to visualize this in a plane;

Claus Aranha (Department of Computer Science) July 17, 2013 22 / 43

Page 34: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Evolutionary Algorithms as a Search Heuristic

Comparing points of view about EvolutionaryComputation

Evolutionary AnalogyIndividuals adapt to theproblem;Operators are bio-inspired;Genome representsknowledge;Captures the imagination;

Search Meta HeuristicSampling the search space;Operators manipulate thesearch algorithm;Representation defines thesearch space boundaries;Makes (most) reviewershappy;

Claus Aranha (Department of Computer Science) July 17, 2013 23 / 43

Page 35: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Evolutionary Algorithms as a Search Heuristic

Expectations of EC as a search heuristic

Generally, Evolutionary Computation usually performs well in“discontinuous” or “hard” search spaces. We can consider this to bebecause of the large steps taken by the crossover operator.

Evolutionary Computation is also considered to be able to generate“creative” solutions. This is usually attributed to the fact that althoughthe fitness function is set, the way to satisfy the fitness function is notset.

Claus Aranha (Department of Computer Science) July 17, 2013 24 / 43

Page 36: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Theoretical Concepts Evolutionary Algorithms as a Search Heuristic

Some extra concepts

No Free Lunch TheoremThe Curse of Dimensionality

It is important to know when GA can be the answer to a hard problem,and when it cannot.

Claus Aranha (Department of Computer Science) July 17, 2013 25 / 43

Page 37: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Outline of a Genetic Algorithm

Define the genome representation and the fitness function, basedon the problem that you want to solve;Generate random individuals for the first generation;Select individuals with the highest fitness value, based on theselection operator;Generate new individuals, based on the crossover and mutationoperators;Repeat the above until a pre-defined stop criteria is met;

Claus Aranha (Department of Computer Science) July 17, 2013 26 / 43

Page 38: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Fitness Function

The first decision that must be made when desigining an EvolutionaryComputation algorithm is, generally, the Fitness Function.

This is the part of the algorithm that will guide the state search;An imprecise definition of the fitness function may lead to thealgorithm “cheating”;Pay close attention if you are going to define a minimizing ormaximizing fitness function;Analysis of the fitness function may say something about thesearch space.

Claus Aranha (Department of Computer Science) July 17, 2013 27 / 43

Page 39: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Genome Representation

By defining your genome representation, you define the entire searchspace. Make sure to define a search space that include the location foryour optimal solution. (Good and Bad examples)

Claus Aranha (Department of Computer Science) July 17, 2013 28 / 43

Page 40: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Population

The initial population is usually defined randomly. Although it is notunheard of initializing the population to certain values, or to insert afew seeds into the population. Just be aware that adding a few viable

individuals will strongly bias your search.

Claus Aranha (Department of Computer Science) July 17, 2013 29 / 43

Page 41: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Selection

The selection operator will guide the search, by directing the samplingof new solutions, based on previous results, as measured by thefitness function.

One way to define the selection operator is to simply take the bestindividuals in the population. Can you see why this would create moreproblems than it would solve?

Claus Aranha (Department of Computer Science) July 17, 2013 30 / 43

Page 42: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Roulette Selection

Roulette Selection (or Fitness Proportional Selection), attributes aprobability of selection to each individual based on their fitness value.

Claus Aranha (Department of Computer Science) July 17, 2013 31 / 43

Page 43: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Tournament Selection

Tournament Selection randomly selects a fixed number of individualsfrom the population as a first step. On the second step, it selects theindividual with the best fitness from those selected in the first step.

How does the number of individuals pre-selected affects the result?

Claus Aranha (Department of Computer Science) July 17, 2013 32 / 43

Page 44: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Elitism

In Elitism, we set aside a number of individuals with the best fitnessvalue, and copy them directly to the next generation.

Elitism is intended to avoid losing information to the random nature ofEC. Is there any ways to prevent that loss of information?

Claus Aranha (Department of Computer Science) July 17, 2013 33 / 43

Page 45: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Random Selection

Always remember to compare your evolutionary algorithm with therandom selection. If your problem can be solved by random selection,

maybe it is too simple for evolutionary algorithms.

Claus Aranha (Department of Computer Science) July 17, 2013 34 / 43

Page 46: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Crossover Operators

Crossover Operators are the main way that new individuals aregenerated from current ones. The Crossover operator is stronglydependant on the decision made for the Genome representation.

Claus Aranha (Department of Computer Science) July 17, 2013 35 / 43

Page 47: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Components of a GA

Mutation Operators

Mutation Operators are used to add “new information” to thepopulation. They modify existing individuals in order to add newcombinations of genomes not yet existing in the population.

Claus Aranha (Department of Computer Science) July 17, 2013 36 / 43

Page 48: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Implementation

Implementation Concerns regarding EvolutionaryAlgorithms

Object Oriented implementation;General Fluoxgram of an Evolutionary Algorithm

Claus Aranha (Department of Computer Science) July 17, 2013 37 / 43

Page 49: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice Implementation

Libraries for Evolutionary Computation

py-evolve;ECJ - evolutionary computation in Java;Open-Beagle - evolutionary computation in C++

Claus Aranha (Department of Computer Science) July 17, 2013 38 / 43

Page 50: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

GA in Practice A simple example

A simple example

EvoCircleA simple evolutionary program is used to calculate load balancing ofeugenvalue calculation methods.

Claus Aranha (Department of Computer Science) July 17, 2013 39 / 43

Page 51: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Next Class... If we have some extra time

Adding a bit more to your evolutionary portfolio.

Genetic Programming,Multi Objective Genetic Algorithms,Parallel Genetic Algorithms,Differential Evolution,Memetic Algorithms,Et cetera.

Claus Aranha (Department of Computer Science) July 17, 2013 40 / 43

Page 52: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Next Class... If we have some extra time

Real valued representation and operators;Tree-based representation and operators;

Claus Aranha (Department of Computer Science) July 17, 2013 41 / 43

Page 53: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Next Class... If we have some extra time

Mini-Python tutorial

Claus Aranha (Department of Computer Science) July 17, 2013 42 / 43

Page 54: Evolutionary Computation - Lecture 1: Introductionconclave.cs.tsukuba.ac.jp/pub/lecturenotes/CSIntensiveGA/GA-Intensive1.pdfGenerally, Evolutionary Computation usually performs well

Next Class... Reading Material

Reading Material

Claus Aranha (Department of Computer Science) July 17, 2013 43 / 43