Weasles on Parade

Posted 19 March 2009 by

It is now 62 hours since William Dembski posted that the Evolutionary Informatics lab was going to try and reproduce Dawkins Weasel Program according to how it was actually written, as opposed to their fantasy version. In that time I've resurrected an elderly program, and several readers have made their own weasels from scratch. Commenter Anders has even made a Python version that puts "freely mutating" and "locking versions" head to head with great graphs. (Update: Wes Elsberry did a head to head comparison last year, see here for his comparison [scroll down], it differs from my implementation but the basic message is the same). I've gone back and done a head to head comparison myself between a program with no "locking" (all letters in any given string have a chance to be mutated) and one with "locking" (where the matching letters are preserved against mutation). Trying to implement "locking" al la Dembski proved too hard. You have to keep indices of the letter locations and keep updating them. It is such a pain in the bottom to try and do this that I cannot imagine Dawkins even wanting to try and program a "Locking" implementation in GBASIC. Remember, Dawkins weasel was a quick and dirty program bashed out in a short time. To implement "locking" I just kept a copy of the parent string unmutated (after all, in the real world not every offspring has mutations in genes of interest). So what happened?
weasel_dynamics.png
As you can see they were much the same (mean and standard error of an average of 4 independent runs per condition shown, click to embiggen). "Locked" runs finished earlier, on average but most of the trajectory of the run was determined by mutation supply. As you can see, runs done with locked and unlocked versions fell within the error bars of each other, for runs that set the Offspring number at either 100 or 30. This is easy to understand. Early on, virtually any mutation is of big benefit, while later on most mutations are of small benefit. Only in the final stages that there was any significant backing and forthing, and then only in the 30 Offspring case. In the 100 offspring case, the population was so large that the probability was high that even in the final stages a beneficial mutation would be acquired. Wesley Elsberry has done the mathematics explicitly (go to this link and scroll down). Only in the 30 offspring case was the last 10 or so generations in an "unlocked" run spent bouncing from 3-1 differences. So Dembski's claims that a list of every 10th output string shows that Dawkins is using a "locking" program are nonsense, Dawkins results are exactly what we would expect to see when sampling sparsely from a high population "freely mutating" weasel run.
weasel_convergance_time.png
Slightly more surprisingly, the median time to convergence (when the program finally reached the target string), was not actually statistically significantly different. I suspect when enough runs are accumulated (say around 20), they will be, but the "locked" runs are only about 20% faster. So, summary. Whether you "lock" your strings, or allow them to mutate at all positions freely, a weasel program will converge on a solution. The for most of the time, mutation supply dominates, and whether you lock your strings or not there is rapid accumulation of beneficial mutations. Only at the very end run does "locking" matter, and then only for small populations where the probability of a beneficial mutation is low. But even then, "unlocked", freely mutating programs will converge on a solution in less than a minute (and only 20% slower than the "locking" programs), when simple random sampling will take longer than the lifespan of the Universe to converge. Still, the point is that against all evidence, Dembski believes that Dawkins wrote a overly complicated program in GBASIC, and then reverted to a simple one for a TV show, and can't be bothered to get around to writing the code that would show him wrong (and show that freely mutating programs converge rapidly on the target string). Again, this shows that cdesign proponetists don't understand the "test your hypothesis" part of science. I'm currently reading Galileo's "Starry Messenger", and the debate over at Uncommon Descent reminds me of Francesco Sizzi, who declared that Galileo really couldn't have seen Moons around Jupiter, as metaphysics demands there only be 7 planets. Now If only they would put the same degree of effort that they put into critiquing the weasel program, a toy demonstration of selection the same importance as the measuring cylinder/running tap model of drug clearance, into doing some real science.
The freely mutating QBASIC program is here, the "locked" version is here (both write strings to a log file). Feel free to submit your own weasels, especially ones that compare freely mutating vs "locking" versions of the code, and the PT crew could do with a java applet version if you could do one. A weasel for every 6 hours the Uncommon Descent people do nothing would be great! See Wesley Elsberries superb Java Weasel as an example!

159 Comments

Giljorak · 19 March 2009

Does anyone have the original Apple Basic source code? I found many versions on the web but can't seem to find the original version.

I still have a functioning Apple ][ computer that I would love to put the source code on.

k,e,, · 19 March 2009

Weasels are weasley recognizable but stoats are stoatally different

DS · 19 March 2009

Now we know why Dawkins called it a weasel program. We're all waiting to see Dembski try to weasel out of this again.

Bethor · 19 March 2009

Thanks for the link to the Python version by Anders, I spent some time making pretty much the same thing yesterday out of curiosity (and as a way to teach myself Python :p).

One big caveat, however : if I understand Dawkins' original description correctly "[...] each position [in each offspring] has a chance of randomly mutating, based upon a set mutation rate." (from http://www.antievolution.org/features/ec/weasel102.html).

Anders' version, however, seems to randomly pick a single position in each offspring to be mutated. This seems to be a pretty different algorithm, unless I'm completely misunderstanding either the original idea or his code.

This doesn't really invalidate the conclusions regarding locking / non-locking versions but I thought this was worth pointing out (even though the resulting graphs tracking progression towards maximum fitness look much the same in my version with a possibility of mutation on each position of each offspring).

Rolf Aalberg · 19 March 2009

This may be entirely irrelevant but here’s what I did many years ago:

When playing a computer game, I think it was ‘Shivers’, one of the hurdles was a game consisting of a horizontal row of ‘holes’, with a number of balls that based on certain rules could be flipped back or forth between vacant holes.

After playing for a while I decided I was lost and wanted to restart - but I had not saved the start configuration of balls so I decided to let the computer solve it for me.

So I wrote a simulation program to toss the balls around according to the rules, and stop at the pre-determined target configuration.

I must have use a randomiser of some sort and the program found the solution for me.

When I examined a printout I found many long repeating and re-repeating sequences that I could eliminate until what was left was a straight sequence that I then entered in the game to move the balls from their present position to the desired end positions. Bingo.

If the program’s output could have been linked to the game it would of course have done the job all by itself, with a lot of redundant, insignificant steps in between.

I don’t remember whether I used assembler, Pascal, Qbasic or Foxbase.

Anders · 19 March 2009

Bethor said: Thanks for the link to the Python version by Anders, I spent some time making pretty much the same thing yesterday out of curiosity (and as a way to teach myself Python :p). One big caveat, however : if I understand Dawkins' original description correctly "[...] each position [in each offspring] has a chance of randomly mutating, based upon a set mutation rate." (from http://www.antievolution.org/features/ec/weasel102.html). Anders' version, however, seems to randomly pick a single position in each offspring to be mutated. This seems to be a pretty different algorithm, unless I'm completely misunderstanding either the original idea or his code. [...]
Yep - that's correct. My python version picks exactly one position in each offspring. I think I'll change it to the mutation rate version and update the graphs. Oh - and excellent choice with the python by the way!

Anders · 19 March 2009

Bethor said: [...] One big caveat, however : if I understand Dawkins' original description correctly "[...] each position [in each offspring] has a chance of randomly mutating, based upon a set mutation rate." (from http://www.antievolution.org/features/ec/weasel102.html). Anders' version, however, seems to randomly pick a single position in each offspring to be mutated. This seems to be a pretty different algorithm, unless I'm completely misunderstanding either the original idea or his code. This doesn't really invalidate the conclusions regarding locking / non-locking versions but I thought this was worth pointing out (even though the resulting graphs tracking progression towards maximum fitness look much the same in my version with a possibility of mutation on each position of each offspring).
OK, I've now modified my programs so they follow the original Dawkin's description more closely: in each generation each position in each offspring has some probability of mutating (so offspring can now have zero, one, or more mutations compared to their parent). I've also updated the plots and links to downloadable software. Incidentally, I might note that with this setup it is possible to set the mutation rate so low that some offspring in each generation will be the same as their parent. In this case fitness will never decrease (the worst case is to stick with the parental genotype thus maintaining fitness).

Mike Elzinga · 19 March 2009

It’s great that Ian has posted the discussion of Weasel. It is one of the best pedagogical tools for illustrating the effects of selection without requiring an extensive mathematical or physics background.

If I may summarize a few points I made in some of my previous comments on the other thread covering this, those interested in how this exercise can be integrated into a bigger picture might want to try a few tests with their programs.

One. The selection process represented here is only one of literally thousands of ways to cause a random process to converge to an equilibrium state. In this case, the fact that the string has “meaning” as a recognizable sentence is irrelevant. Any target string could be used.

Two. The solutions to equations (e.g., roots that set the equation equal to zero) are mathematical examples of looking for an “equilibrium” condition. Randomly throwing numbers at the equation is highly unlikely to produce a root. However, pulling candidate roots from domains that are restricted according to how close the equation approached zero when a candidate was selected from a prior set produces a sudden and dramatic convergence to “equilibrium” (locating the root).

Three Physical processes in which matter condenses into self-organized patterns already has a “built-in mechanism” for selecting candidates for the next round of trials; namely, the second law of thermodynamics.

Four There are some tests that one can do on any selection model to see if it has any characteristics of physical reality. These rely on some general characteristics of physical systems that are not necessarily characteristic of some artificial or mathematical algorithms. If the outcomes of these tests indicate some of the features of real, physical systems, then the algorithm can be place in a set of candidate algorithms for use in a more sophisticated model.

Five A caveat in this process is that some algorithms can mimic physical reality closely enough that they are difficult to distinguish from actual physical mechanisms in a stochastic set of tests.

Given these general notions, here is the general recipe for exploring whether or not an algorithm captures any physical reality.

A Something in the model has to be identified as what physicists refer to as a “generalized force” that drives the system toward equilibrium. It could be a “potential energy” or some kind of mechanism that “pushes” the system in the direction of equilibrium.

B The larger this “generalized force”, the more rapidly the system proceeds toward equilibrium. As the system approaches equilibrium, the generalized force diminishes until it becomes zero at equilibrium.

C In any stochastic process, there are fluctuations in the generalized force. These fluctuations generally increase with the magnitude of the generalized force.

C In realistic systems, one expects the ratio of the magnitude of the fluctuations in the generalized force to the magnitude of the generalized force itself to go like the reciprocal of the square-root of the number of contributors to the generalized force. (This assumes that the magnitude of the generalized force is linearly proportional to the number of “carriers” of unit quantities of this generalized force.)

D Therefore, in running the model, it is necessary to capture data on not only the magnitude of the generalized force at each point in the system’s evolution, but also data on how it fluctuates at each point. This means collecting a representative ensemble of the values of the generalized force at each point and calculating its mean and standard deviation.

E Plotting the magnitudes of the fluctuations against the magnitudes of the generalized force itself on a log-log plot will produce a straight line with a slope of negative one-half if the model is behaving anything like physical reality.

There are many other tests one can make that get into the fractal natures of physical systems, but this is a start for those beginning to play around with these kinds of models.

More generally, however, it is probably better to try to build a model from the ground up based on known or suspected physical mechanisms. However, the exercise with Dawkins’ Weasel program is a legitimate form of investigation because it approaches the problem from the perspective of cataloguing candidate models for later use.

Wesley R. Elsberry · 19 March 2009

The graph shown here plots the probability that a population will have at least one candidate that preserves all the correct characters from the parent string. The graph shows population sizes from 1 to 500, mutation probabilities from 0.0 to 1.0, and is done for the case where the number of correct characters in the parent is 27. Once the population is around fifty, increases in population size make very little difference.

If one runs a "weasel" with a reasonable population size and mutation rate, it is highly likely that there will be some candidate in the population that at least keeps the correct characters from the parent, and without the use of elitism (where an unmutated daughter copy is inserted into the next generation). The breakover point for the mutation rate is where it starts becoming likely that more than one character will be changed per candidate.

Bethor · 19 March 2009

Anders said: OK, I've now modified my programs so they follow the original Dawkin's description more closely: in each generation each position in each offspring has some probability of mutating (so offspring can now have zero, one, or more mutations compared to their parent).
Great ! Thank you :) I've been playing around with my version of this (it beats fixing bugs in my C++ code for work ;)) and I've come to an interesting (to me, at least) observation regarding the mutation rate. Predictably, increasing the mutation rate increases the "speed" of the algorithm (i.e. fitness increases faster), decreasing the mutation rate slows down the process. What surprised me however was how quickly a higher mutation rate becomes detrimental (at least on longer target phrases than the fairly simple "methinks it is like a weasel"). I haven't implemented tracking of beneficial and negative mutations like you have but I suspect they simply cancel each other out in this case. In retrospect I suppose this should have been obvious; it certainly is if you try and imagine the edge case of 100% mutation chance : this would essentially eliminate the effects of selection and return us to the "monkeys and typewriters" algorithm. Anyways, I know this is too contrived and simple an algorithm to draw any parallels to actual biology, but it sure is fun to play with !

Bethor · 19 March 2009

Wesley R. Elsberry said: The breakover point for the mutation rate is where it starts becoming likely that more than one character will be changed per candidate.
Looks like you answered my implicit question while I was trying to make my previous post readable... thanks ! :)

Bruce · 19 March 2009

Should that headline refer to "Weasles" or "Weasels"?
Or is that an intelligently-designed typo?

