## 445 thoughts on “Evolution Visualized”

1. I don’t see it happening in the world. So I have to assume mendel’s Account doesn’t model the real world.

So it was the assassin who killed JFK and the bullet definitely had nothing to do with it? How can you say it never happens when we don’t have a way to separate death by genetic load from other causes of extinction?

2. JoeCoder:
Patrick, I addressed all of this in the discussion I had with Zachriel a year ago.See my comment above directly before yours.

Based on all the material I’ve read, I remain unconvinced that Mendel’s Accountant models anything other than Sanford’s religious beliefs. I’ve looked through the code and it is . . . dense, to put it more politely than it deserves.

Can you point me to a detailed description of the algorithm that it implements?

3. See here.

Thanks. I remember seeing that one of the last times Mendel’s Accountant was discussed. Unfortunately, it doesn’t provide enough details to allow an alternative implementation to be created and it doesn’t explain some of the implementation issues noted in the AtBC thread. Is there anything with a bit more detail? Perhaps pseudocode or use cases?

4. JoeCoder,

We ended with Zachriel telling me:

Looks like an interesting and valid test. Will take a look at it later, and let you know if it changes our position.

I haven’t heard anything further from him.

He visits here occasionally, so perhaps he will see this thread and comment.

Meanwhile, I looked at your javascript test and noticed that your description of it is wrong:

Barney Fife (fitness = 1.0) and Genghis Khan (fitness = 1.1) are sorted by Mendel’s probability selection algorithm 1 million times–dividing by a random number between one and infinity.

Your javascript test divides the fitness by (Math.random() + 0.000000000000001), and the range of Math.random() is [0,1), not [1,∞) .

While your description of the test is wrong, the test itself matches what MA does in the code.

My question: Why does MA divide by random numbers from 0 to 1 rather than multiplying?

5. keiths, You’re right that I should’ve said multiplying, not dividing. Good catch.

Why does MA divide by random numbers from 0 to 1 rather than multiplying?

Multiplying by Math.random() would give a uniform distribution between 0 and 1. Dividing by Math.random() gives a distribution such that there are more numbers closer to 1 than to infinity. This dampens the randomness so that it is less random.

As for why it needs that particular distribution, I don’t know. I’m also no longer sure about the comment I made a year ago that selection in Mendel is “TWICE as efficient as it should be.” It’s possible I could be off by two somewhere due to haploid/diploid differences or something.

6. Patrick, I just took a look at the version 2.0 source and it looks like it’s missing the csource folder that has all of the c source code for mendel itself (not the web interface). If you want to download the version 1.5 source code, you can look in the cgi-bin\cmendel\ folder and get a clearer picture of what’s going on. For example, in selection.c there are comment blocks describing what’s happening in each step of the selection algorithm, and how it applies each option from the ui.

Maybe if I can ever find time I’ll volunteer to help them get their repo cleaned up and moved to something more modern.

7. JoeCoder:

Multiplying by Math.random() would give a uniform distribution between 0 and 1.

No, Math.random() itself gives a uniform distribution over [0,1), but the product will not be uniformly distributed unless the pre-multiplication fitnesses are.

Dividing by Math.random() gives a distribution such that there are more numbers closer to 1 than to infinity.

Dividing by Math.random() is equivalent to multiplying by an extremely non-uniform distribution over the interval [0,∞). This is just weird, though I’ll have to look at how the resulting fitnesses are used by the program. If ordering is the only thing that matters, then whether you multiply by a uniformly distributed variable or divide by it may not make a difference. But in that case, you have to wonder why they chose division when multiplication makes more intuitive sense.

8. No, Math.random() itself gives a uniform distribution over [0,1)

Right, that’s what I meant.

Dividing by Math.random() is equivalent to multiplying by an extremely non-uniform distribution over the interval [0,∞).

Right. Dividing by Math.random() leaves the sequence more ordered than if you multiply by it.

9. JoeCoder,

Dividing by Math.random() leaves the sequence more ordered than if you multiply by it.

No, it shouldn’t make any difference. That’s why I said:

If ordering is the only thing that matters, then whether you multiply by a uniformly distributed variable or divide by it may not make a difference.

ETA: You can verify this by changing the divisions to multiplications in your javascript test, the result of which is sensitive only to ordering.

10. I thought surely it would make a difference, but in my JSFiddle I just now tried swapping the division on lines 5-6 for multiplication. Sure enough, the results are still the same. So you’re right!

11. you have to wonder why they chose division when multiplication makes more intuitive sense.

I don’t know why they divide rather than multiply, since they give the same result. Maybe it’s an artifact of whatever formula they copied from a population genetics textbook.

