Methinks it is [still] like a weasel

Full screen version


A couple of years ago I created an online Javascript version of Dawkins’ Weasel program. I was poking around at the code today and realised that it wouldn’t be too much work to remove some of its limitations to allow it to replicate the full 28 character phrase that Dawkins used.

If you’re unfamiliar with why anyone would want to make an program like this, take a look at the original post where I explain how genetic inheritance combined with natural selection gives vastly different results to the mistaken creationist view of evolution being a ‘monkeys with typewriters’ kind of randomness. (by the way, if you change the settings so that there is only one child per generation the program will enter ‘monkeys-with-typewriters mode’).

The main differences in this version are:

  • You can now hide or show all the mutant children that were not selected
  • You can use up to 30 uppercase A-Z letter plus spaces
  • There’s a new column that shows how many letters matched (so you can see how it occasionally slips back with higher mutation rates – contrary to what William Dembski would have you believe)
  • I’ve improved the performance slightly.

Tags: , , , ,

7 Responses to “Methinks it is [still] like a weasel”

  1. …you are the ‘tech-o skepto’! :)

    Can you tell me how the ‘target’ function works? Surely (I don’t suspect you’d disagree), this is a case of the programme being discontinuous with the strictly ‘blind’ watchmaker of natural selection, yes? Not in the sense that we can see a phrase (or a watch) after the fact, which we can, but in the sense that the process has an inherent goal of making a phrase (or a watch) before the fact, which one does (the programme) and one doesn’t (natural selection).

    Agree?

  2. Damian says:

    Ah, sorry, I just read and replied to your post over on your blog before reading this one. Quite right. This isn’t an accurate evolution simulation because it knows the ‘goal’ to aim for. In real evolution it’s the environment that does the ‘selecting’.

    But it’s very handy for showing how evolution isn’t at all like the random ‘monkeys with typewriters’ process that some creationists have tried to make it out to be.

  3. Damian says:

    Heh, I’ve just looked at the original post and you asked:

    I’m curious about the concept of a ‘target phrase’? Biologically speaking, there are no ‘target’ organisms correct? Only organisms which survive/replicate in the current environment, right? Might just be semantics (I’m always picky with words!)? :)

    Where David Winter replied,

    Yeah, Dawkins was specifically addressing the “if a hurricane blew through a Boeing shed you wouldn’t get a 747 argument”, the weasel algorithm is simply meant to show that random change + cumulative selection is orders of magnitude more creative than chance alone.

    Deja vu? :)

  4. Deja vu? :D

    Yeah, just a tad embarrassing that I asked pretty much exactly the same question back then! :)

  5. Damian says:

    I’m going to re-post this in another two years as a test ;)

  6. AskAnAtheist says:

    Holy COW that’s fantastic!! I have to admit that’s the very first time I’ve seen a genetic algorithm written in JavaScript. Well done, mate!

    (nice coding style by the way – very elegant!)

Leave a Reply