Anders · 19 March 2009

Wesley R. Elsberry said: The graph shown here plots the probability that a population will have at least one candidate that preserves all the correct characters from the parent string. The graph shows population sizes from 1 to 500, mutation probabilities from 0.0 to 1.0, and is done for the case where the number of correct characters in the parent is 27. Once the population is around fifty, increases in population size make very little difference. [...]
Excellent - I'd love to see this analysis. But I seem not to be able to view the plots on this page? (I tried with two different browsers on my mac). Am I lacking some plug-in?

Ian Musgrave · 19 March 2009

72 hours and still no weasels over at uncommon dissent.

stevaroni · 19 March 2009

72 hours and still no weasels over at uncommon dissent.

Bill's a busy man. Soooo much simple evidence to ignore, so little time...

Ian Musgrave · 19 March 2009

Anders said: Excellent - I'd love to see this analysis. But I seem not to be able to view the plots on this page? (I tried with two different browsers on my mac). Am I lacking some plug-in?
No, the graphs are blocks of black with white areas and fuzzy grey bits at the interface. They might need a border to make them clearer.

Philip Kahn · 19 March 2009

Heads-up: on the Python program, it works for 2.7, but on the final line, the print statement should be enclosed in parentheses if you're running Python 3.0.

Mike Elzinga · 19 March 2009

Ian Musgrave said: 72 hours and still no weasels over at uncommon dissent.

I’m currently reading Galileo’s “Starry Messenger”, and the debate over at Uncommon Descent reminds me of Francesco Sizzi, who declared that Galileo really couldn’t have seen Moons around Jupiter, as metaphysics demands there only be 7 planets.

I looked at the conversation over there. It’s like being in a hermetically sealed room in which all the air has been sucked out and you can’t find the door.

Wesley R. Elsberry · 19 March 2009

The graphs are in PNG format. I'm not positive what browsers know about PNG, but Firefox 3 on Mac OS X certainly does.

Kevin B · 19 March 2009

stevaroni said:

72 hours and still no weasels over at uncommon dissent.

Bill's a busy man. Soooo much simple evidence to ignore, so little time...
Perhaps he's using the Darwinian programming methodology. (This is the one where you start with a BASIC program of about the right number of lines, and just change statements at random until it produces the right output :)

Mike Elzinga · 19 March 2009

Wesley R. Elsberry said: The graphs are in PNG format. I'm not positive what browsers know about PNG, but Firefox 3 on Mac OS X certainly does.
I’m going over your calculations to see if I can work out what the fluctuations will be. I noticed a probability calculation that might be incorrect but doesn’t appear to play a part in your overall calculation. Shouldn’t Ptry is all correct = (1/K)L = K-L instead of L-K? Similarly for Pa try in population all correct which just multiplies the above by N.

Dean Wentworth · 19 March 2009

Maybe writing even simple programs requires a "pathetic level of detail" that the folks at the Evolutionary Informatics lab are unable to match.

angst · 19 March 2009

DS said: Now we know why Dawkins called it a weasel program. We're all waiting to see Dembski try to weasel out of this again.
"Marge, dont discourage the boy. Weaseling out of things is important to learn. Its what separates us from the animals...except the weasel." Homer Simpson

Roy · 19 March 2009

