The Evolution of code
Genetic algorithm refers to an algorithm implemented in a specific way to solve specific sorts of problems.
The first example is to use it if you want to right a word. This means that for each letter youāll have a predetermined amount of keys. Every time you want to add a letter you will multiply the amount of letters and the probability to get the correct letter.
Darwinian Natural Selection
Heredity: Process in place by which children receive the properties of their parents.
Variation: Variety of traits present in the population or a means with which to introduce variation.
Selection: Mechanism by which people have the opportunity to be parents and pass down their genetic information and some do not.
The actual Genotype is the digital information. Phenotype is the expression of that data.
Fitness the number of correct characters a word has that will help create the word.
SETUP:
Step 1: Initialize. Create a population of N elements, each with randomly generated DNA.
LOOP:
Step 2: Selection. Evaluate the fitness of each element of the population and build a mating pool.
Step 3: Reproduction. Repeat N times:
Ā Ā Ā Ā Ā a) Pick two parents with probability according to relative fitness. Ā Ā Ā Ā Ā Ā b) Crossoverācreate a āchildā by combining the DNA of these two parents. Ā Ā Ā Ā Ā Ā c) Mutationāmutate the childās DNA based on a given probability. Ā Ā Ā Ā Ā Ā d) Add the new child to a new population.
Step 4. Replace the old population with the new population and return to Step 2













