A selection-vs-drift version of Weasel

In his endless pursuit of that wascally Weasel, Mung made the following silly claim:

GAs are often used to demonstrate “the power of cumulative selection.” Given small population sizes drift ought to dominate yet in GAs drift does not dominate.

That is clearly false, but for the benefit of Mung (and his cousin Elmer) I have modified my Weasel program to incorporate both drift and selection.  They can now see for themselves that small population sizes are insufficient to guarantee that drift dominates selection.

The code is here. Compile it under Linux using “gcc -std=gnu99 -lm weasel.c -o weasel”.

Run the program and type ‘h’ to see a list of interactive commands:

c – clear the histogram data
f – change the selection coefficient
h – print this help message
m – change the mutation rate
p – pause until a key is pressed
q – quit the program
s – toggle selection on/off
t – change the target phrase

The program generates and updates a scaled histogram showing the number of generations spent at each possible Hamming distance from the target.

222 thoughts on “A selection-vs-drift version of Weasel

  1. Mung,

    Allan Miller: Why are all you coders so coding-shy?

    Mung: Ahah! So you do know what a rhetorical question is!

    I do?

    I know a diversion when I see it, though.

  2. The efficacy of selection depends on the effective population size, an historical construct that is different from the census population size, which is a snapshot of the present.

    – Dan Graur

    Next we’ll be hearing that keiths never stated otherwise.

  3. petrushka: Mung, what is the effective population size in keiths’ program?

    Which program? In the one that my original OP was addressing, the effective population size was 1. In his original drift-weasel it was still 1.

    // number of survivors per generation (must be less than POPULATION_SIZE)
    #define NUM_SURVIVORS 1

  4. Relax, Mung. You already lost this one.

    Your statements are false:

    Given small population sizes drift ought to dominate yet in GAs drift does not dominate.

    And:

    Given an effective population size of one, drift ought to dominate, but it doesn’t.

    Your own source contradicts you:

    It is important to note that the effectiveness of selection on a mutation depends both on the fitness effect of this mutation (the selection coefficient s) and on the effective population size (Ne). Specifically, when the product Ne * s is much less than 1, the fate of mutations is essentially determined by random genetic drift.

    They got it right, Mung. You didn’t.

    If you had put half as much effort into learning as you have into saving face, you’d understand this by now.

  5. From the OP:

    They can now see for themselves that small population sizes are insufficient to guarantee that drift dominates selection.

    Nice straw-man.

  6. keiths: It’s exactly what you claimed.

    I never claimed that small population sizes are sufficient to guarantee that drift dominates selection. If you recall, I pointed to the fact that in your Weasel program drift does not overcome the effects of selection even with an effective population size of one.

    So your claims are false, your argument is based on a straw-man, and you still haven’t made your case that drift ought not overcome the effects of selection in small populations.

  7. Well, mung, the program is configurable. You can increase the genome length and number of survivors.

    I’ve tried it, and haven’t notice drift overcoming selection.

  8. Mung,

    I never claimed that small population sizes are sufficient to guarantee that drift dominates selection.

    Sure you did:

    Given small population sizes drift ought to dominate yet in GAs drift does not dominate.

    And:

    Given an effective population size of one, drift ought to dominate, but it doesn’t.

    Relax, Mung. You lost this one, and no one is surprised.

    All this time the Weasel has been chasing you.

  9. keiths:
    Mung,

    I never claimed that small population sizes are sufficient to guarantee that drift dominates selection.

    Sure you did:

    Given small population sizes drift ought to dominate yet in GAs drift does not dominate.

    And:

    Given an effective population size of one, drift ought to dominate, but it doesn’t.

    Have you forgotten who you’re conversing with, keiths? Saying that Result X ought to occur is not at all the same thing as saying that Result X is guaranteed to occur. See also: exquisitely careful choice of words, and hyperfine parsing.

  10. I try not to indulge him when he does that.

    Either way he’s screwed. It’s not true that drift “ought” to dominate selection, and we all know that. Even Mung’s own source confirms that he’s wrong.

  11. cubist: Saying that Result X ought to occur is not at all the same thing as saying that Result X is guaranteed to occur.

    You are correct.

    But keiths can’t have that. Another narrative is required. Else his claims are false. I think we’ll refer to that as swallowing the weasel.

    It is important to note that the effectiveness of selection on a mutation depends both on the fitness effect of this mutation (the selection coefficient s) and on the effective population size (Ne). Specifically, when the product Nes is much less than 1, the fate of mutations is essentially determined by random genetic drift. In other words, in small populations, the stochastic effects of random genetic drift overcome the effects of selection. Thus, all mutations for which Nes is much less than 1 can be considered effectively neutral. This implies that the proportion of neutral mutations is expected to inversely vary with a taxon’s effective population size.

    Empirical data are consistent with this prediction.

    No one would take keiths seriously if he was claiming that these authors are wrong and that they were claiming that small population sizes are sufficient to guarantee that drift dominates selection.

    keiths is just being tendentious. Swallowing the weasel.

  12. Mung,

    No one would take keiths seriously if he was claiming that these authors are wrong and that they were claiming that small population sizes are sufficient to guarantee that drift dominates selection.

    Yes, because it’s clear that they got it right. Unlike you, they understood that a small effective population size does not mean that “drift ought to dominate”.

    You had another bad thread day, Mung. No one is surprised. What’s the big deal? Admit your mistake and move on.

  13. In other words, in small populations, the stochastic effects of random genetic drift overcome the effects of selection.

    These authors clearly say that small population sizes are sufficient to guarantee that drift dominates selection. Swallow that weasel.

  14. Mung,

    These authors clearly say that small population sizes are sufficient to guarantee that drift dominates selection.

    They clearly say the opposite:

    It is important to note that the effectiveness of selection on a mutation depends both on the fitness effect of this mutation (the selection coefficient s) and on the effective population size (Ne). Specifically, when the product Ne * s is much less than 1, the fate of mutations is essentially determined by random genetic drift.

    Mung:

    Swallow that weasel.

    Upchuck that weasel.

    Mung, your inability to admit your mistakes is downright comical.

  15. keiths: Specifically, when the product Ne * s is much less than 1, the fate of mutations is essentially determined by random genetic drift.
    Mung:

    The default Ne*s in keiths’ program is 5.

    But if you must have drift predominate, you can change the parameters.

  16. Choke on it keiths. Your method of argumentation is ludicrous, which is why you reserve it for cases where you think you can get away with it.

Leave a Reply