Answers in Genesis implemented a fancy version of weasel <note spelling> several years ago, complete with options for population size, fixed vs variable mutation rates, modelling amino-acids, etc. The program worked well (as long as you didn't mind the copious garbage in the accompanying text) and I still have a copy.

AFAICT AiG did this to 'demonstrate' that in reality, you'd never ever reach any optimal solution because after a while the probability of the next generation containing a fitter individual was the same as the probability that all members of the next generation were less fit than the parent, at which point the simulation would simply oscillate back-nd forth, and never reach the set target. They called this 'error catastrophe'. (They cheated, of course, by selecting a set of options that didn't reflect real life; however, I don't think the person who developed the program got the memo, since everything AiG claimed could rapidly be refuted simply by choosing more appropriate options).

So... why didn't Dembski just use AiG's implementation, since it manifestly does not include locking?

Roy

MememicBottleneck · 19 March 2009

Bruce said: Should that headline refer to "Weasles" or "Weasels"? Or is that an intelligently-designed typo?
That's a random mutation. Selection hasn't acted on it yet.

mrg · 19 March 2009

MememicBottleneck said: That's a random mutation. Selection hasn't acted on it yet.
With just one more mutation, Measles will have evolved from Weasels. Yet another example, of course, that Darwinian evolution can only produce degeneration -- it cannot innovate. I'd add a smiley but I hate those things.

Wesley R. Elsberry · 19 March 2009

Thanks, Mike. I've edited the page.

I checked most things I put up via Monte Carlo, but I apparently thought those were OK as they were.

Mike Elzinga · 19 March 2009

Wesley R. Elsberry said: Thanks, Mike. I've edited the page. I checked most things I put up via Monte Carlo, but I apparently thought those were OK as they were.
One would think with all the discretionary time one has in retirement that it would be easy to find big enough blocks of time to work on it. But my schedule always seems to be full. But playing around with this and some theory is now on my agenda. It has given me some other generalized ideas to pursue also. Good for the brain.

Wesley R. Elsberry · 19 March 2009

Mike,

None of the probability stuff was complex, but after a while of raising complements to powers it all gets prone to error. Obviously I was prone to error to begin with, but at least for the stuff related to the "locking/latching" issue I was really cautious and made sure that the calculation and the simulation agreed over a range of parameters. At least I think I did... let me know if you see anything else dodgy.

Wheels · 19 March 2009

A noble click embiggens the smallest thumbnail?

Mike Elzinga · 20 March 2009

Wesley R. Elsberry said: Mike, None of the probability stuff was complex, but after a while of raising complements to powers it all gets prone to error. Obviously I was prone to error to begin with, but at least for the stuff related to the "locking/latching" issue I was really cautious and made sure that the calculation and the simulation agreed over a range of parameters. At least I think I did... let me know if you see anything else dodgy.
Wesley, I thought perhaps it could be just a typo interchanging K and L. But your general approach looks fine to me. But this discussion triggered memories of some old theoretical stuff I was working on many years ago, and it set off some ideas about biological systems that I once thought about but never had the time to pursue in any depth. It had not occurred to me then that this simple little program of Dawkins’s could be a toy model that I could bootstrap off from. But systems like this might have some general behaviors recognizable to physicists when they are slightly perturbed from equilibrium, and then they could eventually go chaotic as they are stressed farther from an equilibrium state. If my hunch is correct, I think the math may ultimately turn out to be simple enough to be usable for pedagogical purposes, yet be able to illustrate some deeper concepts linking the biology and the physics. That is where I am hoping to end up I’ll keep you posted on that Evolutionary Computation thread. It may be a few days or a couple of weeks depending on how some of my other projects fall out.

Anders · 20 March 2009

Ian Musgrave said:
Anders said: Excellent - I'd love to see this analysis. But I seem not to be able to view the plots on this page? [...]
No, the graphs are blocks of black with white areas and fuzzy grey bits at the interface. They might need a border to make them clearer.
Aha! OK, I (finally) get it.
Kevin B said: [...] Perhaps he's using the Darwinian programming methodology. (This is the one where you start with a BASIC program of about the right number of lines, and just change statements at random until it produces the right output :)
Hey - don't put down Evolutionary Programming" - it works! Actually, now that I think about it perhaps Dembski has in fact hired a team of monkey programmers that are now hammering away at their typewriters trying to randomly hit on a working weasel program?

Ian Musgrave · 20 March 2009

82 hours and still no weasel programs over at uncommon dissent.

Torbjörn Larsson, OM · 20 March 2009

Ooh, more eye (and brain) candy! Unfortunately I dunno yet if I'll have time to make a contribution. Meanwhile it seems the thread is converging on an interesting target.
Anders said: Actually, now that I think about it perhaps Dembski has in fact hired a team of monkey programmers that are now hammering away at their typewriters trying to randomly hit on a working weasel program?
So you are saying that he is actually trying to ferret out a solution? [Btw, I believe it when I see it, Dembski is known for his ineffectual brooding over matters beyond his ken.]

Sander van Driel · 20 March 2009

Yay! Programming! This whole discussion inspired me to make my own Weasel implementation in C#. This was REALLY, REALLY easy (45 minutes). I can’t wrap my head around it how Dembski c.s. don’t just DO IT.

Porlock Junior · 20 March 2009

Sizzi being mentioned, I can't resist a footnote. This was one of the people whom Galileo declined to fight with; OK, the guy had made a fool of himself, but who needed to make an enemy? The result was that some years later Sizzi told him of an anomalous motion of sunspots, which still later Galileo used to show a nasty problem with geocentric systems, whether Ptolemy's or Tycho's.

And the moral of that is -- something about turning the other cheek or casting bread upon the waters, though it's hard to see how it applies to the die-hard creationists. Maybe upstart creationists still capable of redemption?

stevaroni · 20 March 2009

And the moral of that is – something about turning the other cheek or casting bread upon the waters

True, it is written that when you cast your bread upon the waters it shall return a thousandfold, but sadly, all you ever get back from Dembski is a thousand soggy loaves of bread.

Sander van Driel · 20 March 2009

Weasel in C# (small update)

I corrected the mutation mechanism so it matches the original algorithm (e.g. with a mutation rate). For an offspring count of 30 and a mutation rate of 4%, the last lines show that the M does not lock in this test run:

Generation 103 - Fitness 85.7% - METHINKS IT IC YIKE A WEQSCL
Generation 123 - Fitness 89.3% - DEDHINKS IT IC LIKE A WEASEL
Generation 146 - Fitness 92.9% - PETHINKS IT IQ LIKE A WEASEL
Generation 150 - Fitness 96.4% - PETHINKS IT IS LIKE A WEASEL
Generation 186 - Fitness 100.0% - METHINKS IT IS LIKE A WEASEL

Mike Elzinga · 20 March 2009

Anders, Ian, Wesley, and Sander:

I see I have a few commitments that will keep me busy for the next day, but here are some thoughts I am working on.

These curves are extremely reminiscent of a number of well-known processes in physics and they can be checked with your programs very easily.

Simply change to a semi-log plot and plot your decaying curve directly against the logarithm of the generations. Then take your increasing data and subtract it from 1 and plot it on the semi-log plot (data vs log of generations). If you get a roughly straight line, we have a winner.

Here are some examples of processes this reminds me of in the stochastic regime:

Radioactive decay in the presence of radioactivation. In this case, a sample of atoms are sitting in a field of neutrons or gammas and being excited into higher energy states from which they decay.

The decay of voltage in a capacitor discharging through a resistor.

A nearly critically damped harmonic oscillator, but at the level where the stochastic hits from the air molecules doing the damping is visible.

In any of these cases, changing the target string is equivalent to shifting the ground state of the system. The system, if it is within a regime in which it can respond, simply tracks the new target (ground state) with a delay and decays into the new equilibrium position.

KP · 20 March 2009

Sander van Driel said: I can’t wrap my head around it how Dembski c.s. don’t just DO IT.
Don't hold your breath. With what appears to be more than a dozen different models cranked out in 3-4 days here, even if they do come up with one, it will not likely negate the increasing pile of valid models that all conclude on convergence in relatively rapid order.

Kevin B · 20 March 2009

stevaroni said:

And the moral of that is – something about turning the other cheek or casting bread upon the waters

True, it is written that when you cast your bread upon the waters it shall return a thousandfold, but sadly, all you ever get back from Dembski is a thousand soggy loaves of bread.
But only if the fishes don't get it first. :) More seriously, having translated Ian Musgrave's QBASIC "Weasle" program into Perl, it's clear that it's not entirely an exact reimplementation of Dawkins' original program. Dawkins applies a finite probability of mutation to each position of his candidate strings, and thus allows for a finite (if vanishingly small) possibility of the whole string changing in one generation. Ian M's program mutates one position in the string in any generation. We thus have, not a Weasel program, but a whole raft of disparate Mustelid programs. The interesting thing is that all the variants converge on the right answer.

Mike Elzinga · 20 March 2009

Kevin B said: More seriously, having translated Ian Musgrave's QBASIC "Weasle" program into Perl, it's clear that it's not entirely an exact reimplementation of Dawkins' original program. Dawkins applies a finite probability of mutation to each position of his candidate strings, and thus allows for a finite (if vanishingly small) possibility of the whole string changing in one generation. Ian M's program mutates one position in the string in any generation. We thus have, not a Weasel program, but a whole raft of disparate Mustelid programs. The interesting thing is that all the variants converge on the right answer.
Actually the only thing these changes do is change the phenomenological probability for the system. As long as this remains within a proper range, the system converges. So the programs are equivalent.

Kevin B · 20 March 2009

Mike Elzinga said: Actually the only thing these changes do is change the phenomenological probability for the system. As long as this remains within a proper range, the system converges. So the programs are equivalent.
However, the "exactly one change per generation" scenario is much less likely get already correct positions to change, because that could only happen in the case where none of the candidate strings "improve" an incorrect position. This would present the appearance of "locking" that certain people are muttering about.

Mike Elzinga · 20 March 2009

If the harmonic oscillator in one of my previous comments seemed like a strained analogy, here is the justification.

When atoms or molecules condense into a crystal, the mutual potential energy among the molecules begins to form a potential well. As the molecules or atoms fall deeper into this well, the well itself can be more closely approximated as having a parabolic shape (for those with some math background, a Taylor series expansion of the potential is quadratic in the second-order term, and the higher orders are small enough to be ignored).

Now, what happens in crystallization is that the atoms or molecules that participate in this are selected (because of the second law of thermodynamics). Atoms are losing energy through collisions with other atoms that are carrying energy out of the system or by way of photons that escape to infinity. What remains are ensembles of atoms with smaller and smaller energies, and these start to fall into the mutual attractive potential wells.

The big hurdle for the ID/Creationists is their carefully constructed misconceptions about the second law. They have continually propagandized for decades against all efforts of the physics community to correct these misconceptions. Thus, the ID/Creationists think the second law prevents this selection process from occurring.

The truth is quite the opposite; the second law is an expression of the fact that this stuff really happens. It is a description of the way nature behaves, not a demon that steps in and prevents or smashes everything into chaos.

The Dawkins’ Weasel program captures some of the aspects of stochastic systems settling into a “potential well”.

Mike Elzinga · 20 March 2009

Kevin B said:
Mike Elzinga said: Actually the only thing these changes do is change the phenomenological probability for the system. As long as this remains within a proper range, the system converges. So the programs are equivalent.
However, the "exactly one change per generation" scenario is much less likely get already correct positions to change, because that could only happen in the case where none of the candidate strings "improve" an incorrect position. This would present the appearance of "locking" that certain people are muttering about.
The “locking”, in the comparison with radioactive decay in the presence of radioactivation, is simply removing the radioactivation. In any of the physics analogies, it corresponds to the case of a perfect situation where the more “energetic” particles are never allowed to come back into the system. In reality, this is not the case. We are also looking at this in the stochastic regime. Thus, it should not be surprising that we will see fluctuations that "don't fit the pattern".

Bjarne B · 20 March 2009

After having heard of it yesterday for the first time, I decided to put together my own weasel program in python.

Taken that I have written my last program in school in 1993 and that I have never heard about python until yesterday, I am a bit proud on myself :D
Unfortunately, I have no place to post the code (and I believe it not to be too elegant anyway).

Wasn't too hard, actually.

Examples from an offspring count of 25:

Generation 0
Best fit:JCSVWGU HXVY RXJADIWENCNRH Similarities:2

Generation 15
Best fit:JCTVIGU IT YS RXJWDBWWNCSEL Similarities:12

Generation 50
Best fit:MJTHIOF IT XS OIFE U WEWSEL Similarities:19

Generation 79
Best fit:METHINK IT IS LIXE A WEXSEL Similarities:25

Generation 80
Best fit:METHINK IT IS LIXE A WEASEL Similarities:26

Generation 81
Best fit:METHDNK IT IS LIXE A WEASEL Similarities:25

Generation 108
Best fit:METHINK IT IS LILE A WEASEL Similarities:26

Generation 109
Best fit:METHINK IT IS LIKE A WEASEL Similarities:27

Wesley R. Elsberry · 20 March 2009

Kevin B said:
Mike Elzinga said: Actually the only thing these changes do is change the phenomenological probability for the system. As long as this remains within a proper range, the system converges. So the programs are equivalent.
However, the "exactly one change per generation" scenario is much less likely get already correct positions to change, because that could only happen in the case where none of the candidate strings "improve" an incorrect position. This would present the appearance of "locking" that certain people are muttering about.
I'm not getting that. The alternative mutation scheme was, IIRC, "change M bases per candidate", not "change M bases per generation". In a quick run of my Monte Carlo setup, changing one base per candidate was no less effective in changing already correct characters than a "u" value of 1/L. I take apart the "it looks like it was locking" objection here.

Kevin B · 20 March 2009

Wesley R. Elsberry said:
Kevin B said: However, the "exactly one change per generation" scenario is much less likely get already correct positions to change, because that could only happen in the case where none of the candidate strings "improve" an incorrect position. This would present the appearance of "locking" that certain people are muttering about.
I'm not getting that. The alternative mutation scheme was, IIRC, "change M bases per candidate", not "change M bases per generation". In a quick run of my Monte Carlo setup, changing one base per candidate was no less effective in changing already correct characters than a "u" value of 1/L.
. It's Ian Musgrave's original QBASIC program that only changes one character per generation. Dawkins didn't (in TBW) actually say what his method was, but one of his examples has multiple changes in the first generation. Ian's program (one changed character per candidate string each generation, 100 candidates, 23 character target string) will rarely find that the "best" string for the next iteration will have changed a previously correct position. Dawkins ought to have sought the advice his fellow professor, Tony Hoare, on creating a full formal specification of the program.

ds1978 · 20 March 2009

Is everyone allowing the most fit critter from each generation to undergo random mutation before breeding? The source code referenced in wikipedia at:

http://home.pacbell.net/s-max/scott/weasel.html

does not. It will always converge on a solution because it limits the result of each generation to improvement or no improvement. There is no going backward. In the biological world of mutation and selection sometimes things fail to converge on a solution and become extinct.

Another problem with these Weasel programs is they begin from random gibberish. In the biological world something that is random gibberish to start with doesn't reproduce at all. Critters start from a highly optimized state and (usually) because of some change in the external environment that diminishes the optimization they adapt through mutation and selection to a better optimized state.

The Weasel programs would be more realistic if the most fit of each generation is subjected to random mutation like all the others in the population and it would also be more realistic if there was a beginning population of semi-fit critters, say with half the characters correct, and if the number of correct characters in the fittest individual ever fell below one quarter the result would be an extinction.

This way if the population was too small and/or the mutation rate too high we'd see what often happens in the biological world under such conditions - the species would become extinct.

On the latching issue that's easy to code. If you don't mutate the most fit individual and all the others are limited to a single character mutation each (which the above referenced program does) then a new most fit individual would require two mutations of previously incorrect letters to a correct letter. If no critter in a single generation can have more than one mutation then replacement of a correct character with an incorrect one is not possible.

It is possible for the program referenced above to unlatch a correct character because of another unrealistic thing that it does. During breeding the most fit individual from the previous generation (let's call him the "stud") injects a random size portion of itself into a randomly selected one eighth of the population. The caveat that can allow a correct character to become incorrect is that each individual mating result is evaluated immediately and if the progeny is more fit than the stud then the current stud is immediately replaced by his more fit offspring. To be more realistic the replacement of one stud by another should wait until all breeding in any one generation has been completed. The way it is the generation count is misleading, especially with larger populations because within a single generation the stud can be replaced by his offspring multiple times. You can see this by setting the population number to a half million. It converges on a solution in less than 10 generations which means an average of almost 3 correct letters are added in each generation. When mutation of any single individual in a single generation is limited to one character then the minimum number of generations should be very near the character count of the string minus any correct characters that happened to be in the fittest individual of the very first generation of random gibberish strings.

Mike Elzinga · 20 March 2009

Kevin B said: It's Ian Musgrave's original QBASIC program that only changes one character per generation. Dawkins didn't (in TBW) actually say what his method was, but one of his examples has multiple changes in the first generation. Ian's program (one changed character per candidate string each generation, 100 candidates, 23 character target string) will rarely find that the "best" string for the next iteration will have changed a previously correct position. Dawkins ought to have sought the advice his fellow professor, Tony Hoare, on creating a full formal specification of the program.
There will always be a threshold that displays chaotic behavior. Whether one restricts the number of changes per string or the probability of a change per position the result is to produce a phenomenological probability of what will be available in the subsequent generation. There should eventually be a threshold at which the system becomes chaotic and doesn’t settle into its “ground state” (the target string). There is nothing weird going on here. The beauty of Dawkins’ program is its pedagogical simplicity. The results it produces point to some very important concepts. If it had been more elaborate, it would lose its value as a teaching tool.

George · 20 March 2009

I have run the python version now several times and the unlocked, 30 offspring / generation settings do not converge until about 8000-10,000 generations. This is an order of magnitude more than you show above?

Wesley R. Elsberry · 20 March 2009

Kevin B said:
Wesley R. Elsberry said:
Kevin B said: However, the "exactly one change per generation" scenario is much less likely get already correct positions to change, because that could only happen in the case where none of the candidate strings "improve" an incorrect position. This would present the appearance of "locking" that certain people are muttering about.
I'm not getting that. The alternative mutation scheme was, IIRC, "change M bases per candidate", not "change M bases per generation". In a quick run of my Monte Carlo setup, changing one base per candidate was no less effective in changing already correct characters than a "u" value of 1/L.
. It's Ian Musgrave's original QBASIC program that only changes one character per generation. Dawkins didn't (in TBW) actually say what his method was, but one of his examples has multiple changes in the first generation. Ian's program (one changed character per candidate string each generation, 100 candidates, 23 character target string) will rarely find that the "best" string for the next iteration will have changed a previously correct position. Dawkins ought to have sought the advice his fellow professor, Tony Hoare, on creating a full formal specification of the program.
Please read the explanation that I linked to. However one does mutation, so long as the resulting rate is not excessive and the population is not very small, one is going to expect that correct bases from the parent in the previous generation will remain unchanged in the best candidate in the next generation. With the "change one base per candidate" mutation scheme, my Monte Carlo run is showing that about half of all generations show the "best" string has a change in a previously correct base when N=10 and C=27, and about 0.6 of them when the usual mutation rate procedure is applied where u= 1 / L = 0.0357, N=10, and C=27. There's nothing magic about the retention of correct bases in a "weasel" run, and it has a lot to do with having a reasonable population size (say, about 50 or more candidates per generation). It is because all of the daughter candidates in a generation must have at least one change to a previously correct base that this situation arises; as the population size N rises, the probability that all candidates have that kind of change drops as (p_c2i)^N. Here's output from my Monte Carlo program for N=100, u = 1/L = 1/23 = 0.0435, K=27: 1000 runs, N=100, u=0.04348, K=27, C=22, p_pop_c2c calc = 1.00000, MC = 1.00000 Proportion of candidates w/C2I bases calc = 0.60974, MC = 0.60990 p_pop_c2c = 1.0 - (0.60974)^100 Note that last... the probability with the above conditions and when C=22 that you will see a "best" candidate change a correct base is once in 3.058E+21 such generations... so don't hold your breath.

Wesley R. Elsberry · 20 March 2009

It is possible for the program referenced above to unlatch a correct character because of another unrealistic thing that it does.

Uh, have you not been paying attention? THERE IS NO LATCHING IN WEASEL. Not then, not now, not ever.

Mike Elzinga · 20 March 2009

This is a really interesting thread, but I have to run off to another engagement. I can only stop by briefly on occasions in the next day or so.

But here are some characteristics to look for.

For systems that converge relatively quickly, (deep in the “potential” well), one should see fluctuation magnitudes of the “potential energy” divided by the magnitude of the mean of the potential energy go like the reciprocal of the square-root of the number of generations. It is in this regime that the semi-log plot should show a straight line as mentioned in a previous comment.

For systems that converge very slowly (i.e., approaching chaotic behavior), the above rule no longer holds and the fluctuations continue to get larger as the system approaches the chaotic threshold.

I wish I had thought about using Dawkins’ program as a teaching tool years ago.

Ian Musgrave · 20 March 2009

90 hours have passed and no weasel programs have been posted at uncommon dissent. Here's a run using my QBASIC program where all strings are freely mutated, with a population size of 100, which converges in 61 generations (similar to Dawkins 64 step run in "The Blind Watchmaker"), like Dawkins I have presented the most fit string of every 10th generation (and yes, my target string was "methinks it is a weasle".
rfbhxsdn euqnlcr nlgluw
rfthisdn eu nl a wlglnf
nfthinlt ku nq a wcasnf
nfthinls iu it a weasle
mdthinks iu is a weasle
mdthinks it is a weasle
mfthinks it is a weasle
methinks it is a weasle
Presenting it like this is what Dembski claims is evidence for locking. But if you look at the most fit strings of generations 46,47 and 48
mdthinks it is a weasle 
mdthjnks it is a weasle
mdthinks it is a weasle
Yep, reversion. As Wesley has elegantly demonstrated mathematically reversion is sufficiently rare in the high offspring cases you won't see it if you present every 10th string. Of course, if Dembski had implemented a weasel program he would have seen this by now. Over at uncommon dissent there is an amusing argument that Dawkins must have used a low mutation rate to get "locking", ignoring the fact that if you do that, you won't get convergence in around 60 generations.

Ian Musgrave · 20 March 2009

Gahhh! Why don't PRE tags work properly here!

SteveF · 20 March 2009

Ian,

Speaking of uncommon descent, O'Leary links to some frenzied recent activity on Michael Behe's blog. It concerns this paper:

Durrett, R. and Schmidt, D. (2008) Waiting for two mutations: with applications to regulatory seqeunce evolution and the limits of Darwinian evolution. Genetics, 180, 1501-1509.

Behe has a response in Genetics (to which Durrett and Schmidt reply). He then continues the discussion on his blog:

http://www.amazon.com/gp/blog/A3DGRQ0IO7KYQ2/ref=cm_blog_dp_artist_blog

I was wondering if Pandasthumb would be dealing with any of this? Seems like it might make an interesting series of posts.

Apologies for being off topic (and good work on the weasel front!). Cheers.

George · 20 March 2009

Mr. Elsberry,

Seems you were not replying to my comment. My comment was noting that the Python unlocked version referenced takes longer to converge than Ian's data as shown. There may be parameters that do not match, but I am interested in trying to match those results.

The locked version has a bug that I have not worked on - that will need to be a weekend task. So I have no comparison of the two at this time.

If anyone has run the python version and matched Ian's data I am interesting in the settings for a 30 offspring / generation case.

thanks

Sander van Driel · 20 March 2009

Mike Elzinga said: Anders, Ian, Wesley, and Sander: These curves are extremely reminiscent of a number of well-known processes in physics and they can be checked with your programs very easily. Simply change to a semi-log plot and plot your decaying curve directly against the logarithm of the generations.
Good idea. Since I has some time to spare, I've a added a logarithmic plot documenting the fitness over generations (not anywhere as fancy as Anders' graphs though). Nothing strange there, just a (somewhat) straight line, as expected. Love it when a plan comes together. I'm anxiously waiting for UD's death blow to evolution, but so many hours have passed....

Wesley R. Elsberry · 20 March 2009

George,

I'm not sure why my response to "ds1978" has a header saying that it was a response to you.

What's the link to the implementation of "weasel" that you are having trouble with?

Sander van Driel · 20 March 2009

ds1978 said: Is everyone allowing the most fit critter from each generation to undergo random mutation before breeding?
The fittest 'critter' is a RESULT of random mutation.
It will always converge on a solution because it limits the result of each generation to improvement or no improvement. There is no going backward. In the biological world of mutation and selection sometimes things fail to converge on a solution and become extinct.
Going backwards, or failure to adapt, will be punished. Fitter 'critters' will be selected instead.
The Weasel programs would be more realistic if the most fit of each generation is subjected to random mutation like all the others in the population (...)
The fittest are the RESULT of a random mutation, and their children will have random mutations too.
(...) and it would also be more realistic if [large list of features]
Sometimes I hate being in the software engineering field. End users always ask for extra features. And when you've done that, more extra features. The point of the algorithm is its simplicity. We could of course expand it with a ton of complex features, but to what use? It does prove a (pedagogical) point right now, doesn't it?

George · 20 March 2009

Mr. Elsberry, (or may I use Wes? Wesely?)

No worries. I am using Python v3.0.1 - I copied the code from the link provided.

http://www.cbs.dtu.dk/courses/27615.mol/weasel.php

I have not tried many options yet as time has been limited. Yet, 8000+ generations to converge for the 30 offspring case is an order of magnatude more than Ian's data.

Ian Musgrave · 20 March 2009

SteveF said: Ian, Speaking of uncommon descent, O'Leary links to some frenzied recent activity on Michael Behe's blog. It concerns this paper: Durrett, R. and Schmidt, D. (2008) Waiting for two mutations: with applications to regulatory seqeunce evolution and the limits of Darwinian evolution. Genetics, 180, 1501-1509.
Mostly it the same old, same old from them. I was going to deal with it when I got some spare time, if the other PTer's want to get to it first they can do so though.

Ian Musgrave · 20 March 2009

Kevin B said: More seriously, having translated Ian Musgrave's QBASIC "Weasle" program into Perl, it's clear that it's not entirely an exact reimplementation of Dawkins' original program. Dawkins applies a finite probability of mutation to each position of his candidate strings, and thus allows for a finite (if vanishingly small) possibility of the whole string changing in one generation. Ian M's program mutates one position in the string in any generation.
It is effectively a 4% probability of a mutation for any given string. In later versions I implemented explicit, used definable per string mutation rates, but for a quick and dirty program a fixed probability of roughly 4% works fine.

Wesley R. Elsberry · 20 March 2009

George,

"Wesley" should do fine.

I got the Python code and ran it with N=30 and the default mutation rate u=0.09. That mutation rate is pretty high. Yes, the simulation tends to run on and on at those settings. It isn't surprising, though...

1000 runs, N=30, u=0.09000, K=27, C=27, p_pop_c2c calc = 0.93373, MC = 0.93900

Proportion of candidates w/C2I bases calc = 0.91350, MC = 0.91370

p_pop_c2c = 1.0 - (0.91350)^30

A little over 6% of the time, a generation's best candidate will have changed a correct base for an incorrect one. Given that N=30, it also isn't likely that an improvement is going to be found in 16 generations or fewer. Plus this problem is going to be manifested pretty severely prior even to getting to the C=27 level.

SteveF · 20 March 2009

Ian Musgrave said:
SteveF said: Ian, Speaking of uncommon descent, O'Leary links to some frenzied recent activity on Michael Behe's blog. It concerns this paper: Durrett, R. and Schmidt, D. (2008) Waiting for two mutations: with applications to regulatory seqeunce evolution and the limits of Darwinian evolution. Genetics, 180, 1501-1509.
Mostly it the same old, same old from them. I was going to deal with it when I got some spare time, if the other PTer's want to get to it first they can do so though.
That would be much appreciated. Cheers.

Ian Musgrave · 20 March 2009

George said: I have not tried many options yet as time has been limited. Yet, 8000+ generations to converge for the 30 offspring case is an order of magnatude more than Ian's data.
What Wes said. Your per string mutation rate is quite high for that number of generations, try u = 0.04 or u =0.03 and you should get what I see.

George · 20 March 2009

Thanks for the help. I will reduce the mutation rate and run again. Now I will dive into getting the locked code to run.

Mike Elzinga · 20 March 2009

Sander van Driel said: Good idea. Since I has some time to spare, I've a added a logarithmic plot documenting the fitness over generations (not anywhere as fancy as Anders' graphs though). Nothing strange there, just a (somewhat) straight line, as expected. Love it when a plan comes together. I'm anxiously waiting for UD's death blow to evolution, but so many hours have passed....
In this particular case, you are plotting the increasing data. When you plot this on a semi-log plot, subtract your data from 1 first and then plot the result. If you already multiplied your output by 100 (as seems to be the case given the scale on your graph), subtract your results from 100. What we are looking for here is something of the form (1 – e-kx) which, if you subtract from 1 gives something of the form y = e-kx. Taking the logarithms of this (oops; I already see my dyslexic mistake in my previous post) you get log(y) = - kx. A plot of y on a semi-log plot automatically takes the log of y. My apologies for my dyslexia. Actually a semi-log plot is in fact a plot of the log of the dependent variable against the linear representation of the other (often called a log-linear). When we get into the fractal regime, we might want to start exploring log-log plots of the data to look for fractal dimensions. What you show is a logarithmic plot. We can look at these as well. These may pick up on feedback effects that tend to suppress the mechanisms we are looking at. We can take that up later. In one of my previous posts is mentioned the regimes to be explored. As the system approaches the chaotic threshold, the fluctuations grow and these plots start becoming more and more distorted. In some systems to which this model might apply, that corresponds to a phase transition; something like a melting phase or a vaporization stage.

