rocketdodger
Philosopher
- Joined
- Jun 22, 2005
- Messages
- 6,946
OK I updated my simulation program and made it more realistic and quite a bit faster. The source code is at www.jedi-arts.com/code/jev.cpp and an example input file is at www.jedi-arts.com/code/data.txt .
The program is quite simple. It takes a population of p creatures, each with a genome of bases of size g, and exerts P pressures on it. Initially the genome is initialzed so that the targeted bases of each pressure are neutral -- the pressures do not infer any fitness change to the population at the start of generation 1.
Each generation, m mutations randomly occur in each genome. During selection, the targeted bases of the pressures are examined. If the base is the same as the pressures "match" field, f fitness is added to the creature. If the base is the same as the pressures "badMatch" field, f * badWeight fitness is subtracted from the creature. This is meant to implement the idea that a bad mutation would decrease fitness (I.E. likely kill the creature) more than a good mutation would increase fitness.
Selection is performed by summing up the fitness of the entire population, then allocating offspring according to the percentage of the total fitness each creature has. So if the total fitness is 100, and a creature has 20 fitness, 20% of the next generation is intialized with the genome of that creature.
You can play with most of the parameters, they are all documented in the source code. Under the following parameters
genome 16000
population 2048
mutation 8
fixation 0.8
fitness 1
badWeight 4
reps 4
numPressures x 5
The following data gets generated, for x = 1, 5, 10, 20, 40, and 80:
Overall rate under 1 pressures was 145.000000( 145.000000 on average per pressure ).
Overall rate under 5 pressures was 162.229996( 811.149979 on average per pressure ).
Overall rate under 10 pressures was 218.225006( 2182.250061 on average per pressure ).
Overall rate under 20 pressures was 204.338135( 4086.762695 on average per pressure ).
Overall rate under 40 pressures was 114.856873( 4594.274902 on average per pressure ).
Overall rate under 80 pressures was 56.574688( 4525.975037 on average per pressure ).
These statements mean "the overall rate under x pressures was R <fixations per generation> ( A <generations to fixation> on average per pressure ).
What does this mean? First, notice that the number of generations to fixation for a pressure monotonically increases as we add more pressures. For a single pressure it took 145 generations on average, but for 80 it took 4525 generations on average. Second, notice that the ovarall rate of fixation initially increases, then decreases. Eventually, at some point between 20 and 40 pressures, the rate of fixation passes that of a singly applied pressure.
Why? Because although each pressure takes much longer to fixate, they are all on their way to fixation at the same time -- in parallel. The factor each pressure adds to the total time to fixation is not as great as the bonus incurred by evolving against another pressure in parallel.
This demonstrates, among other things, that Kleinman is outright wrong. None of the data he has relied on goes over 4 or 5 pressures at once, so he has no way to refute this simulation (short of looking at the source code, which he won't do for reasons we all know).
Clearly, n + 1 selective pressures lead to a greater rate of fixation (evolution) than n pressures, for many values of n. Also, clearly, n pressures lead to fixation at a greater rate than a single pressure for many values of n.
Dr. Adequate is right. We are right. You are simply wrong, Kleinman. There is nothing else to say now. I did all the work of showing you, very clearly, that sorting/optimization problems are NOT always confounded by multiple sorting conditions. Particularly, when sorting happens in parallel, as it does in mutation and selection.
The program is quite simple. It takes a population of p creatures, each with a genome of bases of size g, and exerts P pressures on it. Initially the genome is initialzed so that the targeted bases of each pressure are neutral -- the pressures do not infer any fitness change to the population at the start of generation 1.
Each generation, m mutations randomly occur in each genome. During selection, the targeted bases of the pressures are examined. If the base is the same as the pressures "match" field, f fitness is added to the creature. If the base is the same as the pressures "badMatch" field, f * badWeight fitness is subtracted from the creature. This is meant to implement the idea that a bad mutation would decrease fitness (I.E. likely kill the creature) more than a good mutation would increase fitness.
Selection is performed by summing up the fitness of the entire population, then allocating offspring according to the percentage of the total fitness each creature has. So if the total fitness is 100, and a creature has 20 fitness, 20% of the next generation is intialized with the genome of that creature.
You can play with most of the parameters, they are all documented in the source code. Under the following parameters
genome 16000
population 2048
mutation 8
fixation 0.8
fitness 1
badWeight 4
reps 4
numPressures x 5
The following data gets generated, for x = 1, 5, 10, 20, 40, and 80:
Overall rate under 1 pressures was 145.000000( 145.000000 on average per pressure ).
Overall rate under 5 pressures was 162.229996( 811.149979 on average per pressure ).
Overall rate under 10 pressures was 218.225006( 2182.250061 on average per pressure ).
Overall rate under 20 pressures was 204.338135( 4086.762695 on average per pressure ).
Overall rate under 40 pressures was 114.856873( 4594.274902 on average per pressure ).
Overall rate under 80 pressures was 56.574688( 4525.975037 on average per pressure ).
These statements mean "the overall rate under x pressures was R <fixations per generation> ( A <generations to fixation> on average per pressure ).
What does this mean? First, notice that the number of generations to fixation for a pressure monotonically increases as we add more pressures. For a single pressure it took 145 generations on average, but for 80 it took 4525 generations on average. Second, notice that the ovarall rate of fixation initially increases, then decreases. Eventually, at some point between 20 and 40 pressures, the rate of fixation passes that of a singly applied pressure.
Why? Because although each pressure takes much longer to fixate, they are all on their way to fixation at the same time -- in parallel. The factor each pressure adds to the total time to fixation is not as great as the bonus incurred by evolving against another pressure in parallel.
This demonstrates, among other things, that Kleinman is outright wrong. None of the data he has relied on goes over 4 or 5 pressures at once, so he has no way to refute this simulation (short of looking at the source code, which he won't do for reasons we all know).
Clearly, n + 1 selective pressures lead to a greater rate of fixation (evolution) than n pressures, for many values of n. Also, clearly, n pressures lead to fixation at a greater rate than a single pressure for many values of n.
Dr. Adequate is right. We are right. You are simply wrong, Kleinman. There is nothing else to say now. I did all the work of showing you, very clearly, that sorting/optimization problems are NOT always confounded by multiple sorting conditions. Particularly, when sorting happens in parallel, as it does in mutation and selection.