Presentation is loading. Please wait.

Presentation is loading. Please wait.

Genetic Algorithms and Evolutionary Programming A Brief Overview.

Similar presentations


Presentation on theme: "Genetic Algorithms and Evolutionary Programming A Brief Overview."— Presentation transcript:

1 Genetic Algorithms and Evolutionary Programming A Brief Overview

2 What is Evolution?

3 Evolutionary Process

4 Applying Evolution as a Programming Technique Evaluate Fitness Selection based on Fitness Reproduction through Crossover Mutation Encode Problem Determine Appropriate Fitness Function Pick Crossover and Mutation Techniques Initialize an Initial Population REPEAT UNTIL RESULTS ARE SATISFACTORY DURING DEVELOPMENT OF THE CODE

5 Genetic Algorithm Applications Great for coming up with a “suitable” solution to optimization problems that are too complicated for mathematical or conventional simulation methods.

6 My Experiment in Cryptanalysis: Decoding the Substitution Cipher

7 Encoding the Problem An “Individual” in a Population of Solutions has one “chromosome” which represents a potential cipher “key” (i.e. the 26-letter string That tells the plain text what letters get replaced by what). An example “chromosome”: XAFGLBCVEIJHOUZNDKSWYQTRMP The code below generates a random individual for the initial population.

8 Environmental Pressure: The Fitness Calculation Cipher text message decrypted using the Individual’s “chromosome” as a key. Process that decrypted message using Frequency Analysis: Add up the frequencies of each 3- letter combo found. Check to see if that cluster is a word. Update a bunch of “counter” variables. Add up the frequencies of each 2- letter combo found. For each would-be-word in message. Multiply the “counters” by weights and return the value.

9 Selection Process “Tournament Selection” 1. Pick a certain number of Individuals from the Population. 2. Find the one with the highest fitness. 3. Allow that Individual (tournament winner) to “breed”. “I’m a potential cipher key”

10 Crossover/Reproduction Parent 1’s Chromosome: XAFGLBCVEIJHOUZNDKSWYQTRMP Parent 2’s Chromosome: DCBJKLFGVPOZQHIERMWSXTNUAY Parent 1’s Chromosome: XAFGLBCVEIJHOUZNDKSWYQTRMP Parent 2’s Chromosome: DBJLFGVPZQIERWSXTNUY Child’s Chromosome: -A----C----HO----K------M- Parent 1’s Chromosome: XAFGLBCVEIJHOUZNDKSWYQTRMP Parent 2’s Chromosome: Child’s Chromosome: DABJLFCGVPZHOQIERKWSXTNUMY This process repeats for 2 nd Child, except this time we start with Parent 2 and fill from Parent 1.

11 Mutation SNP’s or INDELS won’t work in this example, because we need the entire alphabet represented in the chromosome. Therefore, we utilize “Swap Mutation”. Individual’s Chromosome: XAFGLBCVEIJHOUZNDKSWYQTRMP XAFGLDCVEIJHOUZNBKSWYQTRMP

12 Overall Algorithm

13 Parameters and Results


Download ppt "Genetic Algorithms and Evolutionary Programming A Brief Overview."

Similar presentations


Ads by Google