Mike Elzinga · 20 March 2009

If there are some here who are not familiar with, or are rusty on some elementary data analysis techniques, here is a beginning tutorial on data analysis that I and a former colleague wrote some years ago.

Click on the section on Graphical Analysis.

I have no idea of how it wound up at this site. I suspect my colleague used it in a summer workshop at some point.

If you add some graphing output to your programs, make some allowances for semi-log, log-log, and logarithmic plots.

Then as you explore different convergence regimes in your program, you can start looking for patterns that may point to underlying physical mechanisms this program could mimic.

Anders · 21 March 2009

Kevin B said: [...] Ian's program (one changed character per candidate string each generation, 100 candidates, 23 character target string) will rarely find that the "best" string for the next iteration will have changed a previously correct position. [...]
This depends on the population size: Note that with the "one mutation per offspring per generation" setup you will by definition never get offspring that are identical to the parent. That means that the only way fitness can stay the same (or increase) is if the (required) mutation hits an incorrect position. With a smallish population size this becomes very unlikely near the end of the run, and you will in fact see frequent reversions and a fitness that fluctuates. With a large population (compared to the length of the target string) on the other hand, one of the many offspring is very likely to have a mutation that has hit an incorrect position, and you will then get the behaviour you describe here.

Anders · 21 March 2009

Wesley R. Elsberry said: I got the Python code and ran it with N=30 and the default mutation rate u=0.09. That mutation rate is pretty high. Yes, the simulation tends to run on and on at those settings. It isn't surprising, though... [...]
Yes, please note that I used a fairly high mutation rate in the python programs I put on my site. This was because I wanted to demonstrate the weasel algorithm's ability to experience reversions of correct positions. And Dembski's doubts about this is what started the whole thread. So please play around with other values! Regarding this (and also see thorough investigation by Wesley Elsberry): The lower the mutation rate per site, the higher the probability that at least one offspring in a generation will be identical to its parent, and fitness will then never drop. Specifically, the probability that any given offspring string will experience zero mutations is: (1-mut_rate)^string_length. For a mutation rate of 0.04 per site and a target string of length 28 that is: 0.96^28 = 0.319, or about 32% chance of zero mutations. If you have 30 such offspring then the probability that at least one of them has no mutations is 1-(1-0.32)^30 = 0.9999900, i.e., a virtual certainty that fitness will never drop. Incidentally, note that my python programs are compatible with python version 2.x. I'll put 3.x versions up also (the syntax of the print statement has changed in python 3)

Wesley R. Elsberry · 21 March 2009

I should note that the probability that I was interested in wasn't that of having an unchanged copy of the parent in a daughter in a generation, but rather that of having at least one daughter in a generation retain all the correct bases seen in the parent. As C approaches L, those two probabilities will become more similar. I advised similar parameters to see an obvious loss of a correct base in a best candidate some time ago:

You can set higher mutation rates and smaller population sizes to find values that cause “weasel” to sometimes step back to having worse performance in one generation than it had in the generation just previous. A simple verification can be had by setting the default target string, a population of 30, and a mutation rate of 8% per character. Run that several times, and most times you will see at least one generation that had a stepback in performance.

But the default values are a population of 100 and mutation rate of 4%. If someone just runs my "weasel", my thought was that it should use parameters that lead to likely convergence.

ds1978 · 21 March 2009

Sander van Driel said:
ds1978 said: Is everyone allowing the most fit critter from each generation to undergo random mutation before breeding?
The fittest 'critter' is a RESULT of random mutation.
It will always converge on a solution because it limits the result of each generation to improvement or no improvement. There is no going backward. In the biological world of mutation and selection sometimes things fail to converge on a solution and become extinct.
Going backwards, or failure to adapt, will be punished. Fitter 'critters' will be selected instead.
The Weasel programs would be more realistic if the most fit of each generation is subjected to random mutation like all the others in the population (...)
The fittest are the RESULT of a random mutation, and their children will have random mutations too.
(...) and it would also be more realistic if [large list of features]
Sometimes I hate being in the software engineering field. End users always ask for extra features. And when you've done that, more extra features. The point of the algorithm is its simplicity. We could of course expand it with a ton of complex features, but to what use? It does prove a (pedagogical) point right now, doesn't it?
If simplicity instead of realism is the goal then a simple search algorithm independent of the scoring algorithm is guaranteed to get the the correct answer for any 28 character string using a 28 character alphabet in no more than 784 tries (28 x 28). You'd do that by varying one character at a time, getting a score, and thus in 28 or fewer tries find the correct character for that position in the string. Repeat 28 times and you have the solution. 784 tries is far fewer than any implementation of weasel I've seen or read about. Optimum search performance using an independent fitness function then clearly isn't the goal. The goal is a realistic yet easily understandable demonstration of random mutation and recombination as the modifier. I don't think the few changes I suggested are complex to code, difficult for the layman to understand, and will add to the realism very substantially. Any algorithm that purports to model mutation and selection in any way that can never fail to find a solution and cause the species to become extinct is so unlike nature that model should itself become extinct for being misleading.

ds1978 · 21 March 2009

Wesley R. Elsberry said:

It is possible for the program referenced above to unlatch a correct character because of another unrealistic thing that it does.

Uh, have you not been paying attention? THERE IS NO LATCHING IN WEASEL. Not then, not now, not ever.
I was responding to the assertion that coding a version that latches characters is far more difficult than one that does not latch. As I described the referenced program would exhibit character latching if the breeder was replaced by a fitter offspring not immediately after spawning the fitter individual but rather after all breeding for that generation had completed. I don't believe the program would expand by more than perhaps one local variable and two lines of code and not add one iota of additional computational burden if we overlook the fact that the more realistic breeding will result in more generations required to arrive at a solution.

Mike Elzinga · 21 March 2009

