True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Archive for March, 2009

The eigenspace of fraud

Monday, March 30th, 2009

Interesting discussion of the basic types of fraud at Making Light: here, and a followon here.

1. Simple misrepresentation.
2. Using high-pressure tactics to confuse or intimidate the victim.
3. Shell games, sleights of hand, and switch-and-retraction cons: the pigeon drop, the Jamaican switch, Three-Card Monte, etc.
4. The Spanish Prisoner
5. Ponzi Schemes
6. Pyramid schemes
7. Selling information about, or access to, uncommon opportunities

I would add selling a dream. The con man sells people on an appealing dream and convinces them to spend time and money on it. The details determine whether this is a con, a religion, a self-deception, or an honest endeavor. For honest endeavor, consider someone who convinces a town to set up a community garden. For con, think of someone who convinces people to pool money to buy a farm and start a co-op and ends up owning the farm. For religion, think the televangelists that live in mansions built with their followers dough.

Dawkins ‘Weasel’ program as a Perl one-liner

Saturday, March 28th, 2009

Explained at Panda’s Thumb:

Over at uncommon descent William Dembski is musing over Richard Dawkins Weasel program. Why you may ask? Way back in prehistory (the 1980’s) Dawkins wrote a little BASIC program (in Apple BASIC of all things) to demonstrate the difference between random mutation and random mutation with selection, which many people were having trouble grasping. Now, this wasn’t a simulation of natural selection, and Dawkins was very careful to point this out.

But as a demonstration of selection versus simple random mutation, with the string “methinks it is a weasel” being selected in a matter of minutes, when simple random mutation would take longer than the age of the Universe, it was pretty stunning. As a result, creationists have been having conniption fits over this little program for decades. Such is its power, the Issac Newton of Information Theory, William Dembski, spent a not inconsiderable portion of his time attacking this toy program. In particular, he claimed that after every successful mutation, the successful mutation was locked into place, and couldn’t be reversed. But he was wrong, and it seems he just can’t admit it.

The Weasel program starts with a random string. Then each generation ‘offspring’ strings are generated, each with one letter randomly changed. From among the offspring, the string closest to the target string is chosen each generation. Rather quickly this process of mutation and selection will change any string into the target string. I start with “Creationism is nonsense” and my target is “methinks it is a weasle”, the target Dawkins uses.

Since the creationists are having trouble making such a program, I wondered *just how short* a program could be written to do this. Here’s a first attempt as a eight line Perl one-liner. It can be cut & pasted into a Unix terminal:

perl -e '$|=1;$s="Creationism is nonsense";$e="methinks it is a weasle";$try=11;$let=length($s);@e=split(//,$e);while($s ne $e){$i=-1;while($i++< $try){$new_s[$i]=$s;$chr=int(rand(27))||-64;substr($new_s[$i],int(rand($let)),1,chr(96+$chr));@spl=split(//,$new_s[$i]);$j=0;$new_sc[$i]=0;while($j<@e){$new_sc[$i]++if$e[$j]eq$spl[$j++]}}@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}$s=$new_s[$new[int(rand(@new))]];printf("Generation %5d, %-2dmismatches:  $sr",++$n,$let-$new_sc[$new[0]]);}print"n";'

(When I cut & paste the one liner on my Mac it changes the final single quote to an end quote and the last two pairs of double quotes to funny double quotes, so keep an eye out and change them back if you need to).

And the normal length 35 line program with comments:

#!/usr/bin/perl

$|=1;
$s="Creationism is nonsense";
$e="methinks it is a weasle";
$try=11; #New offspring per generation.

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

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

    #Mutate one char of the new string.
    $chr = int(rand(27)) || -64;
    substr($new_s[$i],int(rand($let)),1,chr(96+$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<@e){$new_sc[$i]++ if $e[$j] eq $spl[$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, %-2dmismatches:  $sr",++$n,$let-$new_sc[$new[0]]);
}
print"n";

Regarding LotR

Wednesday, March 25th, 2009

From a thread discussing Kate Nepveu’s chapter by chapter review of LotR:

Though as Bilbo is the sort of house-guest who shows up out of the blue and stays for seventeen years, eating six meals a day throughout, perhaps the Rivendell Elves have given up expecting him to have finer feelings

Super-wheels!

Saturday, March 14th, 2009

Why am I just hearing about these now? the Mecanum wheel, invented in 1973. These wheels can move in any direction. A pair rotates in opposite directions to move sideways.

mecanum wheel

The battle between good and evil (to publish)

Saturday, March 14th, 2009

Pharyngula has a post tearing apart a creationist who in passing refers to Satan as ‘Satan et al.’

So I wondered, *has* Satan published in the biological journals?

A PubMed search of biological publications finds no papers published by Satan but twenty-three with God as an author. You may draw your own conclusions from this…

Thursday, March 12th, 2009

Cool, a custom made dodecahedral puzzle like a 5x5x5 version of Rubik’s cube!

The MAKE site has pictures of the build process: MAKE, video

petaminx