Академический Документы
Профессиональный Документы
Культура Документы
18-Dec-14
Evolution
Note that this procedure does not guarantee that the next
generation will have more 1 bits, but its likely
5
That is, you want a formula y = ax5 + bx4 + cx3 + dx2 +ex + f that gives
you a reasonably good fit to the actual data
Heres the usual way to compute goodness of fit:
Compute the sum of (actual y predicted y)2 for all the data points
The lowest sum represents the best fit
For every actual data point (x, y), (Im using red to mean actual data)
Example: For [0, 0, 0, 2, 3, 5] and the data points (1, 12) and (2, 22):
In sexual reproduction,
10
Because up to half of the bits change each time, not just one bit
By pure bad luck, maybe none of the first (randomly generated) words
have (say) bit 17 set to 1
Then there is no way a 1 could ever occur in this position
Another problem is lack of genetic diversity
Maybe some of the first generation did have bit 17 set to 1, but
none of them were selected for the second generation
You could choose the first half of one and the second half of
the other: [a, b, c, d, e, f]
You could choose genes randomly: [a, b, c, d, e, f]
You could compute gene averages:
[(a+a)/2, (b+b)/2, (c+c)/2, (d+d)/2, (e+e)/2,(f+f)/2]
I suspect this last may be the best, though I dont know of a good
biological analogy for it
13
Directed evolution
We did not try to choose the best genes from each parent
This is how natural (biological) evolution works
Probabilistic matching
15
Genetic programming
We can do this!
Programs as trees
Concluding remarks
19
The End
20