ds1978 said: Any algorithm that purports to model mutation and selection in any way that can never fail to find a solution and cause the species to become extinct is so unlike nature that model should itself become extinct for being misleading.
The Weasel program does have a region that fails. As I mentioned in my previous comments, many stochastic systems display a convergence region, a chaotic region, and a divergent region. Some of the questions that can be answered by studying this simple system are some of the same questions physicists and chemists study when looking at relatively small systems in the stochastic regime (where the magnitudes of the fluctuations are approaching the same order of magnitude as the phenomena themselves). To my knowledge, these kinds of studies haven’t been done using this particular model, which is one of the simplest models that incorporate some fundamental ideas from evolution at the gene level. Some of the questions that we would like to know is whether these behave at the “microscopic” level in ways that are similar to other physical systems studied at the microscopic level. Many systems converge, and they can be understood with simple math and coupled differential equations. But that is at the macroscopic level where all the microscopic activity has been averaged out. This model shows the stochastic properties of small systems, and we would like to know how activity at that level couples to the macroscopic level.

I was responding to the assertion that coding a version that latches characters is far more difficult than one that does not latch.

Again I’m not sure what the latching is that you are talking about. Over at Uncommonly Dense they are talking about “latching”, “twinkling”, “combinatorial explosions” and a whole lot of other gibberish. Are you talking about freezing the individual positions once they are correct? If so, I think some here are trying that. As I mentioned before with reference to radioactive decay in the presence of radioactivation; it would be equivalent to removing the activation. As you can see by following the conversation over at UD, this Weasel program also generates fascinating output from the denizens of UD. We thus gain some insight into the arcane workings of the ID/Creationist mind.

stevaroni · 21 March 2009

If simplicity instead of realism is the goal ... You’d do that by varying one character at a time, getting a score, and thus in 28 or fewer tries find the correct character for that position in the string. Repeat 28 times and you have the solution. 784 tries is far fewer than any implementation of weasel I’ve seen ...

As you allude to, you probably wouldn't even need 784 tries. If you were to start with... aaaa... baaa... caaa... .... and so forth, statistically, you'd probably get a hit on each position by the 14th letter, or a likely 400 or so tries to find the string. But if you really want efficiency, you could stack the deck by searching for common letters first. instead of a, b, c, d your search would start with e (12.7%), t (9.0%), a (8.2%) etc down to z, v and q. eeee... teee... aeee... oeee... ieee... "space" fits in there somewhere, Personally, I think I'd try it first. With "Methinks it is a weasel" you'd have hit 3 or 4 letters ( e or space ) on the very first try, and be statistically likely to need only 7 or so guesses on each remaining letter (about 200 tries to solve the string) Lastly, if you really wanted to be fast, you'd try to figure out which letters exist in the final string in the first place. First, you'd test the strings... space space space .... aaaa... bbbb... cccc... dddd... etc, and calculate how many of each letter you need for the sentence. True, this might "waste" 28 searches up front, but now you know that, for example, there are no c's d's or n's or f's , you could throw them out saving 100 tries later. Then you could do a search starting with common letters, winnowing down the remaining candidates as you go. Using these techniques, you'd get the "weasel" string after only about 100 tries. The worst case string would be... "zzqxjkvbpygfwmucldrhsnioate " and even that would only take 405 tries since you'd know you had 2 z's and 1 of everything else. ( 27 + 27 + 26 + 25 etc.. )

Mike Elzinga · 21 March 2009

ds1978 said: Optimum search performance using an independent fitness function then clearly isn't the goal. The goal is a realistic yet easily understandable demonstration of random mutation and recombination as the modifier. I don't think the few changes I suggested are complex to code, difficult for the layman to understand, and will add to the realism very substantially.
Well, it is more like allowing viscous asphalt to fit into a pothole at the microscopic level. An analogy might be something like a growing crystal fitting into the shape of a container. If the atoms making up the crystal condensed into position and forever locked there, the crystal would take on the perfect symmetry characteristic of its internal bonding at the atomic level; it would not grow to fit the container. However, if, say, high energy photons or neutrons or some other mechanism was continually acting in such a way as to “break the symmetry” occasionally so that atoms already locked in place were dislocated, then these dislocations become the seeds for redirecting the rigid crystal growth that would otherwise occur. Once these “mutations” occur, the crystal can begin to respond to some of the more subtle influences of the containing vessel. Then the growth begins to settle into the shape of the vessel even though large volumes within the crystal contain the rigid symmetry of the pristine crystalline state.

stevaroni · 21 March 2009

Mike writes... Over at Uncommonly Dense they are talking about “latching”, “twinkling”, “combinatorial explosions” and a whole lot of other gibberish.

Indeed. If you follow the link, you get...

From Bill D, on UD. as of 3/16... From this it’s clear that once the right letter in the target sequence is latched on to, it locks on and never changes.

Sadly, this is easy enough to disprove if you just run the program. Yes, sometimes a given letter will seem to "lock" sometimes it won't. Sometimes the solution starts from the right, sometimes the left. It's random. Had Wild Bill just run the program for himself a couple of times he would have seen this. Stunningly pathetic, that not only can a man who has some sort of senior position in something that purports to be a research facility not demonstrate his own experimental results, he can't even be bothered to give the most cursory review to those that can before criticizing them.

Mikko · 21 March 2009

Hi all!

I created another implementation of weasel with Python.

http://users.tkk.fi/~mtnarjan/weasel.py

Some here have commented that the "locking" feature is a pain to implement. It isn't necessarily so. I found it very easy to add it as an option. It probably depends on how the non-locking version was done.

Ian Musgrave · 21 March 2009

It is now over a 100 hours since Dembski said "watch this space", and no one, not Dembski's Evolutionary informatics team, nor any of the Uncommon Dissent commentators has constructed a weasel. Mean why we not only have a bunch of weasel programs here, but people are doing head-to-head comparisons of different implementations of the Dawkins vs Dembski version. Again, this highlights the fact that cdesign proponetists don't get the "test your hypothesis" aspect of science.

I'm going silent for a while. I'm hunting asteroids in the L5 point (yes, seriously)

ds1978 · 21 March 2009

stevaroni said:

If simplicity instead of realism is the goal ... You’d do that by varying one character at a time, getting a score, and thus in 28 or fewer tries find the correct character for that position in the string. Repeat 28 times and you have the solution. 784 tries is far fewer than any implementation of weasel I’ve seen ...

As you allude to, you probably wouldn't even need 784 tries. If you were to start with... aaaa... baaa... caaa... .... and so forth, statistically, you'd probably get a hit on each position by the 14th letter, or a likely 400 or so tries to find the string. But if you really want efficiency, you could stack the deck by searching for common letters first. instead of a, b, c, d your search would start with e (12.7%), t (9.0%), a (8.2%) etc down to z, v and q. eeee... teee... aeee... oeee... ieee... "space" fits in there somewhere, Personally, I think I'd try it first. With "Methinks it is a weasel" you'd have hit 3 or 4 letters ( e or space ) on the very first try, and be statistically likely to need only 7 or so guesses on each remaining letter (about 200 tries to solve the string) Lastly, if you really wanted to be fast, you'd try to figure out which letters exist in the final string in the first place. First, you'd test the strings... space space space .... aaaa... bbbb... cccc... dddd... etc, and calculate how many of each letter you need for the sentence. True, this might "waste" 28 searches up front, but now you know that, for example, there are no c's d's or n's or f's , you could throw them out saving 100 tries later. Then you could do a search starting with common letters, winnowing down the remaining candidates as you go. Using these techniques, you'd get the "weasel" string after only about 100 tries. The worst case string would be... "zzqxjkvbpygfwmucldrhsnioate " and even that would only take 405 tries since you'd know you had 2 z's and 1 of everything else. ( 27 + 27 + 26 + 25 etc.. )
Yes, it would only take 784 tries if the string were all spaces and that was the last character tested each time. The average number of tries would be about half that number. The order in which letters are tested could improve the speed to solution but be foiled by a random target string. There's some additional realism to be had though by trying more common letters first even when the substitutions are random. That would simulate codon bias!

Wesley R. Elsberry · 21 March 2009

Ian,

It's worse than that. I informed "Atom", the code guy for Dembski and Marks, last November that "weasel" doesn't latch correct characters. He basically said that it didn't matter and blew it off.

Brendon Collecutt · 21 March 2009

I'm a lurker no longer, I had to try this. 53 minutes in Java.

Output at every 30 generations with a mutation rate of 3%

Generation  30 : HEDLIDKSCIF IS LEYEYAGYMAQEV

Generation  60 : MESLIDKS II IS LEXEYAGWEAQEL

Generation  90 : METHIDKS IT IS LIXE AGWEASEL

Generation 120 : METHINKS IT IS LIXE AGWEASEL

Generation 150 : METHINKS IT IS LIXE A WEASEL

Generation 160 : METHINKS IT IS LIKE A WEASEL

Mike Elzinga · 22 March 2009

I don’t know if the discussion and results on these two threads have anything to do with it, but over at UD there are actually some more recent comments about evolutionary algorithms that appear to recognize that programs like Weasel can model aspects of evolution. They also know about the antenna designed by a genetic algorithm.

Haven’t people been thrown off that board for supporting any ideas connected with evolution?

Some of the people posting there still seem to think along the lines that the intelligence is built into the program because of a specified target. Another seems to recognize that the target doesn’t have to be known by the programmer. He doesn’t say so, but he appears to recognize that the target string could be randomly generated by the computer before any other activity starts and the program would converge to that target.

As I mentioned in an earlier comment, shifting the target string is analogous to shifting the “ground state” and the system tracks with a slight delay. It’s like a change in the environment reestablishing selective pressures on the population.

That could easily be demonstrated by having the computer generate a different target string after the population converged and then going through the whole process again. All it requires is an outside loop that changes the target at the end of the first pass through the loop and then implementing another pass that converges to the new target (environment, “ground state”).

One could also make only a small change in the target string and allow the population to adjust, make another small change, etc. That would simply simulate a population responding to a changing environment. If the environmental changes are relatively small, the population adjustment catches up fairly quickly and is not a lot different from the previous population.

In a relatively short time one could change a weasel into a walrus. ;-)

Frank J · 22 March 2009

It is now over a 100 hours since Dembski said “watch this space”, and no one, not Dembski’s Evolutionary informatics team, nor any of the Uncommon Dissent commentators has constructed a weasel.

— Ian Musgrave
Maybe "constructed" is the key word. In all these years that the DI has been peddling "design," the only thing I have ever heard from them about "construction" (of those "IC" systems) is Behe's 4-billion-year-old ancestral cell. And even that hypothesis has apparently been abandoned, either because it's so easy to test, or because it conflicts with the models (themselves mutually contradictory) that their creationist fans desperately want validated. If ID's task is not to "connect dots" it may be a long wait for that program.

Frank J · 22 March 2009

BTW, in the rare case that anyone is losing sleep, I have 2 words: "ontogenetic depth".

Ian Musgrave · 22 March 2009

If anyone is interested in my search for L4 and L5 asteroids, have a look at this post.

RBH · 22 March 2009

Mike Elzinga wrote
That could easily be demonstrated by having the computer generate a different target string after the population converged and then going through the whole process again. All it requires is an outside loop that changes the target at the end of the first pass through the loop and then implementing another pass that converges to the new target (environment, “ground state”).
The second GA I ever wrote, back in the mid-1980s, was a maze-learner. I exposed the population to two different mazes in alternate generations. The interesting outcome was what amounts to speciation: Over generations the population split into two more-or-less equal subpops. One subpop was pretty good on one maze and not so hot on the other, and the other subpop was pretty good on the second maze and not so hot on the other. My company's GAs operate in an applied context in which the GAs model a dynamic external environment. We routinely see 'speciation,' which corresponds to subpops clustering on several (usually half a dozen or so) local peaks in the current selective environment. One can do an equivalent of what Mike suggests in several versions of Avida by suitably setting up the events.cfg file.

Ian Musgrave · 22 March 2009

It is now over a 144 hours since Dembski said “watch this space”, and no one, not Dembski’s Evolutionary informatics team, nor any of the Uncommon Dissent commentators has constructed a weasel program.

It looks like the commentators have accepted, in general, that Dembski's claim is wrong, but now they are describing what Dawkin's program does as "implicit" or "quasi"-locking. All without constructing an actual program to test their ideas. Amazing!

Flint · 22 March 2009

Amazing!

