Now on ScienceBlogs: The Galaxy's Biggest Valentine

ScienceBlogs Book Club: Inside the Outbreaks

Search

Profile

pzm_profile_pic.jpg
PZ Myers is a biologist and associate professor at the University of Minnesota, Morris.
zf_pharyngula.jpg …and this is a pharyngula stage embryo.
a longer profile of yours truly
my calendar
Nature Network
RichardDawkins Network
facebook
MySpace
Twitter
Atheist Nexus
the Pharyngula chat room
(#pharyngula on irc.synirc.net)



I reserve the right to publicly post, with full identifying information about the source, any email sent to me that contains threats of violence.

scarlet_A.png
I support Americans United for Separation of Church and State.

Random Quote

…whatsoever person or persons withing this Province … shall from henceforth blaspheme God … or shall deny our Saviour Jesus to be the Sonne of God, or shall deny the Holy Trinity, the Father, Sonne and Holy Ghost, or the Godhead of any of the said Three persons of the Trinity or the Unity of the Godhead … shall be punished with death and confiscation or forfeiture of all his or her lands…

[Maryland's "Tolerance Act", 1649, often hailed as the first law for religious "freedom" in the colonies]

Recent Posts


A Taste of Pharyngula

Recent Comments

Archives


Blogroll

Other Information

« Gay conversion works! If you ignore the data and the methods, that is | Main | A couple of gems from AiG »

More articles by PZ Myers can be found on Freethoughtblogs at the new Pharyngula!

But why would Dawkins want to win a copy of his own book?

Category: CreationismKooks
Posted on: August 29, 2009 12:28 PM, by PZ Myers

Denyse O'Leary has a contest: provide a copy of the source code to Dawkins' Weasel demo. The prizes are your choice of a copy of Dawkins' new book, The Greatest Show on Earth, or Meyer's creationist apologetic, Signature in the Cell. It must be like that television game show where you get to choose door #1 or door #2, and one door hides a free vacation in the Bahamas while the other hides a goat.

It's a very silly contest because a) only Dawkins could win it, and he conjures up Bahamas-quality books all the time, and probably doesn't want a copy of Stephen Meyer's rank little goat, and b) the question has already been settled.

The issue that has the creationists so worked up is whether the program used 'latching' or not. That is, this is a simple program originally written in BASIC that starts with a random string of characters, and changes them randomly, retaining the randomized versions that most closely match an arbitrary search string (in this case, "METHINKS IT IS LIKE A WEASEL"). They are hung up on this claim that the program 'cheated' by protecting individual letters that matched the search string from further changes.

It doesn't matter.

If the original program did commit such fudgery (and it clearly didn't), it wouldn't affect the state of evolutionary biology at all. It was a simple demonstration program to help teach a basic concept. Move on, people, move on.

This was also a very, very simple program. Anyone who can write even a simple program in any computer language can whip up a version of this program in hours, and if you have any significant programming skills, it will take you a few minutes. Try it with latching, try it without. Even without it, it works just fine in matching the search string in short order.

People have done just that, it really is trivial. Except, unfortunately, for the creationists at the Discovery Institute, who are still obsessed with and baffled by a short, elementary computer program written by a biologist in a short evening. It's no wonder they're stumped by a cell!

Share on Facebook
Share on StumbleUpon
Share on Facebook

Jump to end

TrackBacks

TrackBack URL for this entry: http://scienceblogs.com/mt/pings/118710

Comments

#1

Posted by: jeremy | August 29, 2009 12:35 PM

Hahahahahahahahahaha

#2

Posted by: SC, OM | August 29, 2009 12:36 PM

and one door hides a free vacation in the Bahamas while the other hides a goat

I've been to the Bahamas a couple of times. I think I'd prefer the goat.

#3

Posted by: 'Tis Himself, Quel Dommage Author Profile Page | August 29, 2009 12:38 PM

No wonder Dembski and his buddies at the Disco Tute are baffled. Dawkins' program is simple and straight-forward. They're looking for complexity where it isn't.

#4

Posted by: Richard Harris | August 29, 2009 12:41 PM

It's no wonder they're stumped by a cell!

You've gotta admit that cells are damned complex. Of course, they've had a few billion years of evolution to get that way. And what with the huge numbers of individuals & their short 'generation' time, natural selection has had plenty of material to work with.

The numbers involved are beyond human comprehension. And if you're nutjob enough to believe that the Earth's only about 6 000 years old, then you're bound to be stumped.

#5

Posted by: Bob O'H | August 29, 2009 12:42 PM

To answer your question in your title - because it's funny.

#6

Posted by: Nerd of Redhead, OM Author Profile Page | August 29, 2009 12:44 PM

Hmmm...I've re-engineered assembly code to understand how some subroutines worked. Didn't take any rocket science, just plain follow the codes, know what they do, and see what happens. A basic program should be even easier to follow and figure out. Especially if there are less than 100 lines. I suspect their problem is with the bioware.

#7

Posted by: Lynnai | August 29, 2009 12:44 PM

20 years and they can't figure out BASIC?

For the love of all that's even remotely fun don't let them have a hammer! If they can't grok that I fear what they would do with themselves with a weight on a lever.

#8

Posted by: raven | August 29, 2009 12:46 PM

I'll add that numerous weaseloid programs are available for free download all over the internet.

It took me 1 minute with google to locate a cache of them.

Creos: "Thinking, you are doing it wrong."

#9

Posted by: Divalent | August 29, 2009 12:48 PM

The prize offer is even more bizarre, because she states that she doesn't actually have a copy of Dawkin's book to give away. So she will ask Dawkin's publicist to provide one to the winner. What a gal!

#10

Posted by: Joachim | August 29, 2009 12:49 PM

METINKS THEY ARE REWARDED

#11

Posted by: Cheesis K | August 29, 2009 12:52 PM

Ha ha that's another thing that creationists don't get about science: that it's reproducible (by anyone with half a brain).

#12

Posted by: arachnophilia | August 29, 2009 12:57 PM

you can't even win dawkins' book. you actually denyse o'leary sending a nice letter to dawkins' publicist, asking dawkins' publicist to provide a copy of dawkins' book.

and really, if she could do that, well, the contest wouldn't even exist anyways. because if she could, you know, just write to dawkins and be taken seriously, she'd have a copy of the program already.

it's just another fake controversy over a non-issue. not only is not evolutionary biology she's whining about, it's not even an analogy for evolutionary biology. it's just a demonstration of why selection > random chance. but, i think the IDiots have some kind of obsession with analogies or something. as if a mousetrap (which we'll agree is designed by an intelligent agency) is a good analogy for a biological system.

#13

Posted by: Lou FCD | August 29, 2009 1:00 PM

The best entry I've seen so far comes from AtBC denizen steve_h.

#14

Posted by: Siamang | August 29, 2009 1:01 PM

What I want to know is why do these discovery people keep MENTIONING weasel? It would be like Bill Clinton bringing up Blue Dresses all the time?

Dumbasses, SHUT UP about Weasel. It's a stupid little program that proves you completely wrong in 40 lines of code.

Here it is, dumbasses:

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

Run it yourselves, dumbasses.

Play with this java version, double-dumbasses:

http://www.antievolution.org/features/ec/weasel102.html


#15

Posted by: tytalus | August 29, 2009 1:04 PM

After reading some of the comments over on uncommon descent, I think I see the reason they want the original code. At first I thought it just a neat conspiracy theory -- although it is that; after all, how would anyone verify any program that Dawkins or anyone else handed over? Would it have to be loaded on a decades-old floppy disk with no signs of tampering or subsequent modification? heh. Conspiracy without end, amen.

But after reading the comments I see a new purpose for it. It's about Dembski's claim about the program being flawed; it's about Dembski's credibility. I realize that notion will send people around here rolling about on the floor cackling and such. But however much a fringe madcap the fellow may be, he has his defenders. So I suspect this idea of defending Dembski's honor plays into it.

#16

Posted by: ckitching | August 29, 2009 1:08 PM

There are loads of weasel-copy programs out there. Some as trivial as mentioned, and some as advanced as one that recreates an image via randomly generated polygons*. The technique obviously works, and is the subject of research in computer science.

These people can't even object to the program for it's real faults. This is rather surprising considering Dawkins pointed them all out in his book. I suppose they probably never actually read it, though.


* http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/

#17

Posted by: wice | August 29, 2009 1:10 PM

i'm afraid at least some of them know very well, that anyone could (and many people actually did) write a program following dawkins' description in the book, that does exactly what dawkins' original program did, and that the program would work perfectly. actually, if any of the creationists is capable to understand a program (which i have to assume, because otherwise there would be no use to ask for it), then he or she is obviously capable to write one by him/herself.

but they are not in the trying-to-understand-things business. they are in the defamation business. and they know perfectly well, that most of their fans know close to nothing about programming or anything else, so they will easily believe, that it actually matters whether or not we have the original program created by dawkins.

#18

Posted by: Mike Haubrich, FCD | August 29, 2009 1:12 PM

C'mon Siamang! You know as well as I do that these are merely the "Short form." They want the original "long form." They want to know and they have a right to know what Dawkins is hiding.

He was born in Kenya, after all.

What will they do with the Holy Code if they get it? What would it show or prove? Do they have any idea how stupid this makes them look, how much more shrill and inane?

#19

Posted by: JefFlyingV | August 29, 2009 1:13 PM

tytalus you are right on target with your assessment. Dembski's paper was supposed to catapult the Disc.Inst. to the forefront of scientific acadamia, but it further marginalized the "great Scientists" of that institution. Probably the worst was when non-scientists could show the Dembski paper to be junk.

#20

Posted by: tresmal | August 29, 2009 1:15 PM

To be fair, I think she is asking for the long form.

#21

Posted by: Jarred | August 29, 2009 1:15 PM

Here's one I whipped up in 10 minutes: http://pastebin.com/m3f79933b

#22

Posted by: brnofeathers | August 29, 2009 1:17 PM

WHAT!?! PZ, are you trying to say that Dawkin's weasel program ISN'T the core foundation upon which all of the biological sciences are built???

#23

Posted by: Prazzie | August 29, 2009 1:19 PM

This silliness is hilarious enough on its own, but such gems as PZ's description of Stephen Meyer's "rank little goat" and Ian Musgrave's comment at one of the linked articles that "anyone with an IQ above room temperature could figure [it] out" made it even funnier.

#24

Posted by: Dania Author Profile Page | August 29, 2009 1:24 PM

Creos: "Thinking, you are doing it wrong."

I don't think they're doing it at all.

I mean, how stupid does one need to be to come up with this "brilliant" contest? And what the hell are they doing wasting so much time with this kind of thing? It makes them look ridiculous.

#25

Posted by: Siamang | August 29, 2009 1:24 PM

A little explanation. Richard Dawkins wrote this program in BASIC on his apple computer in the mid 1980's.

It is a demonstration of cumulative selection. It's a demonstration to make a mathematical point about monkeys banging on typewriters producing shakespeare. Sure, if all their keystrokes were random, then it would take forever.

BUT, if each generation could be selected for fitness, then interbred into the next generation, with a little bit of mutation for an engine, then selected, interbred, mutated, selected, interbred, mutation.... voila.

This is STANDARD computer science these days. Genetic algorithms design bridges nowadays. But in the mid 80's I'm sure it was somewhat of a novelty.

Conversely, the Discovery Institutes who declare that only intelligence can create new useful information and designs, don't think that any of this stuff is possible. I can't understand why. Complexity can't arise from simple rules to these people. Complexity only comes top-down from an even more complex Ubermind, for them, I guess.


Anyway, they claim Dawkins cheated. They claim that each letter just spins around until it hits the target letter, then locks. Like some slot machine.

Which is why I said above, "hey dumbasses look at the code, run the programs."

What they cannot admit is that simplicity can birth complexity. And selection can create an ORDERED complexity. OH LORDY JESUS!


#26

Posted by: NewEnglandBob Author Profile Page | August 29, 2009 1:25 PM

I am surprised they didn't offer a reward in the next life.

#27

Posted by: KemaTheAtheist | August 29, 2009 1:37 PM

He mangles biology and evolution (and many other sciences), but now he's gone into computer science for his validation? This guy doesn't know when to shut up.

And, it's just absolutely ridiculous. It's just a genetic algorithm. This is like week 2 of an AI class.

ANY genetic algorithm has the same basic behavior as the weasel program, and they're EASY algorithms to write compared to something like a double recursive alpha-beta pruning algorithm.

1.) Generate random population
2.) "Mate" to make new children (i.e. swap portions of the string at a random point).
3.) Mutate
4.) Evaluate and kill off weakest X percent
5.) Repeat from step 2