12. JoeCoder,

I don’t know why they divide rather than multiply, since they give the same result.

They give the same ordering, but whether they give the same result overall depends on whether ordering is the only thing that matters to the program. I haven’t looked at the code to see how those adjusted fitnesses are used downstream, so I can’t comment yet.

13. Joe Felsenstein: It is worth noting that Remine’s “cost” is a consequence of substitutions, not something that slows down fixation. It is a very different thing from the Haldane cost.

14. keiths: I find it very odd that they stopped publishing the source code for the newer versions.

I find it odd that Zachriel claims they haven’t changed their code if he doesn’t have the newer versions. Oh well.

15. Joe Felsenstein: e. For the cost of natural selection, it would be more instructive to do a run with no deleterious or neutral mutants, and only one positive value of the selection coefficient. Then we could explore whether there was any sign of a “cost of natural selection” for beneficial mutations. (There won’t be, I predict).

The carriers of the beneficial mutation have to produce more offspring than the alternative else there’s no reason to think were talking about selection at all. That means there will be a cost, if you’re actually exploring the right thing.

16. Mung: The carriers of the beneficial mutation have to produce more offspring than the alternative else there’s no reason to think were talking about selection at all. That means there will be a cost, if you’re actually exploring the right thing.

Disagree. Sure the ccarriers of the beneficial mutation have to (on average) produce more surviving offspring. But I do not see why it is reasonable to call that a “cost”. If more beneficial mutations occur, how is that worse for the population? Does it make it less likely to survive? (No). Does having that difference make the allele less likely to fix? (No).

17. JoeCoder: Maybe it’s an artifact of whatever formula they copied from a population genetics textbook.

keiths: They give the same ordering, but whether they give the same result overall depends on whether ordering is the only thing that matters to the program.

No standard population genetics model of the Wright-Fisher sort has “fitnesses” whose effect depends only on their order. The reason I hesitate to use Mendel’s Accountant as a standard test of anything is that it seems to have a number of arbitrary properties that make it differ a lot from the standard models.

18. Mung,

I find it odd that Zachriel claims they haven’t changed their code if he doesn’t have the newer versions.

I find it amusing that someone who harps on testing can’t conceive of another method, besides looking at the source code, by which someone might detect whether a program has been changed.

19. Joe,

No standard population genetics model of the Wright-Fisher sort has “fitnesses” whose effect depends only on their order.

True, but the question here is about the usage of a specific variable in Mendel’s Accountant, not about how fitness in general is handled.

I plan to look at the (version 1.5) code tonight or tomorrow.

20. keiths:
Man, that’s some seriously ugly code.I’m not sure I have the stomach for this.

It is hideous. I suppose that’s one way of discouraging investigation of their claims.

21. The most interesting criticism I’ve seen is that by capping the population size, you get a drunkard’s walk effect. The population cannot rise above 1000, so the net effect of random perturbations will be downward over time. As the population decreases, the effects of detrimental mutations is greater. a positive feedback effect.

Perhaps this is among the reasons the program doesn’t model reality.

22. No standard population genetics model of the Wright-Fisher sort has “fitnesses” whose effect depends only on their order.

Dr. Felsenstein, you misunderstand us. When truncation selection is used (line 490 of selection.c) the population is sorted by their fitness and then the least fit are truncated away. This is why they are ordered by their fitness. When probability selection is used, the fitness is first divided by a random number before sorting (line 485), to account for the random nature of selection. Partial truncation (line 516) interpolates between these two based on the “partial truncation parameter” that’s set under the “Selection” tab in the UI. I uploaded selection.c here, so you can take a look.

KeithS and I were discussing the probability selection, and how much dividing by the random number affects how they are ordered before truncation.

In my simple Javascript version of Mendel’s probability selection algorithm, I give Barney fife a fitness of 1.0 and Genghis Khan a fitness of 1.1. Then I apply Mendel’s algorithm 1 million times to see how often each survives truncation. Genghis Khan survives about 545k times and Barney Fife survives 455k times. Dividing those numbers gives 1.2, meaning Khan 20% more likely to survive truncation than Barney Fife.

I am wondering if this is actually too favorable, since I would think a fitness of 1.1. would mean Genghis Khan should only be 10% more likely to survive. But maybe I’m not accounting for something.

23. Question to all: Can a positive mutation drive the population size above the cap? Isn’t this the kind of thing that happens in real populations? And if it does, won’t selection eventually eliminate some detrimental alleles?

24. petrushka wrote:

so the net effect of random perturbations will be downward over time