Or maybe not. I think they probably recognize the astounding power of feedback (weasel's original purpose), and understand that "random chance" or "tornado in a junkyard" approaches are NOT a reasonable model of how evolution works. So all that's left is to try to invalidate Dawkins' point while being very careful not to accidentally reinforce it. The thought process is only "quasi"-amazing: 1) Evolution does not happen. 2) When all models (and reality) demonstrate otherwise, go to step 1)

funkotron · 22 March 2009

Yeah the whole discussion of "quasi-locking" is amusing. The claim the parameters are fine tuned such that the program will always converge, which is true. And they say that the generations are large enough that it is very unlikely to produce a generation where all children are worse than the parent, which is true. But they don't seem to recognize that those things are THE POINT, not problems. Thats what random stuff with selection does.

One funny thing was the guy who claimed that it was easier implement latching than to get the parameters so carefully tuned. The tuning process took me about 30 seconds... I just upped the generation size till it converged in some reasonable time.

Mike Elzinga · 22 March 2009

RBH said: My company's GAs operate in an applied context in which the GAs model a dynamic external environment. We routinely see 'speciation,' which corresponds to subpops clustering on several (usually half a dozen or so) local peaks in the current selective environment.
[Emphasis added] This raises an interesting point that I think may be some of the source of confusion about what these kinds of programs do. The Dawkins’ Weasel program is simple enough to illustrate that the target string doesn’t have to be “complex”; it could be something like a string of a single character, including all spaces. I realize that Dawkins has tried to demonstrate how “Mount Improbable” is climbed. The fact that he used “Mount Improbable” is related to the complexity of the organisms that are produced by evolution and how they branch into so many different species (cluster about a number of peaks). The language of an “evolutionary landscape” and “climbing peaks” comes from this focus on complex organisms. This is a valid and useful perspective, but it also tends to play into the “entropy barrier” misconception. However, there is a more fundamental underlying perspective that comes from flipping that evolutionary landscape upside down and turning the peaks into “potential wells”. The reason is that all assemblies of condensed matter are jockeying around filling every potential well available. This is why the second law of thermodynamic is so important. That law describes the fact that all matter we see in this universe condenses into increasingly complex structures by shedding energy. By the time we get way up the complexity ladder to living organism, we have entered a regime in which there are literally “billions and billions” of available energy states. As long as the energy range in which these things exists lie in the energy range of liquid water, we see a lot of complex systems jockeying into available energy states. And that, in turn, means more complexity if the flux and variety of matter and energy is in the “Goldilocks zone”. All the ID/Creationist arguments about matter not being able to become more complex arise because they haven’t grasped the underlying fact that, at every level of complexity, matter is condensing into a myriad of potential wells. In a simple analogy, a viscous material gradually sags in a gravitational field into the shape of its container. The adjustments come from the rearrangements of the molecules that remain a part of the viscous material. In the case of self-replicating systems, these adjustments are accomplished by mutations and variability in the progeny. In effect, it is simply “replicated viscous material” with the modifications needed to sag into the shape of the “new container”. So I think most physicists would turn the evolutionary landscape upside down and speak of falling into potential wells. The result, because this is what matter does, is increasing complexity.

david w · 22 March 2009

Another python weasel:
http://theatavism.blogspot.com/2009/03/another-weasel.html,

Quite different than Anders one and doubt a less efficient way to do things (i'm not actually a programmer) but gets the job done, and implementing "locking" requires one additional line...

I will set it up to do enough runs to compare the locked and unlocked versions at some stage (but I think we all know the results)

Ian Musgrave · 23 March 2009

It is now over a 168 hours since Dembski said “watch this space”. The Dembski’s Evolutionary informatics team has announced that a weasel program has been constructed, and will be available soon (how many have we built and tested in that time?). None of the Uncommon Dissent commentators has constructed a weasel program, but a new commentator, Hazel, has done the maths for them (why did they not do it earlier). In defiance of William of Occam, and the evidence in Dawkins book, they are still insisting that Dawkins book program implements locking.

Oh yeah, don't feed the trolls folks.

dhogaza · 23 March 2009

None of the Uncommon Dissent commentators has constructed a weasel program, but a new commentator, Hazel, has done the maths for them (why did they not do it earlier?)
Because they don't have to match your pathetic level of detail? :)

RBH · 23 March 2009

Mike Elzinga wrote
So I think most physicists would turn the evolutionary landscape upside down and speak of falling into potential wells. The result, because this is what matter does, is increasing complexity.
Physicists are from Australia, standing on their heads. :) Sure, the conception as phrased in terms of potential wells is wholly appropriate. What's a sign change between friends?

Mike Elzinga · 23 March 2009

RBH said: What's a sign change between friends?
No negative effects on this side of the world. :-)

Dave Thomas · 24 March 2009

I got a couple of hours of programming time on the vanpool to/from Socorro today - here's my Python implementation of latching and no-latching in Weasels. The curves show averages of 10 runs each.

I must say, I'm not surprised anyone at UD has mentioned my 2006 article on Weasels, "Target? TARGET? We don’t need no stinkin’ Target!" (roadmap, here).

That's the summer that Salvador Cordova represented Uncommon Descent in a Design-off, and was handed his hat by an evolutionary algorithm.

Anyhow, a fun couple of hours doing the .py coding.

Cheers, Dave

Mike Elzinga · 24 March 2009

Dave Thomas said: The curves show averages of 10 runs each.
Dave, Those plots look like exponential decays (y = Ae-kx). And of course latching causes them to decay faster. This is very similar to radioactive decay in the presence of radioactivation. Latching shuts off the activation, making k larger. Any chance you could plot those curves on a semi-log plot (log vs linear)? I realize one has to be careful taking the log of zero in these stochastic results, but maybe plot with a small, non-zero offset.

Dave Thomas · 24 March 2009

Mike Elzinga said:
Dave Thomas said: The curves show averages of 10 runs each.
Dave, Those plots look like exponential decays (y = Ae-kx). And of course latching causes them to decay faster. This is very similar to radioactive decay in the presence of radioactivation. Latching shuts off the activation, making k larger. Any chance you could plot those curves on a semi-log plot (log vs linear)? I realize one has to be careful taking the log of zero in these stochastic results, but maybe plot with a small, non-zero offset.
I got another quality session on the carpool this morning. Here's your answer, Mike. I went ahead and calculated the K-values for the four analyses. Cheers, Dave

Mike Elzinga · 24 March 2009

Dave Thomas said: I got another quality session on the carpool this morning. Here's your answer, Mike. I went ahead and calculated the K-values for the four analyses. Cheers, Dave
:-) Very impressive, Dave! For the others who are playing around with Weasel, this is the kind of analysis that one can make with many of these programs that simulate a stochastic process in the physical world. At the stochastic level, it is very difficult to just look at the numbers and come to conclusions. However, as this example shows, the model is consistent with a known phenomena, in this case, a radioactive material decaying in the presence of activation, and then with the removal of the activation. It gives a somewhat different perspective on the model in that, even though the model captures a fundamental idea in evolution, that fundamental idea may itself be a part of a larger set of similar phenomena. As one enters different regimes in this process, for example as we begin to approach the outer edges of convergence, we should be able to see effects relating to fractal behavior. Log-log plots are often used here to look for power-law behaviors.

Mike Elzinga · 24 March 2009

I noticed over on UD that they are still stumbling all over the “targeted search” issue.

That is, in fact, a ghost issue. If a target is a problem, then all of nature has a problem whenever potential energy is minimized and the second law of thermodynamics is in effect (which it always is, of course).

Dave Thomas · 24 March 2009

Mike Elzinga said: I noticed over on UD that they are still stumbling all over the “targeted search” issue. That is, in fact, a ghost issue. If a target is a problem, then all of nature has a problem whenever potential energy is minimized and the second law of thermodynamics is in effect (which it always is, of course).
True enough. At least ROb was able to post some sense on this issue at UD, even mentioning my work on the Steiner Problem. This was my effort to move the discussion beyond simple bashing of "Dawkins' Weasel." Dave

mrg · 24 March 2009

I am no expert on genetic algorithms but I recall that in CLIMBING MOUNT IMPOSSIBLE Dawkins pointed to programs modeling the evolution of spiderwebs as working perfectly well without specifying any more as a target than "mutate and see if it catches flies better" and if it does, try again.

Astoundingly, the programs came up with various forms of spiderwebs that looked like different types of real spiderwebs. Gosh, who knew!

Mike Elzinga · 24 March 2009

Dave Thomas said: True enough. At least ROb was able to post some sense on this issue at UD, even mentioning my work on the Steiner Problem. This was my effort to move the discussion beyond simple bashing of "Dawkins' Weasel." Dave
And that was a pretty piece of work. It should have made the point with them, but only a few caught on.

Astoundingly, the programs came up with various forms of spiderwebs that looked like different types of real spiderwebs. Gosh, who knew!

— mrg
It’s hard sometimes to convey to the layperson the abilities of programs such as these to find solutions that can’t be imagined until they are found. But the underlying fundamentals of these programs have been around for a long time. They have simply become more powerful as computing power has grown. Many of us were writing these kinds of things on computers with “enormous memories” of 64K many years ago and wishing we had more memory and speed to work with. But this Weasel program of Dawkins is such a nice little teaching tool. It is simple enough to understand. It incorporates a fundamental concept from biology, and has an implicit connection to many other phenomena that are operating in the universe. It is by no means outdated.

Ian Musgrave · 24 March 2009

It is now over a 192 hours since Dembski said “watch this space”. The Dembski’s Evolutionary informatics team has announced that a weasel program has been constructed, but none has been posted on the Evolutionary Informatics site. None of the Uncommon Dissent commentators has constructed a weasel program. In the face of the video evidence and the mathematical evidence, the latest killer argument form the UD crew that Dawkins program really does lock is that Dawkins didn't mention letters reverting in his book, so therefore the program locks.

You couldn't make this stuff up.

Henry J · 24 March 2009

You couldn’t make this stuff up.

Who'd want to?

david w · 24 March 2009

Here's a couple of results of playing around with mutation rates and the like with the locking and non-locking versions.

As you might expect the 'locked' version performs much better than unlocked with very high mutation rates, since the letters that match the target in the parent string are protected in the offspring. All pretty obvious but it's fun to play around with!

Torbjörn Larsson, OM · 24 March 2009

Still an interesting thread. FWIW, there is a "Weasel" (i.e. locking) GUI over at the Evolutionary Disinformatics Lab, but AFAIU no link from Uninformed Dissent. I'm not sure if that is what you are waiting for. But I think I understand what the antics are playing up to: Marks (w Dembski) has two actual papers in preprint according to Marks' site, that they are going to highlight, or find "useful idiots" like me that likes to criticize their output to do it for them. The first is technical, applying the NFL on searches respectively "searches for searches", i.e. looking for convergent methods for the domain of interest. Nothing new, controversial, or actually helpful. The second, not yet up on the EIL site, is the "evolution killer". It implies that the programmer specifies the solution of a search, that evolution is a search process, both inaccurate but possible to slide by a reviewer, and finishes with:
[...] Computers, despite their speed in performing queries are thus, in the absence of active information, inadequate for resolving even moderately sized search problems. Accordingly, attempts to characterize evolutionary algorithms as creators of novel information are inappropriate. To have integrity, search algorithms, especially computer simulations of evolutionary search, should explicitly state (1) a numerical measure of the difficulty of the problem to be solved, i.e., the endogenous information, and (2) a numerical measure of the amount of problem-specific information resident in the search algorithm, i.e., the active information. [My bold.]
That seems to be all there is, nothing about evolution as such. (Even though examples are lifted from actual work on evolution of DNA.) Rather pitiful, if you ask me. Not that it can't be critiqued. For example, the "Weasel" is the same as above and described as partitioned search. The reference is Dawkins "The Blind Watchmaker"; according to Wikipedia Dawkins doesn't seem to describe his program that way but as choosing "however slightly most resembles the target phrase". Another problem is when the "monkey at the typewriter" is referred to as "random evolutionary search", when nothing evolutionary (biological or computer science) AFAIU does a random search. The cake is of course the claim above, in light of that they earlier presented the correct claim "When some offspring are correctly announced as more fit than others, external knowledge is being applied to the search giving rise to active information." Well, duh, the genome (or its computer equivalent) is learning from the outside environment (or the specific problem space that the program is applied to) that decides who is fit, or not - their own math shows this, if it isn't in error this time. [They have messed up earlier, but as they don't actually use the math on anything useful this time it is hard to tell if that is the case here too.] Accordingly, evolutionary algorithms find information not inherent in their construction. To have integrity, creationists, especially professors of engineering targeting evolutionary search, should explicitly state that. I think Marks have gone full circle, and has now resigned himself to be seated with the other mumbling "but I can see that it is design"-ists.

Torbjörn Larsson, OM · 24 March 2009

D'oh, I meant to describe Dawkins program as the Weasel, as opposed to the "Weasel" of creationists. In no way or form did I want to imply that the Weasel is necessarily latching. My apologies.

Torbjörn Larsson, OM · 24 March 2009

Actually, if I were a reviewer, I would descend like a hawk deciding who is fit to survive or not on the "especially computer simulations of evolutionary search" in the conclusions. It isn't supported by the paper. Not even by the childish trick of equaling brute search, long existing before the discovery of GA's, as a GA: just because a search is more difficult doesn't mean it is in need of the asked for specification.

Which specification I would also kick around mightily, since it would fill no practical or scientific purpose, even if it wasn't wrongly applied.

Mike Elzinga · 24 March 2009

To have integrity, search algorithms, especially computer simulations of evolutionary search, should explicitly state (1) a numerical measure of the difficulty of the problem to be solved, i.e., the endogenous information, and (2) a numerical measure of the amount of problem-specific information resident in the search algorithm, i.e., the active information.

— Torbjörn Larsson quoting EIL site
No mention of conforming to reality. I guess that doesn’t count.

Mike Elzinga · 25 March 2009

Well, I see over at UD that the Second Law is now being invoked against “locking”. “Errors in genetic transcription are ensured by the Second Law. If you lock certain letters, you are saying the SLoT is suspended for them, but not for others.”

What Morris and Gish put in place with their meme now dictates the entire thinking process of the ID community.

It even degrades their programming abilities. It's not the Second Law doing that.

Sigh.

Henry J · 25 March 2009