Dammit. I thought I was safe from IDiots treading in my field of computer science. If I can find my old TI calculator maybe I will write the weasel program on it for fun.

#28

Posted by: tmaxPA | August 29, 2009 1:39 PM

It doesn't matter.

Another example of this resistance to facts we humans seem to exhibit so thoroughly. If it didn't matter, they wouldn't keep bringing it up.

It does matter.

That's the whole point. What matters to them is what matters, since they're the ones we're trying to convince. (No protestations please; if we don't want them ruining our country/planet, then we're trying to convince them we're right.) And it isn't a trivial mistake on their part, but on yours, thinking that because a latching version would not appreciably enhance the performance of a Weasel compared to randomness without selection, it therefore can't possibly be important.

They are trying to explain to you what they don't understand about your position, and you are ignoring it because, after all, they should understand it.

You know how human brains aren't as good at assessing probabilities as objective calculations are? Well, aside from the fact that it is a fallacy to suppose that that is what brains are supposed to do, it is a feature that we can learn to understand and, then, use to our benefit. The probability that a latching pseudo-Weasel can produce results does not astound them, nor should it, and we all agree on this. But the probability that an actual Weasel program works as observed simply makes their brains melt into puddles of goo. They cannot process that simple little bit, even though, from our supposedly more objective perspective, that is a trivial bit made all the more trivial because it only marginally improves over the performance of a latching version.

So I can't say I know exactly what that means, and I anticipate little more than a tirade of snarky responses from those who would prefer to simply dismiss, rather than confront, the mental dysfunction we call religion (lest we find it infects ourselves as well in less supernatural garb), but I know that it is anything but trivial.

Why would they find a non-latching selection program such as Weasel impossible to believe? That's not a question I think any atheist should think is trivial or beside the point.

It's no wonder they're stumped by a cell!

Generally, when I find I don't have the answer to a question, I'd classify it as "a wonder" rather than as a "no wonder". You see what I'm saying? I'll admit, a cell's inner workings are far more incomprehensible than a simple BASIC program. But let's not forget that, however much our knowledge has advanced in recent years, we can't honestly claim that science understands the entire vast intricacy of the evolution and functioning of the cell.

What is a wonder, then, I think, is that they aren't stumped by the cell, in that they cannot marvel at its intricacies without chalking it all up to intelligent design, even though they themselves admit they cannot comprehend a software algorithm which they themselves can easily implement.

Let's call it the event horizon of ignorance beyond which their neural activity ceases to be logically productive. Ignoring where its boundaries are is no way to try to understand it.

#29

Posted by: llewelly | August 29, 2009 1:42 PM

There is a section in TGD in which Dawkins argues that some creationists are very intelligent, and some are both intelligent and well education (I think he uses Kurt Wise as an example.) From a purely functional standpoint, people like Denyse O'Leary are fighting hard to get that section removed from TGD.

#30

Posted by: Strangel Author Profile Page | August 29, 2009 1:45 PM

Hey, I like sgaio, sgais, ggais, ggats, goats.

#31

Posted by: Blake Stacey | August 29, 2009 1:46 PM

They are hung up on this claim that the program 'cheated' by protecting individual letters that matched the search string from further changes.

Without "latching", then nothing in the search program itself has to know the target phrase. In the Dawkinsian WEASEL, the only place in the computer's memory which has to store the phrase "METHINKS IT IS LIKE A WEASEL" is the fitness function itself, the code which takes a character sequence and counts up the similarities. The genetic algorithm which calls that function doesn't have a quote from Hamlet anywhere in it. When you realize what not having "latching" means, you start to realize just how stupid Dembski's claims about information being "hidden" and "smuggled" really are.

Dealing with Dembski and Marks's mathematics is like dealing with Velikovsky's astronomy: there's so little content that you end up having to do all the work yourself. In university science, we get used to having minor mistakes. "Oh, you forgot the minus sign in this formula," or "So-and-so's approximation is applicable here, so you can actually simplify this equation to one you can solve." The errors made by cdesign proponentsists trying to prop up their claims of cdesign are of a different kind altogether. Trying to correct them piecemeal is, to borrow Richard Feynman's example, like telling a guy in a cargo cult to improve the shape of his coconut headphones, or make the bamboo radar taller. Dembski and Marks can take all the logarithms they want, but John Frum isn't coming!

#32

Posted by: Paul Burnett | August 29, 2009 1:54 PM

PZ advises the creationists: "Move on, people, move on."

They quite literally can't. They are so obsessed with beating up on poor Darwin that they haven't noticed he's been dead for over a century. Obsessive-Compulsive Disorder is a sad thing - read http://en.wikipedia.org/wiki/Obsessive-Compulsive_Disorder - it describes creationists precisely.

#33

Posted by: Blake Stacey | August 29, 2009 1:55 PM

The probability that a latching pseudo-Weasel can produce results does not astound them, nor should it, and we all agree on this. But the probability that an actual Weasel program works as observed simply makes their brains melt into puddles of goo. They cannot process that simple little bit, even though, from our supposedly more objective perspective, that is a trivial bit made all the more trivial because it only marginally improves over the performance of a latching version.

The cdesign proponentsist fixation on "latching" says nothing at all about the validity of evolutionary science, but it's valuable data on creationist psychology. For example, it's one more item of evidence supporting the conclusion that Dembski couldn't find his own ass with two hands, a flashlight and GPS.

#34

Posted by: SteveC | August 29, 2009 1:58 PM

I wrote a weasel program a few weeks or months ago when Dembski started making noise about it. It took me all of 20 minutes. It's here:
http://scaryreasoner.wordpress.com/2009/03/28/methinks-it-is-like-a-weasel/

There's also a blog that's nothing but a collection of weasel programs in different languages:
http://like-a-weasel.blogspot.com/

#35

Posted by: JD | August 29, 2009 1:59 PM

Denyse. Hahahahaha. Hahahahaha. Damn, that felt good.

#36

Posted by: Eddie Janssen | August 29, 2009 2:00 PM

Joachim at 10 wins, although a starting line with something that hints at Dembski would be even better.

#37

Posted by: Frank Oswalt | August 29, 2009 2:02 PM

Sure, Dawkins can whip up a computer program in an evening that has had Dembski stumped for years, but IS HE THAN JESUS?

#38

Posted by: jose | August 29, 2009 2:05 PM

Actually writing the program without latching is simpler since you don't care about what letters shouldn't change, so you don't have to control what letters would have to be protected. You just generate mutations randomly (every letter has always the same chance of mutate) and keep the best individual of each generation, that's all.

#39

Posted by: se-rat-o-SAWR-us | August 29, 2009 2:08 PM

Latest weasel version at AE here: http://www.antievolution.org/cs/dawkins_weasel

Javascript from View>Page source:



// Stuff I'm learning about JavaScript...
// There apparently is no backpatching and thus forward references do not
// work. This means that some care has to be taken in the ordering of
// additions to the objects. For example, the "run_init()" method
// sets up the driver function to be called repeatedly via "setInterval()",
// but if the driver function is not declared first then the browser
// throws an error. I'm taking that to mean that I need to have
// definitions of variables used in the driver happen up front, and
// then have the "run_init()" function initialize them again, so that
// subsequent runs get stuff initialized correctly and the driver
// function can be declared without errors.

// Declare global object for DW run
// gdwr == Global Dawkins Weasel Run object
var gdwr = new Object();

// Add object variables
gdwr.gen = 0;
gdwr.inrun = 0;

// Link object variable to form names
gdwr.console = document.dawkins_weasel.dwconsole;

// Define object variables
// Need the letter pool
gdwr.pool = new Array(" ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");

// Initialize population with random strings
gdwr.pop = new Array();
gdwr.popsize = document.dawkins_weasel.dwpopsize.value;
gdwr.target = document.dawkins_weasel.dwtarget.value;
gdwr.mutrate = document.dawkins_weasel.dwmutrate.value;
gdwr.genview = document.dawkins_weasel.dwgen;
gdwr.mnumview = document.dawkins_weasel.dwmatchnum;
gdwr.closestview = document.dawkins_weasel.dwclosest;
gdwr.pnt = 0;
gdwr.lettercnt = 0;
gdwr.mutlettercnt = 0;
gdwr.actmutrate = 0;
gdwr.lastgenmatch = 0;
gdwr.stepbacks = 0;
gdwr.exactcopycnt = 0;
gdwr.exactcopy = 1;

document.dawkins_weasel.dwactmutrate.value = "0";
document.dawkins_weasel.dwstepback.value = "0";
document.dawkins_weasel.dwexactcopies.value = "0";
document.dawkins_weasel.dwgen.value = "0";
document.dawkins_weasel.dwmatchnum.value = "0";
document.dawkins_weasel.dwclosest.value = "";

gdwr.unmatched = 1;
gdwr.closest = new Array();
gdwr.thismatch = 0;
gdwr.maxmatch = 0;
gdwr.maxndx = -1;
gdwr.gen = 0;
gdwr.mutate = 0;
gdwr.maxgen = 1000;
gdwr.matchchange = 0;


