Presentation is loading. Please wait.

Presentation is loading. Please wait.

Evolutionary Computation

Similar presentations


Presentation on theme: "Evolutionary Computation"— Presentation transcript:

1 Evolutionary Computation
Genetic Algorithms

2 Outline Evolution Genetic Algorithms
Selection, inheritance, variation (mutation) Natural Selection Artificial Selection Some examples – successes and problems. Genetic Algorithms Selection Mutation Crossover Fitness evaluation

3 Evolution – Darwin and Mendel

4 Survival of the fittest
“white” moths are difficult to see against some trees. Which moth survives? Then there was the industrial revolution – and tree turned black with “soot”. Which moth survives now?

5 Generate and Test Approach
A “solution” is generated. It is tested on a problem instance Each solution is assigned a score (real value). This process is repeated until time expires or a solution is found. Includes much of machine learning. We try to improve the quality of solutions generated by using feedback in this loop. Alternative but equivalent view is we are sampling a space. test Generate test Test 9/22/2018 Automatically Designing Selection Heuristics

6 Generate and Test Examples
GECCO 1st workshop on Evolving Generic Algorithms. Generate and Test Examples Manufacture e.g. cars Evolution “survival of the fittest” “The best way to have a good idea is to have lots of ideas” (Linus Pauling). Computer code is also generate and tested. 9/22/2018 Automatically Designing Selection Heuristics

7 Automatically Designing Selection Heuristics
Fit For Purpose Evolution “designs/generates” organisms for a particular environment. Similarly we should design metaheuristics for particular problem class. “we propose a new crossover operator…” “what is it for…” 9/22/2018 Automatically Designing Selection Heuristics

8 Evolution Evolution has 3 components.
Selection “survival of the fittest”. Inheritance (i.e. your genes are inherited from your parents, and you look similar to your parents). Variation or mutation, random changes to your DNA

9 Examples of Evolution 1 E. coli reproduce copy DNA in 40 minutes but can give birth every 20 minutes – how ???. Hearing in 3D – human ears – how ??? The eye – design around 40 different ways. Mankind – does not mean “man”-kind but “manipulator” kind

10 Humans What makes humans unique compared to other animals? What make us so much more intelligent? Hands – compare with the apes Brains – large & expensive We walk “upright” – is this important Our diet – more complex than other animals Language (spoken) – instant communication Language (written) – communication over a period of time. Mirror Test and self awareness. What other animals can pass the mirror test???

11 Mirror Test The mirror test is a measure of self-awareness, as animals either possess or lack the ability to recognize themselves in a mirror. Animals that have passed the mirror test include: all of the great apes (bonobos, chimpanzees, orangutans, humans, and gorillas), rhesus macaques, bottlenose dolphins, orcas, elephants, and European Magpies. Robots??? Young babies. Mirror neurons.

12 Examples of Evolution 2 Giraffe laryngeal nerve No wheels in nature?
Bulldogs – big head – one problem ??? Whales taste like beef have bones from back legs Wave tail vertically.

13 Artificial Selection – Selective Breeding
Instead of nature deciding which individuals in a species lives or dies, we (humans) can decide. Roses selected for beauty (appearance not smell) Cows selected for milk production Horses (race horses, carthorses) Sheep selected for wool production Dogs selected for ???.

14 Evolutionary Computation
How can we use the ideas of evolution to solve problems on a computer? Genetic Algorithms evolve a population of bit strings (bits can represent on/off choices or numbers) Genetic Programming evolves a population of programs used for e.g. controlling an agent in a game, a robot in a maze….

15 Example Problem The knapsack problem or rucksack problem is a problem in combinatorial optimization Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most useful items. maximize Subject to the constraint

16 Bit String Representation
Items 1, 2, …i,…,n Item i has weight wi and value vi What is the time complexity to try all combinations? We can use a binary representation e.g. (01…) mean do not include item1, do include item 2 0=do not include, 1= include. A genetic algorithm will sample a subset of solutions and hopefully find a good enough solution. There is no guarantee that the optimal solution will be found.

17 Fitness function 10110 has a value 4+0+1+10+0=15$
2 3 4 5 VALUE $ 10 WEIGHT KG 12 10110 has a value =15$ And has weight = 17kg But the bag has capacity 15kg – so this solution is not feasible/is invalid (give value -1) Fitness(10110) = -1 10100 has a value =5$ This is okay (<15kg) so we can give it a fitness of 5$ Fitness(10100)=5$

18 How to solve it? Enumeration – list all possibilities (how many are there?), and try each one. What is the problem with this approach? A second way is to randomly generate bit-strings and find the value of each one. What are the problems with this approach. Neither of these methods are very good.

19 Basic Outline/Algorithm
Repeat n times Select pair of bit-strings from population Perform crossover to produce 2 children. Mutate them Calculate their fitness (also called utility) and return them to population.

20 Selection Two examples Rank selection Fitness Proportional selection
1 2 3 4 Bit string 0011 1010 1110 0001 fitness 5 10 20 Two examples Rank selection Individuals are selected in proportion to their rank in the sorted population Fitness Proportional selection Individuals are selected in proportion to their fitness in the sorted population. If we monotonically scale the fitness, there is not difference to rank, but there is a change to fitness.

21 Crossover Two crossover One point crossover 1111 and 0000 gives ???
Two point crossover

22 Mutation Two examples One point mutation Uniform mutation
only flip one bit e.g > 1010 What else is possible ??? Uniform mutation Flip all bits with e.g probability e.g > 1110.

23 Fitness We could give a bit string the fitness of the direct value it has E.g. value = 9 therefore fitness = 9 Or we could scale it (most books do not mention this) Ax+B where x is the fitness Or any monotonic function Or possibly a non-monotonic function.

24 No Right or Wrong way There is not right way to do this.
For selection/ crossover/ mutation / fitness I have told you a choice of two for each – that is 8 possible ways. You can try to find your own ways. This is a very large area of research. Goldberg: 8th most referenced book in computer science last century. Russell and Norvig is 2nd most referenced computer science book this century. Youku.com

25 Evolutionary Video A video about walking robots (animation)
(time = 50:00)


Download ppt "Evolutionary Computation"

Similar presentations


Ads by Google