“Errors in genetic transcription are ensured by the Second Law. If you lock certain letters, you are saying the SLoT is suspended for them, but not for others.”

What the heck do they think locking has to do with the SLoT? As far as I know, SLoT doesn't prevent something from staying the same, outside of temperature shifts if it wasn't in equilibrium. But a change of a letter isn't a change in temperature. Henry

Dave Thomas · 25 March 2009

Evolutionary Informatics Lab's "Weasel Ware" is Missing "N" (you know, the "Population Size") I've been running a few sims over at Evolutionary Informatics Lab's "Weasel Ware" page, and I am shocked - shocked I say - at how little this has to do with the version of Dawkins' "Weasel" that I coded in python using the description on Wes's Weasel page. An example: I plugged in "ABCDE" as the Search Phrase at Evolutionary Informatics Lab's "Weasel Ware" page. Even before running anything, the tab under "Partitioned Search" (the only one of the three algorithms even remotely similar to "Weasel") declares that the "median number of queries" is 54. Compare that flat assertion to what I found using my python app for the 5-letter phrase "ABCDE", running 1000 simulations for each scenario:
Population = 100 With Latching:Average # generations (to convergence)= 15 ± 8.0 Without Latching:Average # generations = 17 ± 9.6 Population = 30 With Latching:Average # generations = 46 ± 25.4 Without Latching:Average # generations = 53 ± 31.1
It's obvious that population is an important parameter in "Weasel" - yet there is no way to enter "Population" on the Marks/Dembski "Weasel Ware" simulation. One more thing. The only time "latching" has any effect in the actual "Weasel" is in the rare case where one of the strings copied from the last generation's best string has two simultaneous mutations in opposite directions, like this one:
Gen. 50: METHIQKS IT IS JXKE A WEASEL (# correct = 25) Gen. 51: METHINKS IT IS RXKE A LEASEL (# correct STILL = 25) Note methiQks => methiNks, and Weasel => Leasel, for a net gain of zero.
Situations like this are the only cases where one can see a correct letter reverting to an incorrect letter. Going over to the EvoLab's "Weasel's Math" page just makes things weirder. Using the maths on that page, I found that the "median number of queries for partitioned search" for the Weasel string ("METHINKS IT IS LIKE A WEASEL", L = 28 and N = 27) is indeed 98.3 queries:
L=28 N=27 p=0.5 top=math.log(1.0-pow(p,1.0/L)) bot=math.log(1.0-1.0/N) print top/bot 98.33167127
Likewise, the "median number of queries for partitioned search" for the short string ("ABCDE", L = 5 and N = 27) is indeed ~54 queries
L=5 N=27 p=0.5 top=math.log(1.0-pow(p,1.0/L)) bot=math.log(1.0-1.0/N) print top/bot 54.1718907472
Reading the Evolab's "Weasel Math" page reveals that N is NOT the "population size" as in a real Dawkins Weasel run, but instead the number of allowed characters - 26 letters plus a blank space = 27 total. For a Binary alphabet (0,1), N=2; for a "DNA Alphabet" (ATGC), N=4. There is NO "population size" in the Evolab Weasel. Can someone ask the folks over at UD to look at what happens when N=30 versus N=100? That should drive them nuts!

Kevin B · 25 March 2009

Dave Thomas said: Evolutionary Informatics Lab's "Weasel Ware" is Missing "N" (you know, the "Population Size")
Please, Miss, can I have another weasel? This one's gone "Pop!"

Henry J · 25 March 2009

Nah, you guys will just have to ferret out your own weasel. :)

Reed A. Cartwright · 25 March 2009

Ian Musgrave said: Gahhh! Why don't PRE tags work properly here!
pre is not recognized. Use blockcode. You can also use verse to turn newlines into linebreaks. I'm a poet and I didn't know it. I'm a poet and I didn't know it. Produces:
I'm a poet and I didn't know it. I'm a poet and I didn't know it.
Remember, preview is your friend.

Mike Elzinga · 25 March 2009

Dave Thomas said: Going over to the EvoLab's "Weasel's Math" page just makes things weirder.
I could see that coming from the conversations over at UD. I was getting curious about whether or not their misconceptions would manifest themselves in the program; and they sure did. It’s almost like students “dry-labbing it” (faking results) in their science labs. When they don’t understand the concepts, the “results” scream loudly that they are fake. It’s clear they haven’t grasped the concept because it doesn’t show up in the behavior of the program.

Mike Elzinga · 25 March 2009

Henry J said:

“Errors in genetic transcription are ensured by the Second Law. If you lock certain letters, you are saying the SLoT is suspended for them, but not for others.”

What the heck do they think locking has to do with the SLoT? As far as I know, SLoT doesn't prevent something from staying the same, outside of temperature shifts if it wasn't in equilibrium. But a change of a letter isn't a change in temperature. Henry
The analogy of radioactive decay in the presence of radioactivation is an example of “locking”. It corresponds to a system in a meta-stable state that is decaying into a ground state far below the level of the meta-stable states. A mechanical analogy would be marbles sitting in dimples at the tops of peaks. A little vibration can dislodge them and they can tumble down the peaks, but not get back up. Unless the energy flowing into the system is sufficient to pop some of the marbles back up to the tops of the peaks, it’s a one-way trip down. On the other hand, one could have a system with many adjacent dimples with marbles occupying a few of them. Small vibrations can relocate the marbles among these. If there is a slight tilt in the plane of the dimples, that tilt can put a slight bias on where the marbles end up. But energy input could knock some of them back where they came from, or put others in their places.

Ian Musgrave · 25 March 2009

It is now over a 216 hours since Dembski said “watch this space”. The Dembski’s Evolutionary informatics team has announced that a weasel program has been constructed, but none has been posted on the Evolutionary Informatics site. An actual piece of code is finally being discussed. Unfortunately, Apollo's code has some errors. Commentator Hazel at UD points this out, and Apollo deals with the fRAND error, but not the other one (seriously, with a offspring number of 500 and 5% mutation rate the thing doesn't converge for over a 1,000 generations, when for a real weasel program, even a population of 30 will converge in less). So, now they are debating the results of an obviously flawed program (sigh). More strength to Hazel and Sal_Gal, who are trying to inject some sense over there.

Wesley R. Elsberry · 25 March 2009

Dave:

Situations like this are the only cases where one can see a correct letter reverting to an incorrect letter.

That's not right. A correct base in a previous generation can become an incorrect base in the best candidate from a subsequent generation when the population is small and the mutation rate is relatively high. N=30 and u=0.08 do pretty well in runs that often show at least one stepback in matches to the target. Have a look at this comment from the evolutionary computation thread.

Dave Thomas · 26 March 2009

Wesley R. Elsberry said: Dave:

Situations like this are the only cases where one can see a correct letter reverting to an incorrect letter.

That's not right. A correct base in a previous generation can become an incorrect base in the best candidate from a subsequent generation when the population is small and the mutation rate is relatively high. N=30 and u=0.08 do pretty well in runs that often show at least one stepback in matches to the target. Have a look at this comment from the evolutionary computation thread.
Good point, Wes. I guess I was attuned to the behavior of larger populations and smaller mutation rates. Certainly, some "backsliding" (i.e.; anti-latching) behavior can occur for the case I mentioned (good/bad mutations cancel out), but also the rarer cases where the new generation doesn't have even one member as good as the parent. Of course, backsliding could also accompany an increase in fitness with, say, 2 good and 1 bad mutations on a given copy of the parent (= the previous generation's best). Cheers, Dave

Wesley R. Elsberry · 26 March 2009

Latching and stepbacks in fitness of best candidates are two separate things, but having a stepback makes it obvious that latching cannot be happening.

Mike Elzinga · 26 March 2009

Over at UD some of the folks are getting a glimmer of the point of Weasel.

However, it appears that the fact that there is a target string is still a stumbling block. As long as that is in there, some of them seem to think some sort of teleology is involved, or that the result is somehow connected to design.

Staring into to the abyss of a “purposeless universe” is going to be a big hurdle for the ID community. It not only forces them to question sacred dogma, but it also highlights the fallacy of the lottery winner misconception.

They are going to have to untangle the notions of order/disorder, information, organization, self-organization, complexity, entropy, the second law of thermodynamics, and the fallacy of being special along with all their well-ingrained misconceptions about evolution.

The decades of intense and well-funded misinformation campaigns by the ID/Creationist institutes have clearly made their mark. And the science community has to clean it up. Oh well….

Mike Elzinga · 26 March 2009

From over at UD:

2. In the latching method, the mutation function does have knowledge of the fitness function while mutating is going on, as it has to know to not mutate a correct letter, so the fitness function does affect the mutation process.

Here is an example of the effect of teleological thinking. I reality, the target string could just simply represent a considerably more stable configuration in nature than any of the current ones. It doesn’t have to have any particular “complexity” or contain any particular “information”.

Ian Musgrave · 26 March 2009

It is now over a 240 hours since Dembski said “watch this space”. The Dembski’s Evolutionary informatics team has announced that a weasel program has been constructed, but none has been posted on the Evolutionary Informatics site. The errors in Apollo’s code has been corrected, but still no head to head comparison with "locking" vs non-locked versions has been produced. In a new post on evolutionary computation Dembski writes
Still, some of these evolutionary simulations seem more faithful to biological reality than others. Christoph Adami’s AVIDA, Tom Schneider’s ev, and Tom Ray’s Tierra fall on the “less than faithful” side of this divide. On the “reasonably faithful” side I would place the following three: Mendel’s Accountant: mendelsaccount.sourceforge.net MutationWorks: www.mutationworks.com MESA: www.iscid.org/mesa
Oh, the irony. (if anyone has actually got either Mendel's Accountant or mutation works to work, let me know)

mrg · 27 March 2009

Mike Elzinga said: However, it appears that the fact that there is a target string is still a stumbling block. As long as that is in there, some of them seem to think some sort of teleology is involved, or that the result is somehow connected to design.
Forgive if this has been brought up, but I was thinking once that the Weasel would be more apt reprsentation of evolution by natural selection if it incorporated rules of language and simply generated any text that made readable sense. That being incredibly difficult to do, the simple measure would be to give it a text file -- any text file -- and have it replicate a string of text of specified length somewhere from the file. Might be fun to fill the file full of names of different organisms and see which one it comes up with. Of course, this an idle thought, it would not impress the UD folks at all, and as all here know it would be a waste of time relative to what Dawkins was actually trying to demonstrate. MrG http://www.vectorsite.net

Divergence of B · 27 March 2009

See Wesley Elsberries superb Java Weasel as an example!
Wesley Elsberry's Weasel program is JavaScript, not Java. (Java and JavaScript are completely different things.) Sorry, the accuracy ape is on my back and makes me state these things.

Mike Elzinga · 27 March 2009

mrg said: Forgive if this has been brought up, but I was thinking once that the Weasel would be more apt reprsentation of evolution by natural selection if it incorporated rules of language and simply generated any text that made readable sense. That being incredibly difficult to do, the simple measure would be to give it a text file -- any text file -- and have it replicate a string of text of specified length somewhere from the file. Might be fun to fill the file full of names of different organisms and see which one it comes up with. MrG http://www.vectorsite.net
RBH mentioned some cases of speciation in his programs in an earlier post. What you suggest is not a difficult as it seems. I’m not a grammarian, so I don’t know how the grammar rules would go. I suppose one could take some hints from the evolution of language. However, there are lots of programs in physics that do essentially what you suggest. The processes have to fill multiple potential wells, or adapt to multiple conditions, or some such similar sets of conditions. The results are multiple, yet interconnected, solutions. In a different context and different perspective, they could be interpreted as “species”. Some of these programs include some very fancy fluid dynamics or magnetohydrodynamics calculations that generate all sorts of complex emergent phenomena we recognize in these systems. And there is nothing in these programs that tell the programs to make this stuff. It emerges and is relatively stable within certain energy and momentum ranges. Somewhere on one of these threads (I can’t seem to find it now) I mentioned putting an outer loop in Weasel that would change the target as the population converged. Starting with that now-current population, we would see it track the new target fairly quickly if the target was changed only slightly after convergence. Then you could repeat the outer loop as many times as you wished. As I said in that post, you could gradually see the population evolve from a weasel into a walrus. If you instead begin putting multiple targets in, and you allow the population to grow enough to have critical numbers to pursue each target, you could generate branching species, see some go extinct, and see others start taking over and crowding out others.

Dave Thomas · 27 March 2009

mrg said: Forgive if this has been brought up, but I was thinking once that the Weasel would be more apt reprsentation of evolution by natural selection if it incorporated rules of language and simply generated any text that made readable sense. That being incredibly difficult to do, the simple measure would be to give it a text file -- any text file -- and have it replicate a string of text of specified length somewhere from the file. Might be fun to fill the file full of names of different organisms and see which one it comes up with. Of course, this an idle thought, it would not impress the UD folks at all, and as all here know it would be a waste of time relative to what Dawkins was actually trying to demonstrate. MrG http://www.vectorsite.net
Also, there's the GA I developed to solve the Steiner Problem. Interestingly, the algorithm evolved a far superior answer to a public challenge than the best that UD's Salvador Cordova could design. Dave

A.S. · 28 March 2009

Much too late to the party, I guess. With my implementation (in R), it takes around 30 generations with locking, around 130 without locking, using the following parameters: 100 offspring per generation, 10 per cent probability for a mutation at any point in the string, only lowercase letters and whitespaces, best match gets selected and mutated again. Clearly, the lower the mutation probability, the less important locking becomes: with a 1 per cent probability, it takes an estimated average of 160 generations without locking and 120 generations with locking. This follows, I guess, from the fact that the lower the mutation probability, the lower the chance that a match once found will mutate again even without locking. On the other hand, with a mutation probablitiy of 99 percent, the target is never reached without locking, but it takes only a dozen generations to reach it with locking. I'm sure mathematicians and biologists have long known this, but to me it was quite surprising though it makes perfect sense after the fact. Also, I find it very funny that Dembski, who thinks he's a mathematician, doesn't understand the program and apparently cannot write a version that might help him understand it, while I, a mere linguist, was able to write my R script in a few hours. (And it can run with and without locking! And generation size, mutation probability, target string, etc. can be freely determined! And it can draw a pretty plot of what it is doing! And if anyone wants it, they can have it!).

IanR · 28 March 2009

Here I describe a link to an Excel macro weasel program I wrote, and give a run and the actual results that show that a run can revert away from the correct sequence.

Tani Hosokawa · 28 March 2009

Just so Perl gets a voice:

http://tanihosokawa.org/pandasthumb/weasel.pl

takes 5 command line arguments:

* verbose (display the best parent and generation)

* num_trials (how many trials to run of locked vs unlocked -- this is slow, bad perl code, don't go too high)

* target (defaults to "methinks it is a weasel")

* mutation_rate (% chance of a letter being changed)

* offspring (number of offspring per generation)

I think this took around 20 minutes, but I'm pretty wiped right now.

A.S. · 29 March 2009

Ah, forgot to post the link to the R script, here it is:

http://www.stefanowitsch.de/anatol/files/weasel.R.zip

Simply unzip, import into R using

> source("/YOUR_PATH/weasel.R")

and you have a new function in R, called weasle. This function has the following arguments:

weasel(string="SOMESTRING", probability=SOMENUMBER, offspring=SOMENUMBER, locking=(TRUE|FALSE), plot=(TRUE|FALSE))

The defaults are

string="methinks it is like a weasel"

probability=0.1

offspring=100

locking=FALSE

plot=FALSE

As is, the program can only deal with lowercase characters and whitespace in the string, but this is easily modified in the source code (as is everything else, there are extensive comments). Also, if you use plotting, the program exits without clearing the graphics window, i.e., if you run it again, the new plot will be added to the old. If you don't want this, run

> par(new=FALSE)

before running the program again.

Some examples:

> weasel()

This runs the program with the default values.

> weasel(string="evolution beats design", probability=0.08, offspring=30, plot=TRUE)

This runs the script with the target string evolution beats design, the mutation probability is 8 per cent, there are thirty offspring per generation, no locking is used, the output will be plotted)

> weasel(probability=0.01, offspring=250, locking=TRUE, plot=FALSE)

This runs the script on the default "methinks it is like a weasel", with a mutation probability of 1 per cent, 250 offspring per generation, WITH locking and without a plot.

Ellindsey · 30 March 2009

The main objection I can see to the Weasel program as not being a good demonstration of evolution is that the target string is embedded in the program from the start. I realize that the point of the original program was to demonstrate evolutionary generation of that specific string, but real evolution doesn't work towards a specific goal, just one that works.

Someone suggested that a better demonstration would be to evolve a valid, meaningful sentence. I don't know how to write a fitness function to test how meaningful a sentence is, but it's easy to test how much of a text string is made up of valid dictionary words. I have put together a Python script that evolves sentences, staring with random strings and scoring each string based on how close it is to being made up entirely of dictionary words. It works surprisingly well. The sentences it makes aren't terribly meaningful (last run's result was "SOW WHY SIZE FOOT ROOT ESCAPE WOOLEN") but it works surprisingly well, taking less than a hundred generations to settle on a valid sentence. Anyone have a way to mathematically evaluate the meaningfulness of a sentence?