// Incorporate methods in object

// Method for generating a random candidate
gdwr.make_random_candidate = function() {

candidate = new Array();
for (jj = 0; jj // Random
gdwr.pnt = Math.floor(Math.random()*gdwr.pool.length);
candidate[jj] = gdwr.pool[gdwr.pnt].toLowerCase();
}

return(candidate);
} // end make_random_candidate()

// Method for generating a possibly-mutated daughter from a parent candidate
gdwr.make_daughter_candidate = function(p) {

daughter = new Array();
for (jj = 0; jj gdwr.mutate = Math.random()*100.0;
// ta.value += "Mutate: " + mutate + ", Mutrate: " + mutrate + "\n";
if (gdwr.mutate // Pick a random letter from the pool
gdwr.pnt = Math.floor(Math.random()*gdwr.pool.length);
daughter[jj] = gdwr.pool[gdwr.pnt];
} else {
daughter[jj] = p[jj];
}
}

return(daughter);
}

// Method for stepping through a generation
gdwr.run_onestep = function() {

// gdwr.console.value += gdwr.gen + " (1)\n";

// Show generation in console
// this.console.value += "Gen. " + this.gen + "\n";

// gdwr.console.value += gdwr.gen + " (2)\n";


// ta.value = "";
//cleartextarea(document.dawkins_weasel.dwconsole);
// Increment generation
this.gen++;
//gdwr.gen++; // Increment generation counter
document.dawkins_weasel.dwgen.value = gdwr.gen;
document.dawkins_weasel.dwtotcand.value = gdwr.gen * gdwr.popsize;
gdwr.maxmatch = 0;

// gdwr.console.value += gdwr.gen + " (3)\n";


// Check strings for matches
for (ii = 0; ii gdwr.thismatch = 0;
for (jj = 0; jj if (gdwr.pop[ii][jj].toUpperCase() == gdwr.target.substr(jj,1).toUpperCase()) {
// ta.value += "Matching " + pop[ii][jj] + " to " + target.substr(jj,1) + ", thismatch=" + thismatch + "\n";
gdwr.thismatch++;
}
}
if (gdwr.thismatch > gdwr.maxmatch) {
gdwr.maxmatch = Math.max(gdwr.thismatch,gdwr.maxmatch);
gdwr.maxndx = ii;
document.dawkins_weasel.dwclosest.value = makestr(gdwr.pop[gdwr.maxndx]);
} else if (gdwr.thismatch == gdwr.maxmatch) {
//ta.value += "Gen. " + gen + ", " + maxmatch + " letters, " + makestr(pop[gdwr.maxndx]) + "\n";
}
// ta.value += gen + " " + ii + " " + thismatch + " " + makestr(pop[ii]) + "\n";
}

// gdwr.console.value += gdwr.gen + " (4)\n";


// Stepped back?
if (gdwr.lastgenmatch > gdwr.maxmatch) { // We have a stepback
gdwr.stepbacks++;

// Dump the current population to the console
gdwr.console.value += "Stepback detected, population dump follows:\n";
for (ii = 0; ii gdwr.console.value += makestr(gdwr.pop[ii]) + "\n";
}

}
document.dawkins_weasel.dwstepback.value = gdwr.stepbacks;
document.dawkins_weasel.dwmatchnum.value = gdwr.maxmatch;
gdwr.lastgenmatch = gdwr.maxmatch;

// gdwr.console.value += gdwr.gen + " (5)\n";

// Pick closest match
// it is at maxndx
arycopy(gdwr.pop[gdwr.maxndx],gdwr.closest);

// Display closest match
gdwr.console.value += "Gen. " + gdwr.gen + ", " + gdwr.maxmatch + " letters, " + makestr(gdwr.pop[gdwr.maxndx]) + "\n";

// If complete match, we're done
if (gdwr.maxmatch == gdwr.target.length) {
gdwr.console.value += gdwr.maxmatch + " Matched! in " + gdwr.gen + " generations.\n";
gdwr.console.scrollTop = gdwr.console.scrollHeight;
gdwr.unmatched = 0;
clearInterval(this.intval);
return true;
} else if (gdwr.gen >= gdwr.maxgen) {
// All's well that ends
gdwr.console.value += "No match in " + gdwr.gen + " generations, sorry.\n";
gdwr.console.scrollTop = gdwr.console.scrollHeight;
gdwr.unmatched = 0;
clearInterval(this.intval);
return false;
}

// gdwr.console.value += gdwr.gen + " (6)\n";

// Generate new population

for (ii = 0; ii gdwr.exactcopy = 1; // Assume true and then disprove it
gdwr.mcb = 0; // Assume false and then disprove it
for (jj = 0; jj gdwr.lettercnt++;
gdwr.mutate = Math.random()*100.0;
// ta.value += "Mutate: " + mutate + ", Mutrate: " + mutrate + "\n";
if (gdwr.mutate // Pick a random letter from the pool
gdwr.pnt = Math.floor(Math.random()*gdwr.pool.length);
gdwr.pop[ii][jj] = gdwr.pool[gdwr.pnt];
gdwr.mutlettercnt++;
gdwr.exactcopy = 0;
if ((gdwr.closest[jj].toUpperCase() == gdwr.target.substr(jj,1).toUpperCase()) && (gdwr.pop[ii][jj].toUpperCase() != gdwr.target.substr(jj,1).toUpperCase())) { // Changed match
gdwr.mcb = 1;
}
} else {
gdwr.pop[ii][jj] = gdwr.closest[jj];
}
if (gdwr.pop[ii][jj].toUpperCase() == gdwr.target.substr(jj,1).toUpperCase()) { // Character match
gdwr.pop[ii][jj] = gdwr.pop[ii][jj].toUpperCase();
} else {
gdwr.pop[ii][jj] = gdwr.pop[ii][jj].toLowerCase();
}
}
if (1 == gdwr.exactcopy) {
gdwr.exactcopycnt++;
}
if (1 == gdwr.mcb) {
gdwr.matchchange++;
}
}

// gdwr.console.value += gdwr.gen + " (7)\n";

gdwr.actmutrate = 100.0 * gdwr.mutlettercnt / gdwr.lettercnt;
document.dawkins_weasel.dwactmutrate.value = gdwr.actmutrate;
document.dawkins_weasel.dwexactcopies.value = gdwr.exactcopycnt;
document.dawkins_weasel.dwmatchchange.value = gdwr.matchchange;

// gdwr.console.value += gdwr.gen + " (8)\n";

gdwr.console.scrollTop = gdwr.console.scrollHeight;

return true;


}

// Method for initializing a run
gdwr.run_init = function() {
// Track inrun value as showing an active run
this.inrun = 1;

// Clear the console
this.console.value = "Beginning run\n";

// Set generations to 0
this.gen = 0;

// Other initialization
// gdwr.pop = new Array();
gdwr.popsize = document.dawkins_weasel.dwpopsize.value;
gdwr.target = document.dawkins_weasel.dwtarget.value;
gdwr.mutrate = document.dawkins_weasel.dwmutrate.value;
gdwr.genview = document.dawkins_weasel.dwgen;
gdwr.mnumview = document.dawkins_weasel.dwmatchnum;
gdwr.closestview = document.dawkins_weasel.dwclosest;
gdwr.pnt = 0;
gdwr.lettercnt = 0;
gdwr.mutlettercnt = 0;
gdwr.actmutrate = 0;
gdwr.lastgenmatch = 0;
gdwr.stepbacks = 0;
gdwr.exactcopycnt = 0;
gdwr.exactcopy = 1;

document.dawkins_weasel.dwactmutrate.value = "0";
document.dawkins_weasel.dwstepback.value = "0";
document.dawkins_weasel.dwexactcopies.value = "0";
document.dawkins_weasel.dwgen.value = "0";
document.dawkins_weasel.dwmatchnum.value = "0";
document.dawkins_weasel.dwclosest.value = "";

gdwr.unmatched = 1;
// gdwr.closest = new Array();
gdwr.thismatch = 0;
gdwr.maxmatch = 0;
gdwr.maxndx = -1;
gdwr.gen = 0;
gdwr.mutate = 0;
gdwr.maxgen = 1000;
gdwr.pnt = 0;
gdwr.matchchange = 0;
gdwr.geninterval = Math.max(1,Math.min(60000,document.dawkins_weasel.dwgenint.value));


// Generate a random parent for the first generation
gdwr.closest = new Array();
gdwr.closest = gdwr.make_random_candidate();

for (ii = 0; ii gdwr.pop[ii] = new Array();
gdwr.pop[ii] = gdwr.make_daughter_candidate(gdwr.closest);
for (jj = 0; jj gdwr.pop[ii][jj] = gdwr.pop[ii][jj].toLowerCase();
}
}


this.intval = setInterval("gdwr.run_onestep()",gdwr.geninterval); // Next step in one second
}

gdwr.run_stop = function() {
clearInterval(this.intval);
return false;
}
// OK, that's all for the object.

function cleartextarea(id){
id.value="";
}

function arycopy(inary,outary) {
// outary = (); // Clear the outary
for (mm = 0; mm outary[mm] = inary[mm];
}
}

function makestr(inary) {
var mystr = "";
for (mm = 0; mm mystr += inary[mm];
}
return mystr;
}


#40

Posted by: Blake Stacey | August 29, 2009 2:15 PM