Not so, because it’s also capped at a minimum of 1000. This many always survive every generation. Using typical parameters this goes on for several thousand generations until the whole population gets to a point where every offspring has fitness at or below the extinction cutoff (also defined in the parameters).

Although on the population tab you can set it to use dynamic (non-capped) population as well.

25. That may help you understand how gene frequency changes in populations, but it doesn’t seem to have any connection to the way biological populations behave.

Can you cite an example of an actual population going extinct in a few thousand generations, from genetic meltdown?

26. Patrick wrote:

It is hideous. I suppose that’s one way of discouraging investigation of their claims.

The code looks ugly to us because it uses ancient programming languages (c/cgi) and coding practices. Heck, they still use CVS for version control! The authors of Mendel must’ve learned programming two or three decades ago and never updated their skills since then. But being outdated is not indicative of deliberate obfuscation. Selection.c has 369 code lines and 164 comment lines. If you’re deliberately trying to write confusing code you don’t write so many comments.

27. Can you cite an example of an actual population going extinct in a few thousand generations, from genetic meltdown?

The species most subject to deleterious accumulation have generation times around 10 to 30 years. Multiply that by a few thousand generations gives 30 to 90 thousand years. So we don’t have a way to observe this in any experiments that are relevant to humans.

But in Mendel the fitness value of extinction is an arbitrary number that you can set to whatever you want, so this time estimate has no meaning. Mendel also doesn’t take genetic redundancy into account, which buffers the decline.

Sanford and Carter argue that H1N1 continually enters humans and then goes extinct due to meltdown after several decades. I find their data on H1N1 compelling, but viral population genetics is very far removed from our own. Too far to draw useful parallels IMO. How H1N1 avoids meltdown in its host species (water fowl) is also an interesting question. It would be interesting to look for flu viral genes in the duck genome.

28. JoeCoder: The species most subject to deleterious accumulation have generation times around 10 to 30 years. Multiply that by a few thousand generations gives 30 to 90 thousand years. So we don’t have a way to observe this in any experiments that are relevant to humans.

Are you saying there are no living lineages older than 90 thousand years?

29. JoeCoder: Sanford and Carter argue that H1N1 continually enters humans and then goes extinct due to meltdown after several decades.

Enters from where?

30. JoeCoder:
Patrick wrote:

It is hideous. I suppose that’s one way of discouraging investigation of their claims.

The code looks ugly to us because it uses ancient programming languages (c/cgi) and coding practices.Heck, they still use CVS for version control!The authors of Mendel must’ve learned programming two or three decades ago and never updated their skills since then.But being outdated is not indicative of deliberate obfuscation.Selection.c has 369 code lines and 164 comment lines.If you’re deliberately trying to write confusing code you don’t write so many comments.

My tongue may have been slightly in my cheek when I wrote that. 😉

31. Are you saying there are no living lineages older than 90 thousand years?

No, because Mendel doesn’t take redundancy into account beyond having a diploid genome, and the fitness value you set for extinction is completely arbitrary.

But you want a number, so let’s try to work this out in more detail. Suppose the average “functional unit” (protein-coding or RNA gene) is 1000 nucleotides long, and an average of only 20 random mutations within such a sequence is required to make it non-functional. Our 6 billion base pair diploid genome would have 6 million functional units.

Let’s suppose God created us with a perfect genome, that 40% of those nucleotides are subject to deleterious mutation, and the remaining 60% meet looser definitions of function. That means every generation we will lose two haploid functional units. At that rate it would take 1.5 million generations (~30 million years) to destroy half of our whole genome. If you suppose we need 75% of our genome to not go extinct, that’s ~15 million years. Adjusting these assumptions can lead to a wide range of possible timespans. CMI’s assumptions put a max at 1.5m years.

So what does that mean theologically? Some take this and argue for young earth creation, as Sanford does. Or you could say God interferes to drive and correct evolution, as theistic evolutionists do. Or maybe God continually replants the orchard, as the old earth creationists assume.

32. petrushka asks “enters from where?”

Sanford and Carter write: “The origin of human H1N1 influenza is unknown, but it is generally reasoned that it invaded the human population from a natural reservoir, most likely an aquatic waterfowl, with pigs as a possible intermediate host. In light of the strong tendency toward natural genetic attenuation which we document here, we suggest that the natural reservoir most likely involves a very quiescent viral state, as might occur within a host where there is very little viral replication, and hence much lower mutation rates.”

33. JoeCoder: So what does that mean theologically? Some take this and argue for young earth creation, as Sanford does. Or you could say God interferes to drive and correct evolution, as theistic evolutionists do. Or maybe God continually replants the orchard, as the old earth creationists assume.

