introduction to the genetic algorithm

36
Introduction to the Genetic Algorithm Qiang Hao Learning, Design and Technology & Computer Science University of Georgia

Upload: neo-hao

Post on 09-Jan-2017

508 views

Category:

Education


2 download

TRANSCRIPT

Introduction to the Genetic Algorithm

Qiang HaoLearning, Design and Technology & Computer Science

University of Georgia

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Purpose: To generate useful solutions to optimization and search problems.

● Reasons: Searching space is gigantically huge.

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:a. Have an initial populationb. Selectionc. Crossover and mutation

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:a. Have an initial populationb. Selectionc. Crossover and mutation

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:a. Have an initial populationb. Selectionc. Crossover and mutation

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:a. Have an initial populationb. Selectionc. Crossover and mutation

Original: A, T, C, G, UAfterwards:

A, A, C, G, U

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:a. Have an initial populationb. Selectionc. Crossover and mutation Loop

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● Natural Selection:a. Have an initial populationb. Selectionc. Crossover and mutation

Loop

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● GA:a. Have an initial populationb. Selectionc. Crossover and mutation

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● GA:a. Have an initial populationb. Selectionc. Crossover and mutationd. Termination

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● GA:a. Have an initial populationb. Selectionc. Crossover and mutationd. Termination

1. A genetic representation of the solution domain

2. A fitness function to evaluate the solution domain

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● GA:1. A genetic representation of the solution domain2. A fitness function to evaluate the solution domain3. Have an initial population4. Selection5. Crossover and mutation6. Termination

Loop

DefinitionThe genetic algorithm (GA) is a search heuristic that mimics the process of natural selection.

● GA:a. Have an initial populationb. Selectionc. Crossover and mutationd. Termination

ExampleMultiple fault diagnosis

http://bit.ly/1SVHsNJ

Potter, W. D., Miller, J. A., Tonn, B. E., Gandham, R. V., & Lapena, C. N. (1992). Improving the reliability of heuristic multiple fault diagnosis via the EC-based genetic algorithm. Applied Intelligence, 2(1), 5-23.

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

1. We limit the total diagnosable manifestations to 10.2. These 10 manifestations are associated with 15 diseases.

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

● Step 1 - Bit representation: ○ {1, 0, 1, 0, 1, 1, 1, 1, 0, 1} -- manifestation○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0} -- disease combination

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

● Step 2 - Fitness Function: ○ {1, 0, 1, 0, 1, 1, 1, 1, 0, 1} -- manifestation○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0} -- disease combination○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0} -- disease combination○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0} -- disease combination

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

● Step 2 - Fitness Function:

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

● Step 3 - Have an initial population

600 random disease combinations

○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0} -- disease combination○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0} -- disease combination○ {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0} -- disease combination

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

Step 4 - Selection

● Tournament Selection ● Roulette wheel selection

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

Step 4 - Selection

● Tournament Selection a. choose k individuals from the population at randomb. choose the best individual from pool

Population size: 600; tournament size: 6; repetition times: 600

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

Step 4 - Selection

● Roulette wheel selection

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

Step 4 - Selection

● Roulette wheel selection

ExampleStep 4 - Selection

● Roulette wheel selection

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

Step 5 - Crossover

● One-point xover:● Two-point xover:

ExampleMultiple fault diagnosis

Given a set of manifestations, can you automatically determine what diseases cause this set of manifestations with acceptable accuracy?

3. Have an initial population4. Selection 5. Crossover and mutation6. Termination

Loop

Example 2Forest Planning Optimization

http://bit.ly/1OmAxxn

Potter, W. D., Drucker, E., Bettinger, P., Maier, F., Martin, M., Luper, D., ... & Hayes, C. (2009). Diagnosis, configuration, planning, and pathfinding: Experiments in nature-inspired optimization. In Natural Intelligence for Scheduling, Planning and Packing Problems (pp. 267-294). Springer Berlin Heidelberg.

Example 2Forest Planning Optimization

Given a forest composed of 73 adjacent fields, what cutting schedule would make the seasonal wood production closest to a fixed certain number?

1. Three cutting seasons per year2. Two adjacent fields can not both be cutted in one season

Example 2Forest Planning Optimization

Given a forest composed of 73 adjacent fields, what cutting schedule would make the seasonal wood production closest to a fixed certain number?

● GA:a. Have an initial populationb. Selectionc. Crossover and mutationd. Termination

1. A genetic representation of the solution domain

2. A fitness function to evaluate the solution domain

Example 2Forest Planning Optimization

Given a forest composed of 73 adjacent fields, what cutting schedule would make the seasonal wood production closest to a fixed certain number?

● A genetic representation of the solution domain:[0, 2, 1, 3, 1 …...1, 0, 0, 1, 3, 2]

Example 2Forest Planning Optimization

Given a forest composed of 73 adjacent fields, what cutting schedule would make the seasonal wood production closest to a fixed certain number?

● A genetic representation of the solution domain:[0, 2, 1, 3, 1 …...1, 0, 0, 1, 3, 2]

● Fitness Function:(Output of season 1 - target)2 + (Output of season 2 - target)2 + (Output of season 3 - target)2

Example 2Forest Planning Optimization

Given a forest composed of 73 adjacent fields, what cutting schedule would make the seasonal wood production closest to a fixed certain number?

● A genetic representation of the solution domain:[0, 2, 1, 3, 1 …...1, 0, 0, 1, 3, 2]

● Fitness Function:(Output of season 1 - target)2 + (Output of season 2 - target)2 + (Output of season 3 - target)2

Example 2Forest Planning Optimization

Given a forest composed of 73 adjacent fields, what cutting schedule would make the seasonal wood production closest to a fixed certain number?

● GA:a. Have an initial populationb. Selectionc. Crossover and mutationd. Termination

Thanks.