Like every other larval-stage nerd who knew a little programming and a little biology, I wrote a WEASEL program. It took me an hour or so, when I was fifteen years old. Back at the end of March, I cooked up another implementation to pass an idle moment; as SteveC (#34) said, it took about twenty minutes, and most of that time was spent figuring out how many esoteric features of the Python language I could throw in.

A person who knows how science works sees thousands of people going off and independently reproducing Dawkins' results, and they say, "Neat! So, the details of Dawkins' original implementation don't matter that much. You can change around the types of mutation, the style of mating, the population size and all that. The result is robust." Having a dot-matrix printout of the original Apple BASIC might be an intriguing historical curiosity, like the paper Paul McCartney originally wrote "Yesterday" on, but it's not at all important for studying genetic algorithms themselves. Feynman did a lot of physics on the placemats of a local strip club; if those placemats had all been lost, would that make his published articles invalid?

Creationists are deeply plugged into a view of truth which sees it grounded in personal authority. As Hector Avalos says, "One understands nothing about creationism unless one understands that it is meant to be a system of ethics." Is and ought are terribly confounded in their thinking: they try to undermine the factual status of evolution by assaulting Charles Darwin's character. If the stories were true and Isaac Newton really was a cantankerous curmudgeon who died a virgin, would that mean that gravity was a lie, promulgated by atheist Communist scientists trying to hold America down?

#41

Posted by: Citizen Z | August 29, 2009 2:17 PM

Anyone who can write even a simple program in any computer language can whip up a version of this program in hours, and if you have any significant programming skills, it will take you a few minutes.

I think that's overly generous. Maybe an hour or two if you're a beginner, but this is "intro to programming" stuff. Pretty trivial. Seems like the average time for commenters that implement it themselves is 15 to 20 minutes.

It also makes these creationists look all the more pathetic.

#42

Posted by: Rakehell | August 29, 2009 2:18 PM

The more insight I get into the mindset of creationists, the more I wish I could return to a state of blissful ignorance about them.

#43

Posted by: bobxxxx | August 29, 2009 2:26 PM

the creationists at the Discovery Institute

I've been calling them "the retards of the Discovery Institute" or "the professional liars of the Discovery Institute" or "the idiots of the Discovery Institute", but from now on I will use PZ's much more insulting "the creationists of the Discovery Institute".

#44

Posted by: tmaxPA | August 29, 2009 2:31 PM

Jose FTW:

Actually writing the program without latching is simpler since you don't care about what letters shouldn't change, so you don't have to control what letters would have to be protected. You just generate mutations randomly (every letter has always the same chance of mutate) and keep the best individual of each generation, that's all.

And this is why the thought of the Weasel makes their head explode. It doesn't just prove evolution is possible, it proves it is LESS COMPLICATED than creationism.

#45

Posted by: Blake Stacey | August 29, 2009 2:31 PM

Also, am I the only one who reads "Stephen C. Meyer" and thinks, just for a moment, "Stephenie Meyer"? From all indications, Signature in the Cell is bad enough it might actually be improved by an emo sparkly vampire. . . .

#46

Posted by: Stephanie | August 29, 2009 2:49 PM

Is it acceptable if someone changes the desired code to something a bit more...interesting? I mean, the end product shouldn't really matter, right?

I suggest: "OLEARY IS QUITE THE ASSHAT"

#47

Posted by: mck9 | August 29, 2009 2:54 PM

As already noted, it really doesn't matter whether the program latches or not. It can get the same result either way, though the latching version may be a bit faster.

It is more bothersome that the end result is explicitly encoded in the program. It compares to a specific string and no other. Evolution certainly doesn't work that way, and it feels like cheating.

Even the original program serves to make Dawkin's point, for anyone willing to grasp it. However I find it more interesting to consider a fitness algorithm that isn't tied to a predetermined result.

Last weekend I tried my hand at such a program in C++. It scores for fitness by looking at how frequently different combinations of letters occur in succession. For example, in real English text, a T is much more likely to be followed by an H or an A than by a Q or a V. To get the frequencies of such combinations, I combined blocks of text from a dozen or so miscellaneous web pages and counted each combination of successive letters. In one version I looked at letters two at a time, and in another version I looked at them four at a time. I scored each string according to how often its internal letter sequences occur in real text. The program is necessarily non-latching, since there is no obvious way to define what a "correct" letter is.

In each run, after a few dozen generations every surviving string is about half random-looking gibberish and about half -- well, still gibberish, but looking more text-like. In particular I get a lot of instances of short, common words like THE, IN, and OF.

In any given run, all the surviving strings are descended from the same original (I kept track of that), and they all look pretty similar to each other. However every run produces a completely different set of strings, with the THE's and IN's and OF's and the like in different places.

Leaping recklessly to the obvious analogy: if we reran our own evolution from the beginning, we might end up looking like centaurs instead of humanoids. Or scorpions. Or cuttlefish.

A more sophisticated fitness algorithm might consider spelling and grammar, and eventually produce something more like real text. It might even allow multiple lineages to survive. I wouldn't consider such an experiment terribly profound as a metaphor for evolution, nor would it make Dawkin's point much better than he did, but it might be more difficult for creationists to dismiss.

#48

Posted by: Draken | August 29, 2009 2:57 PM

I read O'Leary's article at uncommondescent, internally mutated the characters and ended with METHINKS THEY ARE LIKE WEASELS.

#49

Posted by: Les Hemmings | August 29, 2009 3:00 PM

It's been done with more than a simple sentence too!

http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/

They really are clutching at straws aren't they?

Join the Evil Atheist Conspiracy! Give them something to moan about! ;o) http://twib.es/BKX

#51

Posted by: Guido | August 29, 2009 3:01 PM

It is just my imperfect understanding of American politics or the fetishist way they ask for the ORIGINAL CODE is pretty much like the birthers keep asking for the LIVE BIRTH CERTIFICATE or whatever it is?

I have exactly the same feeling, so stupid that is unbelievable.

#52

Posted by: Richard Dawkins | August 29, 2009 3:04 PM

http://www.youtube.com/watch?v=5sUQIpFajsg
About 6:10 seconds in, watch the 'Darwin' algorithm home in on 'METHINKS IT IS LIKE A WEASEL'. You will see (for instance at 6:16) that the program does not 'latch', because the W of weasel mutates and then comes back. It keeps winking on and off from W. Clearly no latching. However, as PZ and others have said, it really doesn't make a lot of difference whether the program 'latches' or not. These people are so unbelievably stupid.

I claim my trip to the Bahamas.

Richard

#53

Posted by: Blake Stacey | August 29, 2009 3:05 PM