I can email the code to anyone who wants it, or who (even better) wants to put it up where it can be downloaded.

Henry J · 30 March 2009

I have no idea how one could automate an evaluation of meaningfulness, but I'd think the next step would be rules of grammar: distinct subject, verb, object; check that adjectives and adverbs only in appropriate places to modify something; include an object phrase only for verbs that need one, not for those that don't; check that prepositions have an associated object; check that noun phrases appear only as subject, object, or content of prepositional phrases; etc.

That does however sound like a lot of work to implement.

Henry

Rilke's Granddaughter · 30 March 2009

You need to actually READ what Dawkins wrote. The Weasel program IS NOT INTENDED TO DEMONSTRATE EVOLUTION. It is intended to demonstrate the difference that SELECTION can make. It's NOT a model of actual evolution; it's a demonstration of how particular concept in evolution.
Ellindsey said: The main objection I can see to the Weasel program as not being a good demonstration of evolution is that the target string is embedded in the program from the start. I realize that the point of the original program was to demonstrate evolutionary generation of that specific string, but real evolution doesn't work towards a specific goal, just one that works. Someone suggested that a better demonstration would be to evolve a valid, meaningful sentence. I don't know how to write a fitness function to test how meaningful a sentence is, but it's easy to test how much of a text string is made up of valid dictionary words. I have put together a Python script that evolves sentences, staring with random strings and scoring each string based on how close it is to being made up entirely of dictionary words. It works surprisingly well. The sentences it makes aren't terribly meaningful (last run's result was "SOW WHY SIZE FOOT ROOT ESCAPE WOOLEN") but it works surprisingly well, taking less than a hundred generations to settle on a valid sentence. Anyone have a way to mathematically evaluate the meaningfulness of a sentence? I can email the code to anyone who wants it, or who (even better) wants to put it up where it can be downloaded.

Ellindsey · 30 March 2009

I am fully aware of what the Weasel program was intended to simulate, and stated so in my comment. You need to actually READ what I wrote.

Rilke's Granddaughter · 30 March 2009

Apparently you didn't.

"Weasel program as not being a good demonstration of evolution is that the target string is embedded in the program from the start. I realize that the point of the original program was to demonstrate evolutionary generation of that specific string, but real evolution doesn’t work towards a specific goal, just one that works."

Weasel was not intended to demonstrate evolution. Try again.

Ellindsey · 30 March 2009

Semantics. It was intended to generate how that specific string would be generated through mutation and selection. Which is evolution, although a very specific and limited case of it.

In any event my point was not to criticize the Weasel program itself. It's a fine demonstration of the power of selection. My point was to offer an example which demonstrated selection towards a target not predefined, but determined by a selection function that permits a different solution to be found each time the code is run. I though people might be interested.

Mike Elzinga · 30 March 2009

Ellindsey said: Semantics. It was intended to generate how that specific string would be generated through mutation and selection. Which is evolution, although a very specific and limited case of it. In any event my point was not to criticize the Weasel program itself. It's a fine demonstration of the power of selection. My point was to offer an example which demonstrated selection towards a target not predefined, but determined by a selection function that permits a different solution to be found each time the code is run. I though people might be interested.
I don’t think it is as much a question of semantics as it is of identifying and properly labeling the correct phenomena. In the Dawkins’ Weasel program, the illustration was how selection means a great deal in the convergence of random variation to some stable state. It is true that the presence of a target string has been confusing to many in the ID/Creationist community. However, if this had been program in which energy is gradually dissipated as the particles in question settled into a potential well, the issue might be a little clearer. For example, how one represents the potential well might be seen as putting in a target. But if you modeled, say, a flexible cable suspended from its two ends and flopping around in a gravitational field gradually dissipating energy, it would fall into a catenary curve that minimized its potential energy. The problem could be formulated as minimizing potential energy, finding a catenary, or simply gradually dissipating kinetic energy. I gathered from your wording of your objective that you may be more interested in a program that generates unanticipated emergent phenomena that is recognizable as some sort of “significant” pattern. That kind of thing happens in very complex programs in fluid dynamics where vortices emerge but aren’t programmed in. These kinds of emergent phenomena pop up in many other kinds of programs also. The question then becomes, “What is meant by a significant pattern; significant to whom?” And that question gets to the issues of assuming that what emerges is “special” in some way. That relates to the fallacy of the lottery winner. The emerging pattern, if it could contemplate its own existence, might think the process had its existence in mind, but in fact, many other emergent phenomena could have occurred also.

Henry J · 30 March 2009

The emerging pattern, if it could contemplate its own existence, might think the process had its existence in mind, but in fact, many other emergent phenomena could have occurred also.

And in the case of biological evolution, several million of them did just that. Henry

Rilke's Granddaughter · 30 March 2009

Nope. That's the entire point: IT WAS NOT INTENDED TO MIMIC EVOLUTION. It was designed to show how selection can radically improve the ability of random change to rech an end. NOT EVOLUTION. I'll repeat that; it's not intending to mimic evolution. Your comment implies that you don't really understand what evolution is.
Ellindsey said: Semantics. It was intended to generate how that specific string would be generated through mutation and selection. Which is evolution, although a very specific and limited case of it. In any event my point was not to criticize the Weasel program itself. It's a fine demonstration of the power of selection. My point was to offer an example which demonstrated selection towards a target not predefined, but determined by a selection function that permits a different solution to be found each time the code is run. I though people might be interested.

Dirk Esser · 10 April 2009

Sorry, could not resist. Here is a version in Common Lisp. Also included is a creationism-influenced version, which is amazingly fast: it converges in a single generation on average, even with an initial population of 0. So, ID/creationism might actually have a point...

Dave Thomas · 11 April 2009

Just in case anyone's watching - it has now been 562 hours since Dembski promised that "Evolutionary Informatics lab was going to try and reproduce Dawkins Weasel Program according to how it was actually written"

But, the "Weasel Ware" page is still unchanged, still mired in the past, still hung up on "latching," still wrong.

23 days and counting! Shall we start a pool? I'll pick St. Bartholemew's Day... 2098.
Dave

mrg · 11 April 2009

Dave Thomas said: ... still wrong.
Oh come now, since when did being wrong ever slow them down in the least? After all, if they had to give up every time they were wrong, they wouldn't be left with much to say. MrG http://www.vectorsite.net

learnignpython · 15 April 2009

I'm teaching myself python.

Has anyone tried to write a weasel program in python?

Mike Elzinga · 15 April 2009

learnignpython said: I'm teaching myself python. Has anyone tried to write a weasel program in python?
Here.

Henry J · 15 April 2009

I’m teaching myself python. Has anyone tried to write a weasel program in python?

Sure, but then the python ate the weasel, which pretty much ended the experiment. Henry

Dave Thomas · 22 April 2009

learnignpython said: I'm teaching myself python. Has anyone tried to write a weasel program in python?
And here. Dave

Mike Elzinga · 22 April 2009

Dave Thomas said:
learnignpython said: I'm teaching myself python. Has anyone tried to write a weasel program in python?
And here. Dave
Oops; my apologies, Dave. Your program was especially pretty.

Divergence of B · 29 August 2009

See Wesley Elsberries superb Java Weasel as an example!
Aaa! 1. s/Elsberries/Elsberry\'s/g 2. s/superb Java Weasel/superb JavaScript Weasel/g Java is not related to JavaScript. /Aaa!

Jeb, FCD · 29 August 2009

Anyone got it in Ruby?

Brian Macker · 30 August 2009

Your argument that a locking version is much harder to program is nonsense. Just check the character against he target string before you allow mutation. If it already matches then do not mutate. A single line test.

DiEb · 31 August 2009

Though all of the programs seem to implement the same fitness function (number of correct letters), I'd like to stress the fact that Dawkins's program would work with other functions as well. In his algorithm, he just states: The computer examines the mutant nonsense phrases [..] and chooses the one which, however slightly, most resembles the target phrase. These resembling could mean:
  1. as above, the number of correct letters
  2. the length of the longest correct substring
  3. the number of correct vowels times the number of correct consonants
  4. how many letters are correct at the beginning of the string
  5. etc.
The fitness function could work as an oracle: you send the strings of a generation to it and it delivers back (one of) the best string(s) (here the problem arises of stopping the program). But this approach
  • emphasizes the exchange of information between the search algorithm and the search space - something in which Dembski should be interested
  • helps to get rid of the perception that the computer searches something it already knows

DiEb · 31 August 2009

Brian Macker said: Your argument that a locking version is much harder to program is nonsense. Just check the character against he target string before you allow mutation. If it already matches then do not mutate. A single line test.
Yes, that's easy: but you introduce your knowledge of the target phrase for a second time - not only for calculating the fitness...

fnxtr · 31 August 2009

Henry J said:

“Errors in genetic transcription are ensured by the Second Law. If you lock certain letters, you are saying the SLoT is suspended for them, but not for others.”

What the heck do they think locking has to do with the SLoT? As far as I know, SLoT doesn't prevent something from staying the same, outside of temperature shifts if it wasn't in equilibrium. But a change of a letter isn't a change in temperature. Henry
Late to the party again. "Latching" could also represent a survival attribute which has become crucial... like the ability to produce amylase in saliva. :-p