I would think if you were going to use a computer model to argue something as brain dead as YEC or continuous correction, you would at least make the model work on populations where we can observe tens of thousands of generations.

As it stands, the model is completely worthless, and the whole enterprise either incredibly stupid, or dishonest.

34. Petrushka, Mendel will simulate the population for long enough to show linear decline. That’s enough to show that evolution doesn’t work. Knowing when extinction happens is too assumption-laden to simulate with any certainty.

35. JoeCoder: Petrushka, Mendel will simulate the population for long enough to show linear decline. That’s enough to show that evolution doesn’t work.

It might show something if it worked, but it obviously doesn’t. It completely fails to model actual biological populations. So why not fix the model until it works?

36. I mean, if I had a model of planetary orbits that predicted the moon would spiral down until it crashed into the earth, and the data contradicted the projections of the model, I’d either abandon the model or fix it.

37. JoeCoder:
Petrushka, Mendel will simulate the population for long enough to show linear decline.That’s enough to show that evolution doesn’t work.
. . . .

So when your model conflicts with reality you choose to throw out reality?

38. Let’s be clear about this. what you have is a simple geometric progression, gussied up in the cloak of population genetics. But what you have could be replaced by a simple equation.

The problem is, where we can observe actual populations, they do not confirm the prediction.

39. Mendel’s Accountant is wrong because it disproves evolution. But we KNOW evolution is true, so Mendel’s Accountant has to be wrong! I’m so glad that’s finally settled 😛

40. Petrushka writes:

The problem is, where we can observe actual populations, they do not confirm the prediction.

And we can observe actual populations of apes, and they stay apes! Evolution disproved!

Or will you tell me that we just haven’t observed them for long enough? That is my same answer to your challenge 😛

41. Is there anything about the behavior of Mendel’s Accountant that couldn’t be replaced by a quadratic equation?

I’m guessing that if you exposed the underlying equivalent equation, it would look so sciency, and it would be obvious it doesn’t model actual biological populations.

It’s stage magic. Misdirect attention to all the whirring wheels and cogs, and avoid having anyone look at the silliness of the underlying premise.

42. Petrushka: Now that I’m done being snarky I will give you a more detailed answer: With all of the extinctions we have observed, we do not know how much deleterious load contributed to those extinctions. I would expect it contributed to almost all of them.

43. JoeCoder: But we KNOW evolution is true,

Sort of. We have many independent, consilient lines of evidence supporting evolution, including the long term Lenski experiment.

Again, if MA predicted the behavior of populations where we can observe tens of thousands of generations it might be worth looking at.

44. Petrushka: No, Mendel could not be replaced by a quadratic equation. Now you are making baseless accusations. Answer these questions for me. Prior to reading this comment:

1. How many papers have you read that published results from Mendel’s Accountant.
2. How many simulations have you run yourself, using Mendel’s Accountant.
3. Is there a specific place in the source code that you think is calculating something incorrectly?

45. JoeCoder: I would expect it contributed to almost all of them.

We’re getting pretty good at looking at extinction events. There are so many to choose from. An embarrassment of riches.

Name one that hasn’t resulted from excessive predation, introduction of competitors, or destruction of habitat. Name one that has occurred in a stable environment.

46. JoeCoder:
Petrushka: No, Mendel could not be replaced by a quadratic equation. Now you are making baseless accusations.Answer these questions for me.Prior to reading this comment:
1.How many papers have you read that published results from Mendel’s Accountant.
2.How many simulations have you run yourself, using Mendel’s Accountant.
3.Is there a specific place in the source code that you think is calculating something incorrectly?

1. none
2. none
3. It’s not the arithmetic being done correctly or not. It’s whether its projections are confirmed by actual populations.

47. Name one that hasn’t resulted from excessive predation, introduction of competitors, or destruction of habitat. Name one that has occurred in a stable environment.

As a population’s deleterious load increases, it becomes mores likely that predation, competitors, or destruction of habitat will kill it off. And the population is much more likely to be killed by those than waiting thousands + more generations until they can’t even reproduce or digest food.

I think reality offers us no examples that contradict the Mendel results.

We have many independent, consilient lines of evidence supporting evolution

I’ve read through much of talk origins and similar sites. My experience is that the more I learn about a given argument the less support for evolution I find. You provided a good example with Richard Lenski’s experiment:

including the long term Lenski experiment

If it takes nearly a trillion reproducing bacteria just to duplicate one of their existing genes a few times (while trashing a half dozen other genes), then evolution is in serious trouble. For scale, it’s estimated that fewer than a trillion human ancestors would have existed since a chimp divergence.

This site uses Akismet to reduce spam. Learn how your comment data is processed.