Guido (#52):

You're not alone in noticing the resemblance.

#54

Posted by: mindbleach | August 29, 2009 3:06 PM

Are they really asking for source code to disprove a behavior that's completely incompatible with their only source of evidence? Watch the video closely. Watch it frame-by-frame if you can. Every correct letter changes multiple times. A solution-locking program wouldn't have even that brief flicker of random error.

They're asking for imagined confirmation of an imagined shortcoming driven by an imagined problem. It's exactly the same sort of fractally wrong thinking that led them to ID in the first place.

#55

Posted by: Kristine | August 29, 2009 3:09 PM

Dim O'Leary as NULL...

#56

Posted by: Elf Eye | August 29, 2009 3:11 PM

Do we call these weasel conspiracy theorists 'sourcers' or 'coders'?

#57

Posted by: not a gator | August 29, 2009 3:12 PM

I've been to the Bahamas a couple of times. I think I'd prefer the goat.

Come for the homophobic violence, stay for the cashmere and chèvre?

#59

Posted by: Anonymous | August 29, 2009 3:16 PM

Jeremy #1:
Yes, exactly my reaction, although I don't really LOL in front of the computer.

I imagine that every time PZ or other science bloggers write a post about those weasels dissing this BASIC program, ten new Methinks source files are written.

Even I was able to write something a few months ago, when PZ wrote about IDiots dissing this cute little program.

#60

Posted by: Zetetic Author Profile Page | August 29, 2009 3:20 PM

tmaxPA @ #28 said:

it isn't a trivial mistake on their part, but on yours, thinking that because a latching version would not appreciably enhance the performance of a Weasel compared to randomness without selection, it therefore can't possibly be important

Uh what?! No offense tmaxPA I think you're starting to lose it.
Yes a latching version of Dawkins Weasel program would be more efficient, but is doesn't need one to produce the results Dawkins' original programed attained. The non-latching version of the program is still using selection, the latching version just uses a stronger form of selection. It is trivial, in that they refuse to accept it since they already know that the non-latching version works, but that's not what they are really after.

They are trying to explain to you what they don't understand about your position, and you are ignoring it because, after all, they should understand it.
Not quite IMO. The creationists just desperately need to believe that Dawkins "cheated" because they are trying to score a very minor point on the credibility of Dawkins. In their minds... if Dawkins cheated on a toy program used to make a simple (and obvious) point, then all of evolution is wrong, and therefore GOD the "designer" did it!

They have many versions that all do the same basic thing, the problem is that they all work without latching and that doesn't work for them as propaganda to attack Dawkins' credibility and therefore impugn all of evolution. That is why they want Dawkins original program so they can prove that it latches, they want to have a "Gotcha!" moment, not try and understand anything

The fact that all of the hundreds of non-latching version all get the same result doesn't matter to them since it's about propaganda, not understanding evolution. That is why they are now resorting to birther-type cries of "Show us the original code!". Since their original attempt at propaganda failed they are now trying to salvage it, by whipping up phony mistrust about the original program. They are counting on the fact that it's very unlikely that anybody still has a copy of it. You seem to be crediting them with far too much intellectual honesty, naively thinking that what they say they want is what they really want. Remember? These are the same people that inadvertently created the term "cdesign proponentsists".
If they really wanted to understand the program, then they wouldn't be obsessing over Dawkins original code. They would just be looking at the hundreds of non-latching versions already out there. Why don't you understand that?

#61

Posted by: David Wiener | August 29, 2009 3:29 PM

There are a number of reverse compilers out there for BASIC. They recreate the BASIC 'source' from the compiled code. Sometimes the variable names are just X, Y, Z but in a small program like this it would not be so difficult to determine what those variables are.

Really - these ID fellows are either stupid, lazy, or liars. Pick TWO.

#62

Posted by: Jeff Author Profile Page | August 29, 2009 3:29 PM

@Stephanie: I suggest: "OLEARY IS QUITE THE ASSHAT"

Gen. 1, 5 letters, taoxjijilyauttbgdhcitsh jf...
Gen. 46, 26 letters, OLEARY IS QUITE THE ASSHAT
26 26 Matched! in 46 generations.

#63

Posted by: Michael Dickens | August 29, 2009 3:32 PM

It's always funny when clueless people ignore all the evidence they're presented with.

#64

Posted by: eddie | August 29, 2009 3:34 PM

Zetetic has highlighted the central point. It is not about the code. The fascists still imagine that, if they discredit Dawkins, there will be some loss of validity of the science. Same as with their Darwin Was Wrong!1!11 nonsense in New Scientist. There's a term for that; it's the fallacy of authority.

#65

Posted by: Jeff Author Profile Page | August 29, 2009 3:36 PM

@tmaxPA #28: What matters to them is what matters, since they're the ones we're trying to convince.

I'm not interested in convincing them; that would be impossible. I want them to sit in the back and shut up.

#66

Posted by: DiEb | August 29, 2009 3:39 PM

It's very easy to write a weasel algorithm. And it's surprising that Dembski and Mark had problems with doing so correctly. In their paper, they start with the phrase:
SCITAMROFN*IYRANOITULOVE*SAM
I calculated a next generation using Dawkins's algorithms with populations of 10,50 and 100 - and mutation rates of .04, .05 and .1. The tenth string in the list is the second generation given in the paper of Mark and Dembski. The differences with the first generation are in bold face:

1. SCITAMROFN*IYRANOIEULOVE*SAM
2. SCITAMROFN*IYRANOITULOGE*SAM
3. ECITAMRI*N*IYZANOITULOVE*SAM
4. SCITAMROFN*IYRANOITUL*VE*SAM
5. SCITAMROFN*IYRANOITULOVE*SEM
6. SCITAMOOLNOIYRAMOITULOVE*SEM
7. SCITANROFN*IYYANOITULOVE*SAM
8. SCITIMROFN*JYRANOITULOVE*SAM
9. SCITAMROFN*ICRHNOITSLOWE*SAV
10. OOT*DENGISEDESEHT*ERA*NETSIL

Can anyone spot a difference in the design of the strings? Wasn't there some explanatory filter to do so?
Heck, I even calculated the probabilities for latching...

#67

Posted by: Blake Stacey | August 29, 2009 3:40 PM

They are counting on the fact that it's very unlikely that anybody still has a copy of it.

It's still more likely than anybody finding an eyewitness transcript of the Sermon on the Mount. (The oldest manuscript copy of any Gospel text is the fragment P52, which contains a scrap of John 18, and which was written a century after the events it supposedly chronicles.) And they care far more about what Jesus might've said than we do about Dawkins' choice of mutation method.

#68

Posted by: Zetetic Author Profile Page | August 29, 2009 3:48 PM

@ Blake Stacey #68:
Ah... but for Jesus they have Faith™! So that doesn't count, at least not to them. The heathens clearly have no faith in the great and mighty Dawkins! ;-)

#69

Posted by: Citizen Z | August 29, 2009 3:51 PM

Do we call these weasel conspiracy theorists 'sourcers' or 'coders'?

How about "return true-thers". If it's one thing they're obviously not, it's "coders".

#70

Posted by: tresmal | August 29, 2009 3:58 PM

Rick @46: That was awesomely bad. Conjures up an image of Testes playing with a hand puppet: (in mocking voice) I'm PZ Myers hurrr hurrr hurrr!
The site it was posted on was cool though.

#71

Posted by: Jeff Author Profile Page | August 29, 2009 3:59 PM

Do we call these weasel conspiracy theorists 'sourcers' or 'coders'?

How about "sourcerers"? And you know what the Bible says to do with them.

#72

Posted by: se-rat-o-SAWR-us | August 29, 2009 4:02 PM

Nice weasal code collection at http://like-a-weasel.blogspot.com/.

Perl is the natural choice for a weasel program. I edited this one in a few seconds to allow for upper and lower case mutations. The key mutation line (which clearly shows that no locking is taking place) is:

substr($new_s[$i],int(rand($let)),1,chr($chr));

Executing this from the command line yields,

% ./weasel | awk 'NR==1;{c=$0;}END{print c;}'
Generation 0, 21 mismatches: Creationism is nonsense
Generation 70042, 0 mismatches: METHINKS IT IS A WEASEL


On OS X, Linus, *NIX, save this in the ASCII file "weasel", then chmod a+x weasel, then ./weasel:


#!/usr/bin/perl -w

$|=1;
$s="Creationism is nonsense";
$e="METHINKS IT IS A WEASEL";
$try=11; # New offspring per generation.

$let=length($s);
@e=split(//,$e);

# Print the starting string
$n=0;
# Count the characters in the new string that match the target string
@spl=split(//,$s);
$j=0;
$new_sc[0]=0;
while($j printf("Generation %5d, %-2d mismatches: $s\n",$n,$let-$new_sc[0]);

while($s ne $e) {
$i=-1;
# Make $try new strings.
while($i++ $new_s[$i]=$s;

# Mutate one character of the new string
$chr = int(rand(27));
if ($chr eq 0) { $chr=32; }
else { $chr += (int(rand(2)))? 64 : 96; }
substr($new_s[$i],int(rand($let)),1,chr($chr));

# Count the characters in the new string that match the target string.
@spl=split(//,$new_s[$i]);
$j=0;
$new_sc[$i]=0;
while($j }

# Find high scoring offspring strings.
@sc = sort {$new_sc[$b]$new_sc[$a]}(0..$#new_sc);

@new=(shift @sc);
while(@sc && $new_sc[$sc[0]] == $new_sc[$new[0]]){push @new,shift @sc}

# Set new string to a random offspring strings from among the high scoring offspring.
$s = $new_s[$new[int(rand(@new))]];

printf("Generation %5d, %-2d mismatches: $s\n",++$n,$let-$new_sc[$new[0]]);
}

#73

Posted by: Zetetic Author Profile Page | August 29, 2009 4:03 PM

@ Citizen Z #70:
I don't think the problem is that they can't code it. Rather it's they whenever they do code it, it always give the results that they don't want (namely: it works). "Curse you logic!" is what they must be saying to themselves.

Non-Garbage In, Non-Garbage Out!

That's their problem.

#74

Posted by: Jeff Author Profile Page | August 29, 2009 4:04 PM

Rick @46: That was awesomely bad. Conjures up an image of Testes playing with a hand puppet: (in mocking voice) I'm PZ Myers hurrr hurrr hurrr!

P-Zed. Heh!

If we didn't know he was a Pastor, I'd assume he lived in his parents' basement.

Actually, we don't know that he's a pastor.

#75

Posted by: se-rat-o-SAWR-us | August 29, 2009 4:05 PM

Nice weasal code collection at http://like-a-weasel.blogspot.com/.

Perl is the natural choice for a weasel program. I edited this one in a few seconds to allow for upper and lower case mutations. The key mutation line (which clearly shows that no locking is taking place) is:

substr($new_s[$i],int(rand($let)),1,chr($chr));

Executing this from the command line yields,

% ./weasel | awk 'NR==1;{c=$0;}END{print c;}'
Generation 0, 21 mismatches: Creationism is nonsense
Generation 70042, 0 mismatches: METHINKS IT IS A WEASEL


On OS X, Linus, *NIX, save this in the ASCII file "weasel", then chmod a+x weasel, then ./weasel:


#!/usr/bin/perl -w

$|=1;
$s="Creationism is nonsense";
$e="METHINKS IT IS A WEASEL";
$try=11; # New offspring per generation.

$let=length($s);
@e=split(//,$e);

# Print the starting string
$n=0;
# Count the characters in the new string that match the target string
@spl=split(//,$s);
$j=0;
$new_sc[0]=0;
while($j printf("Generation %5d, %-2d mismatches: $s\n",$n,$let-$new_sc[0]);

while($s ne $e) {
$i=-1;
# Make $try new strings.
while($i++ $new_s[$i]=$s;

# Mutate one character of the new string
$chr = int(rand(27));
if ($chr eq 0) { $chr=32; }
else { $chr += (int(rand(2)))? 64 : 96; }
substr($new_s[$i],int(rand($let)),1,chr($chr));

# Count the characters in the new string that match the target string.
@spl=split(//,$new_s[$i]);
$j=0;
$new_sc[$i]=0;
while($j }

# Find high scoring offspring strings.
@sc = sort {$new_sc[$b]$new_sc[$a]}(0..$#new_sc);

@new=(shift @sc);
while(@sc && $new_sc[$sc[0]] == $new_sc[$new[0]]){push @new,shift @sc}

# Set new string to a random offspring strings from among the high scoring offspring.
$s = $new_s[$new[int(rand(@new))]];

printf("Generation %5d, %-2d mismatches: $s\n",++$n,$let-$new_sc[$new[0]]);
}

#76

Posted by: DiEb | August 29, 2009 4:09 PM

@Richard Dawkins, #46
I suppose that you used the algorithm with a mutation probability of 4% to 5% (those give the best results), and a population size of 10 to 25 for the video, to get sufficiently long run, while you used something around 50 for the book, where less generations were desirable?

#77

Posted by: not a gator | August 29, 2009 4:17 PM

What they cannot admit is that simplicity can birth complexity. And selection can create an ORDERED complexity. OH LORDY JESUS!

Wake up the creo kids in the back! They're sleeping through the lecture on the Laws of Thermodynamics again!

#78

Posted by: micha-77 Author Profile Page | August 29, 2009 4:22 PM

This should have been a perl one-liner, but the formatting would probably have destroyed it.

$R=.05;$O=100;$W='METHINKS IT IS LIKE A WEASEL';
@c=(' ','A'..'Z');%C=map{$_,$p++}@c;%N=map{$q++,$_}@c;
@tg=map{$C{$_}}split//,$W;@w=map{int(rand 27)}@tg;
while(){printf"Generation: %-3d \"%s\"\n",++$gen,
join('',map{$N{$_}}@w);last if$b==@tg;$b=-1;
for(1..$O){@t=map{rand()<$R?int(rand 27):$_}@w;
$i=0;$m=0;map{$m++if$tg[$i++]==$_;}@t;$b=$m,@wb=@t if$m>$b}@w=@wb}

#79

Posted by: pcarini | August 29, 2009 4:28 PM

Wake up the creo kids in the back! They're sleeping through the lecture on the Laws of Thermodynamics again!

They apparently also slept through the whole Chaos Theory lecture also. To even the most uninitiated (myself included) it should be obvious that very simple systems are able to produce an astounding amount of information -- without an intelligence directing them, even.

#80

Posted by: not a gator | August 29, 2009 4:29 PM

mck9

I take your point. Maybe one way to address that would be to create a program that has to do a certain task, and run through until you get something that does that task completely (rather than partially). If it's sequential, then the program might end up a little weird, just like us, but if it can complete any part of the task, then you get something more efficient (=good for engineers) but less like biological evolution.

I think the string is simply a proxy for a task. Since it allows for any match, rather than sequential, it's pretty quick (maybe a "macro" picture?).

The virtue of WEASEL is that you write it in an afternoon. Doing a program to create an eye, where each intermediate has to function somehow, would take some time.

I'm not in CS, but I think stuff like this has been done already using computers to engineer computer components and so on.

#81

Posted by: DiEb | August 29, 2009 4:39 PM

Whether one observes latching depends on the parameters used in the algorithm: I calculated that with a population size of 50 and a mutation probability of 4%, one would expect 26 times of observing an actual worsening between two generations in a billion runs of the program. So, it's just improbable...

#82

Posted by: extatyzoma | August 29, 2009 4:58 PM

its a strange affair.

i get the impression the people up in arms about the weasle programme are trying to make it look like dawkins somehow 'cheated' with his useful demonstration. I suspect they want to show that somehow dawkins is dishonest (a dishonest atheist at that), that the demo didnt show what it was supposed to show and that if they can get enough notoriety about the demo out on the net then people can start saying things like 'see, that nasty dawkins, he cheated when he said he had a programme to show evolution was true, he cheated so it was actually false, evolution didnt happen and so god did it' (you know the type of thing im getting at)

the people in a quandry about the weasle: ignorant, dishonest or stupid? im not sure, maybe all three.

#83

Posted by: jeremy | August 29, 2009 5:09 PM

Richard, I think it'd be really funny if you would post the original source code somewhere... and then attach a note claiming a copy of your own book.

#84

Posted by: Monkeyman8 | August 29, 2009 5:23 PM

As a CS major I have to point out that if you wanted to be a dick to this douche (and who wouldn't) he didn't say what language the source had to be in. Just grab the executable run it through a disassembler and send him the assembler code and claim the book. I mean I doubt he'd understand C code to begin with so watching him try to refute the program using assembler would be painfully funny (as in I'd bust at least one lung)

#85

Posted by: Furie | August 29, 2009 5:29 PM

I created a evolution based program in flash one afternoon just for fun.

I filled a square with a number of squares with different colors. My algorithm selected for the squares that had the color mostly resembling the background color. They would mate and the procces started over.

The dna of the square was the binary of the color. Mating meant that I randomized between taking a bit from one parent and the other. I also added som rare mutations, where neither of the parents bits decided what the child bit would be.

It was kinda fun to select a color and watch how the squares disapeard in to the background. Even when most squares were the background color I would get random squares popping out due to mutation.

Also quite intresting to see that even from a population where all induviduals had the exact same colors, as soon as a mutation was introduced, the population exploaded in to different colors and then settle in to the new background.

tl,dsc (To long, didnt spell check)

#86

Posted by: Furie | August 29, 2009 5:33 PM

There is a whole field of programming that uses evolution called gennetic programming.

One intresting aplication was to produce the Mona lisa with a limited amound of transparent squares.
You can check that out here: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/

#87

Posted by: Richard Dawkins | August 29, 2009 5:40 PM

Richard, I think it'd be really funny if you would post the original source code somewhere... and then attach a note claiming a copy of your own book
Alas, I no longer have the original program. It seemed too trivial to be worth keeping. Obviously any half way decent programmer could knock it up in a trice.


Fortunately, however, there is a film of the program in operation (see post #53) above, and you can clearly see from the film that there was no 'latching'.

#88

Posted by: Ric | August 29, 2009 5:48 PM

I once ranked some of the contributors and common posters at UD by order of intelligence. I posted this ranking at UD. Here it is:


Steve Fuller
Kairosfocus
Bill Dembski
Mario Lopez
Clive Hayden
Sal Cordova, niwrad, and Gil Dodgen
O'Leary
Bornagain77


Not that those at the top of the list are smart at all; they are just the smartest out of their group. So that makes O'Leary abysmally stupid to be ranked second stupidest in a room full of morons.

#89

Posted by: Doc Bill | August 29, 2009 5:55 PM

The creationists are all a-twitter because they've discovered that Dawkin's program actually performs latching. Yes, it's true. Truthy. True-ish.

Well, not EXPLICIT latching like a slot machine, but, rather, IMPLICIT latching. Sort of teleological latching. Like "imaginary" latching if you squint just right.

Therefore, the only reason Dawkin's program converges AT ALL is due to a hitherto undiscovered and unknowable imaginary teleological implicit latching intelligent agency.

Sort of like the square root of minus one, i.

Word on the street is that the creationists are going to announce i(METHINKS IT IS LIKE A WEASEL) any day now and proclaim that Darwinism will be dead in 10 years, which is cool because that will correspond to the 20th Anniversary of when Dembski prophesied that Darwinism would be dead.

I'm hoping I get invited to the party.

#90

Posted by: Michael Kingsford Gray | August 29, 2009 6:02 PM

How, exactly, would they KNOW that any code offered was the actual source code that RD used?
Divining? Prayer?
The only sure method is to compare it with a verified original. But that means that they already possess said code!

Am I missing something here, or are they?

#91

Posted by: se-rat-o-SAWR-us | August 29, 2009 6:25 PM

@ Richard Dawkins,

Here's a perl script with ASCII character switches between SPC and '}' with variable length strings. It produces a hyperlinked quote to you above:


% ./weasel | awk 'NR==1;{c=$0;}END{print c;}'
Generation 0, 79 mismatches: Creationism is stupid!
Generation 1176, 0 mismatches: These people are so unbelievably stupid. --Richard Dawkins (http://bit.ly/Cq8EC)

Yes. They are remarkably stupid.


#!/usr/bin/perl -w

$|=1;
$s="Creationism is stupid!";
$e="These people are so unbelievably stupid. --Richard Dawkins (http://bit.ly/Cq8EC)";
$try=201; # New offspring per generation.

@e=split(//,$e);

# Print the starting string
$n=0;
# Count the characters in the new string that match the target string
@spl=split(//,$s);
$j=0;
$mn = (($#e $mx = (($#e>$#spl)? $#e : $#spl)+1;
$new_sc[0]=$mx;
while($j printf("Generation %5d, %-2d mismatches: $s\n",$n,$new_sc[0]);

while($s ne $e) {
$i=-1;
# Make $try new strings.
while($i++ $new_s[$i]=$s;

# Mutate one character of the new string
$chr = int(rand(126-32+1))+32;

# Delete or add the character to the string
$deladd = int(rand(3));
if ($deladd == 0) { substr($new_s[$i],int(rand(length($new_s[$i]))),1,chr($chr)); }
elsif ($deladd == 1) { $new_s[$i] = substr($new_s[$i],0,length($new_s[$i])-1); } # delete a character
elsif ($deladd == 2) { $new_s[$i] = $new_s[$i] = $new_s[$i] . chr($chr); } # add a character

# Count the characters in the new string that match the target string.
@spl=split(//,$new_s[$i]);
$j=0;
$mn=(($#e $mx=(($#e>$#spl)? $#e : $#spl)+1;
$new_sc[$i]=$mx;
while($j }

# Find high scoring offspring strings.
@sc = sort {$new_sc[$a]$new_sc[$b]}(0..$#new_sc);

@new=(shift @sc);
while(@sc && $new_sc[$sc[0]] == $new_sc[$new[0]]){push @new,shift @sc}

# Set new string to a random offspring strings from among the high scoring offspring.
$s = $new_s[$new[int(rand(@new))]];

printf("Generation %5d, %-2d mismatches: %s\n",++$n,$new_sc[$new[0]],$s);
}

#92

Posted by: jsclary | August 29, 2009 7:11 PM

For something a little more interesting than WEASEL that actually uses a more realistic analog to natural selection, check out Neuroevolution of Augmented Topologies (NEAT) based algorithms which have been used in games to create reasonably intelligent non-player characters.

In order to do it in a reasonable amount of time the algorithm focuses explicitly on evolving a brain for a specific body rather than the whole animal but I've seem some implementations that do both. Note that NEAT combines the principles of Genetic Algorithms and Neural Networks -- evolving rather than just training the networks. Genetic algorithms are commonly used for input selection but this goes one step further and genetically evolves the neurons and their connections.

Competition and natural selection can then occur in a game world where the "creatures" that survive in direct competition for survival and resources live to produce offspring.

http://www.cs.ucf.edu/~kstanley/neat.html

http://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies

And for a full implementation with 3d graphics and the ability to evolve your own little robot army ("Gee Brain, what do you want to do tonight?" "The same thing we do every night, Pinky — try to take over the world!"):

http://nerogame.org/

Me, I use this stuff for creating stock trading bots that outperform the market averages and most professional traders. Their environment is the sea of random walk market data and the only selection criteria is they die off if they go broke and the more money they do make, the more likely they are to have children. ;)

#93

Posted by: jsclary | August 29, 2009 7:19 PM

Oh, an interesting point about NEAT and specifically my stock trading versions -- It's actually quite important that a decent percentage of the less well adapted brains survive in each generation otherwise you rapidly lose diversity and the evolution of the fittest runs into a dead end.

I'm not a biologist but from what I have learned this seems to happen in nature as well and it may actually be a good argument against silly notions such as eugenics. If you eliminate all those that don't meet a certain ideal, you may inadvertently doom the population to never progressing further.

#94

Posted by: amphiox | August 29, 2009 7:40 PM

re #93:

I think that in nature for the most part selection pressures are diverse enough that there never is a single "ideal" "fittest" variant. And the fitness function, as it were, is constantly shifting, so some variants whose frequencies are reduced but not eliminated for a short period of time get a chance to increase again when the conditions change.

Whereas an extending period of very high selection pressure for one particular trait can, sometimes, lead to a catastrophic loss of diversity and subsequent extinction of the population when the environment shifts again. (Sexually reproducing populations, as I understand it, are less vulnerable to this than asexual populations)

#95

Posted by: Hoshino Tetsuro | August 29, 2009 7:54 PM

Richard Dawkins@32:

The Youtube player recently added the capability to use a time index (in seconds) in a URL.

eg:

http://www.youtube.com/watch?v=5sUQIpFajsg#t=365

jumps directly to 6:05 in the video.

#96

Posted by: jose | August 29, 2009 8:06 PM

here's my two cents.

#include
#include
#include
using namespace std;

const string letters = "abcdefghijklm, nopqrstuvwxyz.";

int fitness(const string a,const string b);
// Returns the number of letters that match with those in the target.

int main() {
srand(time(0));

string target;
cout getline(cin,target);

int psize;
cout cin >> psize;

int chance; // per cent. For example, 30 means that there's a 30% chance of mutation for each letter.
cout cin >> chance;

// Initialize first individual with random characters.
string mother;
for(size_t i = 0; i mother.push_back(letters[rand()%letters.size()]);

int generation = 0;
while(mother != target) {
string candidate(mother);

// psize daughters are created. Each one is a posible candidate to become mother
// but only the one with the highest fitness will make it.
for(size_t i = 0; i string daughter(mother);
for(size_t j = 0; j if((1 + rand()%100) daughter[j] = letters[rand()%letters.size()];

if(fitness(daughter,target) > fitness(candidate,target))
candidate = daughter;
mother = candidate;
}
generation++;
cout }
return 0;
}

int fitness(const string a,const string b) {
int f = 0;
for(size_t i = 0; i if(a[i] == b[i]) f++;
return f;
}

#97

Posted by: jose | August 29, 2009 8:08 PM

Damn html parsing. The includes are iostream, cstdlib and string.

#98

Posted by: AJ Milne | August 29, 2009 8:12 PM

The only reason that isn't the funniest thing I've read today is it's been such a long day.

Speakin' of Perl and Weasel, I'm thinking just for a gag, we should resurrect the Obfuscated Perl contest just for this year...

Rules: write Weasel in Perl, in the most annoyingly convoluted fashion you can possibly imagine, claim to be Dr. D., send the result to Ms. O'Clueless...

You win if yours is the one that finally gets her committed during her attempts to RE it, thereby saving the net from her ever posting again without a chaperone...

(/Me, I won't be doing it for the prize. I'll be doing it as a public service...)

#99

Posted by: jose | August 29, 2009 8:14 PM

damn html parsing screwed my code. here it is, virgin again.

#100

Posted by: stevec Author Profile Page | August 29, 2009 8:18 PM

#21 That's actually a locking implementation.
#38 That's not actually true (see #21 implementation).
:)

#101

Posted by: tmaxPA | August 29, 2009 9:05 PM

To Zetetic@60;

I appreciate your response, but I think you missed my point.

Yes a latching version of Dawkins Weasel program would be more efficient, but is doesn't need one to produce the results Dawkins' original programed attained.

And yet this simple issue short-circuits brains which we know for a fact are sophisticated enough to operate a computer. Your response indicates that once you've determined they're mistaken, you have no plans to further consider the issue. I plan to learn more, is all, if possible.

In their minds... if Dawkins cheated on a toy program used to make a simple (and obvious) point, then all of evolution is wrong, and therefore GOD the "designer" did it!

As entertaining as it may be to paraphrase so as to dismiss their reasoning or lack thereof, it is counterproductive. Try to understand that.

You seem to be crediting them with far too much intellectual honesty, naively thinking that what they say they want is what they really want.

Not at all; I don't make that mistake for them any more than I do for you. I'm not saying that intellectually the reason they don't understand the Weasel is important. I'm saying that psychologically it is important.

And a note to others: people who post programming code on a comments thread are scarcely better company than creationists. There are vastly better places to park a Weasel.

#102

Posted by: jose | August 29, 2009 9:24 PM

#100: Yes it is. I've done it myself (#99). It does not lock any letters. All characters are always treated exactly the same way. If you try running the program you may actually see a correct letter changing and coming back again later.

The program converges to a solution because we select the best one to create the next generation. Here, that's my code running. Population size 500, mutation chance 40%.

#103

Posted by: stevec Author Profile Page | August 29, 2009 9:30 PM

#101 But the locking implementation is simpler. Compare your code to #21. That doesn't add any validity to Dembski, I just wanted to point out that there is no need for any type of complicated tracking/indexing to implement the algorithm with locking.

#104

Posted by: Kel, OM | August 29, 2009 9:46 PM

When I wrote the program, I "cheated" and used latching on individual characters. If I write it again without "cheating", can I win a trip to the Bahamas?

#105

Posted by: jose | August 29, 2009 9:56 PM

#103 Jarred's code doesn't lock anything either. Since the "locus" that will mutate is selected randomly, the same one could be picked more than one time, so it may affect a correct letter.

#106

Posted by: Platypus | August 29, 2009 10:04 PM

I hereby propose Methinks It Like A Weasel should be used as the subject of a round of Perl Golf.

#107

Posted by: Naked Bunny with a Whip Author Profile Page | August 29, 2009 10:07 PM

Dawkins is a thief. He stole the weasel program from Darwin himself, who first wrote it in COBOL, on punchcards.

Therefore, God.

#108

Posted by: windy | August 29, 2009 11:30 PM

tmaxPA:

Not at all; I don't make that mistake for them any more than I do for you. I'm not saying that intellectually the reason they don't understand the Weasel is important. I'm saying that psychologically it is important.

But it's not, really. If you got them to acknowledge what a non-latching version does, they'd just move the goalposts and latch onto some other excuse not to concede the point of the simulation. You are making the mistake of assuming that they are arguing honestly when they say that this particular issue is important.

#109

Posted by: John Morales | August 29, 2009 11:41 PM

PEBKAC.

#110

Posted by: Lou FCD | August 29, 2009 11:56 PM

Y'all are thinking about this way too hard. Remember that these are the same idiots that are still asserting that in order to accurately model a car crash, you have to throw the computer off a cliff.

#111

Posted by: stevec | August 30, 2009 1:25 AM

#105 Jared's algorithm does not allow a correct letter in the correct position to change from generation to generation. That is the definition of locking as I understand it.

#112

Posted by: antaresrichard | August 30, 2009 4:00 AM

"Show Denyse what's behind creationist door number three, Carol!"

ZONK!

#113

Posted by: SEF | August 30, 2009 4:40 AM

@ Richard Dawkins #87:

Alas, I no longer have the original program. It seemed too trivial to be worth keeping.

Did you never share it with anyone else around at the time, to let them play too? I still have an Apple IIe computer from the late 70s and a carrier-case or two of audio tapes full of old programs which, with sufficient motivation (NB humouring Dembski wouldn't count but a genuine court case might), it should be possible to resurrect. Other people, in particular some close to you, may be similar hoarders and have kept a copy when you didn't.

#114

Posted by: Zetetic Author Profile Page | August 30, 2009 4:44 AM

@ Professor Dawkins:
Out of curiosity, is it possible that any copies of the code may have been given to any schools, friends, colleagues, or the publisher of your book The Blind Watchmaker at the time? How about the company that recorded the original show? The reason why I ask is that if any copies were distributed, there is a possibility of a copy still "floating" out in the world, lost in storage somewhere.

I'm sure that you have better things to do with your time than waste it on such a feeble attempt at a smear campaign. Regardless, it would be amusing to make the creationists "eat some crow" regarding this attempt to discredit you.

@ Windy #108:
Thank you. That is the point I'm trying to make to tmaxPA.

------------------------------------------------------------------------------------------------------------------------

@ tmaxPA #101:
With all due respect I don't think that you understood my point. Also, despite your statements to us to be less judgmental towards the Discovery Institute, you seem to have no trouble making highly judgmental false assumptions about my analysis of their behavior. You seem to be confusing the average "Joe on the street creationist" with the organization of professional liars known as the Discovery Institute, that started all of this.

And yet this simple issue short-circuits brains which we know for a fact are sophisticated enough to operate a computer. Your response indicates that once you've determined they're mistaken, you have no plans to further consider the issue

I don't agree that that is their true motive at all, in fact when judged objectively their actions and statements clearly show otherwise. Their problem isn't that they can't understand why it works (at least for most of the organization, IMO). If that was the case they wouldn't be obsessing on trying to get Dawkins' original code. They could easily analyze any of the hundreds (if not thousands) of the freely available versions that do the exact same thing. The video Prof. Dawkins linked to has also been available for a long time too, in fact the Discovery Institute clearly states that they have analyzed the video. So why then the insistence on Dawkins' original code when it's irrelevant to their "understanding" the program?


Shall I show you that they do in fact understand the program? Yes, I think I should.


Perhaps this might help you understand my position. Here is a direct quote from the uncommon decent article written by O'Leary, and linked above [emphasis added]...

Does the program ratchet correct letters or does it let them vary? One is a partitioned or stair-step search, the other a more realistic evolutionary search. From The Blind Watchmaker, where Dawkins describes the program, its performance suggests that it could be either of these options (though he doesn’t say).


On the other hand, from a (video-run of the program , go to 6:15), it seems to be the latter.


That is a direct quote from O'Leary herself admitting that the video seems to show a non-latching version of the program! They do understand that it works! So please stop trying to defend them by arguing (somewhat condescendingly I might add) how the poor little Discovery Institute just can't get their little bitty brains around the program. They already have but they don't really care about how the program works or they would have asked Dawkins for his explanation.

Throughout the history of the creationist groups, their tactics have been to consistently attack evolution and it's proponents. It has never been to try and understand evolution, since understanding evolution gains them nothing as an organization. Understanding evolution doesn't get them power, it doesn't get their laws passed, it doesn't get them more money, and it will never bring them closer to creating the theocracy they dream of.


That's also not their goal in pursuing the original code of the Weasel program. Their only goal is to show that show that Dawkins had somehow "cheated" on the original version of the program in an effort to discredit him and by extension sully everything he ever said in defense of atheism and evolution. Just look at how they knowingly misrepresent Charles Darwin, and fire any of their own people that don't play along with such demonization.

Still think I'm being unfair to them? Then ask yourself that even if Dawkins had "cheated" on the original version, what difference would it make to the versions that they know do work? What difference would it make to the video that they themselves admit seems to show a successful non-latching version of the program?

.


.


.


.


.


Answer: It wouldn't make any difference at all to understanding how the program works. It would only make a difference as to whether or not they can discredit Prof. Dawkins.


This is ultimately their attempt to spin control the failure to show that a non-latching version of the program can't work. Since that can't show that the non-latching version doesn't work, it makes them look foolish. That failure leaves them with the only recourse of trying to imply that Prof. Dawkins has "something to hide" by not providing the code to an irrelevant toy program from long ago.

Perhaps you need to spend less time playing the role of the "let's blame the atheists" accommodationist, and more time actually analyzing the real motives and strategies of the creationists.

#115

Posted by: Zetetic Author Profile Page | August 30, 2009 5:01 AM

Oops! I see that SEF already beat me the question I directed to Prof. Dawkins. Sorry about that!

#116

Posted by: wice | August 30, 2009 6:16 AM

This reminds me of another case. True story.

Once upon a time, a guy called Dichard Rawkins wrote a book explaining how gravity works. To illustrate the point that gravitational acceleration doesn't depend on the mass of an object, he created an experiment, where he dropped a solid lead ball and a feather in a two meters high vacuum-tube. Both of them reached the bottom in exactly the same time. Of course it was nothing new, it was known perfectly well before that, that it works, but he just did it for illustrational purposes. However, a lot of people, who have read the book, repeated the experiment, just for fun.

Thirty years later a guy called Dilliam Wemski (a proponent of Intelligent Falling, a theory claiming that masses attracting each other must be the result of the intervention of an Intelligent Mover) published a paper, where he describes his own attempt to repeat the tube experiment. He used a two meters high vacuum tube, and "dropped" a solid lead ball and a feather in it, both of them reaching the bottom in exactly the same time. By "dropping" he meant that he attached a fishing-line to both the ball and the feather, and used a wheel to lower them in the tube, by spinning the wheel with his hands. He concluded that for two objects with different weights it is only possible to reach the bottom exactly the same time if "active energy" is inserted into the system by an intelligent source.

Several people pointed out, that his experiment wasn't the same as Rawkins' experiment, since Rawkins didn't use fishing-lines, as it can be seen in the film about his experiment, and also that a lot of people managed to repeat the experiment without using fishing-lines.

To settle the issue once and for all, Enise DO'Leary, a contributor of a blog called Duncommon Escent, started a contest, asking for the original vacuum tube, lead ball and feather Rawkins used in his experiment for his book thirty years earlier, claiming that it doesn't matter that the experiment demonstrably can be repeated using any kind of vacuum tube, plus a lead ball, a feather, or whatever else, it only matters if it works with Rawkins' original vacuum tube.

Unfortunately I don't remember the end of the story.

#117

Posted by: Pikemann Urge | August 30, 2009 8:45 AM

tmaxPA #28, good post!

#118

Posted by: AJS | August 30, 2009 9:25 AM

The thing about "information" is, it's not what you think it is.

Consider a Sudoku puzzle in a newspaper, with 27 squares pre-filled in.

Will you have added any new information if you fill in the remaining 54 squares? No, because the information necessary to fill them in was already there!

Information isn't being smuggled anywhere. Rather, it is being inherited from the environment which tests the fitness of the evolving population.

#119

Posted by: Hypatia's Daughter | August 30, 2009 9:33 AM

#116 wice Touche!

#120

Posted by: Kel, OM | August 30, 2009 9:39 AM

Unfortunately I don't remember the end of the story.
lol, great post
#121

Posted by: Citizen Z | August 30, 2009 9:52 AM

That's also not their goal in pursuing the original code of the Weasel program. Their only goal is to show insinuate that Dawkins had somehow "cheated" on the original version of the program in an effort to discredit him and by extension sully everything he ever said in defense of atheism and evolution.

I think that's more accurate. I don't think it's a good faith effort, I don't think they expected him to still have the code.


#122

Posted by: AJ Milne | August 30, 2009 10:01 AM

You are making the mistake of assuming that they are arguing honestly when they say that this particular issue is important.

Quite. And, might I add, it's an especially bizarre blindness, in this particular case. Notwithstanding certain protestations to the contrary... Oh, and aren't those amusingly phrased:

...I don't make that mistake for them any more than I do for you...

Riiiight. See, no doubt, either side may be arguing in bad faith, here... Just being fair, see, open-minded, no doubt...

And playing right along with the con's game, oddly enough...

And which, of course, is exactly what happens when you throw even the thinnest pretension of actual judgement in such matters entirely out the window... Yes, let's be balanced. Let's be fair... Let's be so fair that we treat the guy with his hand on the wallet in yer pocket as if maybe he just made an innocent mistake, was reaching for his own... from behind you, fer some odd reason... and never mind he has thirty prior convictions for the same crime... Let's imagine maybe they're not gaming this thing still in a ongoing, increasingly hilariously desperate attempt to wipe the latest dozen eggs off their faces... Surely there's a reason we're somehow just failing to appreciate why they really need the original vaccuum tube, and will go on and on and on and on about it and turn it into the can't miss sideshow attraction of the Western world if we let them...

(/Files under 'useful idiot'...)

#123

Posted by: 'Tis Himself, Quel Dommage Author Profile Page | August 30, 2009 10:06 AM

I don't think it's a good faith effort, I don't think they expected him to still have the code.

Source code written 30 years ago on a computer that Dawkins probably threw away over 20 years ago? Don't be silly. Of course the Disco Tute doesn't expect him to have it. However:

"What's he hiding? If he isn't hiding anything, all he has to do is pony up the source code and make it available for public inspection. That's all we're asking. But the evilutionist Prof. Dawkins won't even comply with a simple request. He's got to be hiding something or else he'd let us see his original program."

#124

Posted by: Walton Author Profile Page | August 30, 2009 10:12 AM

#116 wins the thread. Molly material, I think.

#125

Posted by: Religion™ Brand Brain Staples | August 30, 2009 10:52 AM

Are you nuts? There's plenty of reasons Dawkins should win a copy of his own book.

It could be a huge PR win. He could sign it and auction it off for charity. Just think of it as an opportunity to put the spotlight on stupid creationism.


Of course, the whole thing is just a scam. One of the two following things will happen:

1) The genuine code shows up.
O'Leary Response: AHA! We have you now, you lying liars! We knew the program used latching, and this one clearly doesn't!

2) Someone fakes up some code.
O'Leary Response: AHA! We have you now, you lying liars! This program clearly uses latching!

Now, here's my question: How will they ascertain whether or not the code is real or not? It seems to me that short of getting Dawkins himself to sign off on it's authenticity, it's all just guesswork (and wishful-thinking/outright-lying).

It's such a trivial thing, and I know a lot of people are wondering why cdesigners are so focused on it. The answer is simple: Not only to these people argue from authority, but they think it's the only way that matters (see bible quotes, quote mining, etc). Thus, they think they can "win" by trying to paint Dawkins as a liar somehow, and I guess they got it into their heads that the Weasel program is the way to go about it.

Authority arguments are all that matter to these people. You can not convince them with evidence because they do not value evidence. You have to convince them to give up authority in favour of evidence before you can accomplish anything with scientific evidence.

#126

Posted by: Zetetic Author Profile Page | August 30, 2009 3:39 PM

@ wice:

Nice one! :)

@ Religion Brand#125:
I suspect that if Dawkins was able to supply the original code, and it didn't use latching, that the DiscoTute would become very quite about it. Leaving it up to us to show evidence that the code was indeed provided. If we then provided such evidence they would then make some insinuations about "Why'd it take so long?", implying that they were given faked code.

#127

Posted by: Zetetic Author Profile Page | August 30, 2009 3:52 PM

Still @ Rligion Bran:
Sorry...cut myself off there.

I agree with you completely that the evidence doesn't matter to them.

They have no intention of trying to prove if the code was genuine, only to look for an excuse to smear Prof. Dawkins. If the code is faked, they trumpet that, but they'll be quiet if they can't show it was faked. If it uses latching, they'll shout the from the rooftops, never mind all of the non-latching versions out there.

What tmaxPA doesn't seem to get is that this isn't about trying to understand evolution (not the Discovery Institute at least), it's all about looking for those propaganda opportunities.

#128

Posted by: tresmal | August 30, 2009 4:43 PM

Wice @ 116: You should repost that here. If they let you.
BTW it's spelled Dilliam Wembski. It's a small point but they have been known fixate on those.

#129

Posted by: John Bode | August 30, 2009 4:53 PM

Dammit PZ, thanks for making me waste my weekend hacking. In C, no less, because I'm a masochist.

And yeah, after reading the thread at UD, O'Leary and friends aren't interested in the code, or whether it fixes correct characters in place or not. They're only interested in attacking Dawkins.

#130

Posted by: FlameDuck | August 30, 2009 5:22 PM

It was a simple demonstration program to help teach a basic concept.
Which again goes to show that even the simplest concept is beyond their understanding. The thing is if the program instead of a simple formula that "evolved" letters, simply printed "In the beginning GOD DONE IT!!!1!" to the screen, there wouldn't be any issues with it at all.
#131

Posted by: Charles | August 30, 2009 9:55 PM

#!/usr/bin/env python

"""Dawkin's 'Weasel' Program"""

NUM_CHILDREN=25
NUM_MUTATIONS=3
MUTATION_DISTANCE=3
NUM_GENERATIONS=10000
PRINT_INTERVAL=50

import sys
import random

def letter_distance(pair):
"""returns distance between two letters passed in as a tuple"""
return abs(ord(pair[0]) - ord(pair[1]))

def phrase_distance(p1,p2):
return reduce (lambda x,y: x + y, map( letter_distance, zip(p1,p2)))

def random_phrase(length):
"""Return a random string of stated length"""
s=""
for i in range(length):
s += chr(ord('a') + random.randint(0,25))
return s

def mutate_once(string):
mutated=""
pos=random.randint(0, len(string))
mutation = random.randint(0, MUTATION_DISTANCE) - (MUTATION_DISTANCE / 2)
for j in range(len(string)):
if j != pos:
mutated += string[j]
else:
mutated+=chr(ord(string[pos]) + mutation)
return mutated

def mutate(string):
mutated=string[:]
for i in range(NUM_MUTATIONS):
mutated = mutate_once(mutated)
return mutated

def evolve(current, target):
"""Breed from current string. Select fittest child"""
children = []
for i in range(NUM_CHILDREN):
children.append(mutate(current))
#Stuff each child in a hash, indexed by distance to target
ratings={}
for child in children:
distance = phrase_distance(child, target)
ratings[distance] = child
#Find the lowest
keys = ratings.keys()
keys.sort()
lowest=keys[0]
return ratings[lowest]

if len(sys.argv) == 2:
target = sys.argv[1].lower()
else:
print "Usage: weasel "
sys.exit(1)

current = random_phrase(len(target))

print target
print current
start = current
start_distance = phrase_distance(start, target)
#Let's evolve!
for a in range(NUM_GENERATIONS):
current = evolve(current, target)
if (a % PRINT_INTERVAL) == 0:
distance = phrase_distance(current, target)
print "%d: %s:%d" % (a, current, distance)
if current==target:
print "Done %d generations to go from %s to %s (distance %d)" % (a, start, current, start_distance)
sys.exit(0)



This is quite interesting. More genetic drift per generation makes it take longer to move close to the solution. More children per generation *vastly* reduces the number of generations needed. There's a whole bunch of rather interesting mathematics here. It would be of a great deal of interest to, for example, a competent mathematician.

#132

Posted by: Kel, OM | August 31, 2009 4:21 AM

I spend an hour or so writing a similar program in C++, this shit is dead easy. It's amazing that these people cannot get it.

My source here. It's parameterised, so anyone with a CPP compiler can tweak the variables of mutation rate and number of children, or even put in a different string and see what happens. Tweaking the number of children or mutation slightly can have a big difference - though it still gets there in the end.

One way to make it slightly more "realistic" would be instead of having one from each generation get through, have a population size that's maintained. That way each string can have slightly mutated baby strings, and the best of the population altogether would be selected against. Sounds more Darwinian than just one getting through each time.

#133

Posted by: Kel, OM | August 31, 2009 4:28 AM

Now that I have presented source of an imitation to the weasel program, can I winz a Dawkins book?

#134

Posted by: SEF | August 31, 2009 4:29 AM

It would also be more "Darwinian" (ie realistic) for the selection function to be imperfect - occasionally eliminating the best of the bunch rather than reliably only the worst ones.

#135

Posted by: James Sweet | August 31, 2009 10:11 AM

I found the Creationist version of the program.

std::string godDidIt() {
return "METHINKSITISAWEASEL";
}

int main() {
std::cout return 0;
}

Sweet.

#136

Posted by: John Bode | August 31, 2009 12:17 PM

One way to make the process more interesting is to have multiple mutation rules: no change (a => a), point change (a => b), duplication (a => aa), deletion (ab => b), and transposition (ab => ba):

/** * assumes dst is large enough to hold the mutated * src string */ void mutateStr(char *src, char *dst) { while (*src != 0) { switch(pickRule()) { case eNoChange: *dst++ = *src++; break; case ePointChange: *dst++ = randomLetter(); src++; break; case eDuplicate: *dst++ = *src; *dst++ = *src++; break; case eDelete: src++; break; case eTranspose: do { char t = *src++; *dst++ = *src++; *dst++ = t; } while(0); break; } } *dst = 0; }

Allowing string lengths to vary led to some interesting behavior. Occasionally the best fits would converge to an incomplete string like "Methinks it is like" for a few generations and then suddenly the best fit becomes something like "Metjinks is is like aaa" because the longer string is a better fit than the shorter string, even though some of the right letters are now wrong.

Leave a comment

HTML commands: <i>italic</i>, <b>bold</b>, <a href="url">link</a>, <blockquote>quote</blockquote>

Site Meter

ScienceBlogs

Search ScienceBlogs:

Go to:

Advertisement
Follow ScienceBlogs on Twitter

© 2006-2011 ScienceBlogs LLC. ScienceBlogs is a registered trademark of ScienceBlogs LLC. All rights reserved.