True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Indie games

April 1st, 2009

I ran across the independently produced game World of Goo. Fun game, the stylish graphics caught my eye.

So I wondered what was involved in creating a modern game. What’s done? Tech wise, graphics engine, physics engine, AI, etc. Art and sound. Looked around, found these two sites:

Indie Game Developer Links
Gamedev.net

Never found the a straightforward answer to my question though.

Addendum:

Reading the ‘how we made it’ articles on their site, it looks like World of Goo was made using the open source PopCap framework. PopCap includes two physics engines, the 2D Chipmonk Physics library and the 3D ODE physics library!

The eigenspace of fraud

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

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

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!

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)

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…

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

Idea: clearing pre-cancerous cells

February 17th, 2009

Cells become cancerous through a multi-step process. The cells pick up several mutations, each clearing a natural limit on cell division and usually increasing the rate at which the cells divide. By the time a person gets old their body has many pre-cancerous clumps of cells, and cancer occurs when one of the cells in one of the clumps picks up a final mutation and becomes fully cancerous.

Cancer has proven very difficult to treat, but perhaps it is easier to treat at the pre-cancerous stage. The idea would be to treat healthy people at middle age or later and kill most of their pre-cancerous cells. This would make the pool of cells that can develop into cancer much smaller and reduce the incidence of cancer.

Chemical chemotherapy drugs would be a poor choice for this–I expect they are not effective on slowly dividing pre-cancerous cells and these drugs are also damaging.

Instead, it may be possible to trigger apoptosis (cell suicide) in pre-cancerous cells. These cells are losing their differentiation and activating abnormal signaling pathways. They are likely stressed and may already be primed to undergo apoptosis. One of the organism’s anti-cancer mechanisms is to trigger apoptosis in pre-cancerous cells. The idea here is to supercharge this mechanism.

So the idea would be to treat the person with a cocktail of drugs that induces apoptosis by activating the apoptotic signaling pathways. The treatment should be strong enough to trigger a wave of apoptosis in the most susceptible cells clearing most pre-cancerous cells from the body. There would be some normal cells killed as well but they will be replaced by normal tissue processes.

Picking traits in children

February 17th, 2009

There’s discussion on blogs today about an LA Times editorial highlighting the news that an LA fertility clinic is offering selection of a few non-health related traits in embryos.

This technology was first developed for and used to screen out dangerous genetic disease traits. Couples who both carry the allele for a deadly genetic disease have a 1 in 4 chance of having a child with the disease (in some situations the child would have a 1 in 2 chance). IVF combined with embryo testing allows these couples to have a healthy child. A couple has embryos created through IVF and then a cell from the 8-cell stage embryo is removed and tested for a trait. Apparently some fertility clinics now offer gender selection and will offer selection based on “eye color, hair color and complexion”.

This technology has inherent limits–embryos are being selected from a pool of 6-10 that are created by a round of IVF. So only simple, single gene traits can be picked. If you want a boy the pool is cut in half and now the parents are picking from 3-5 embryos. If both parents have the simplest eye color situation and both carry an allele for blue eyes, 1 in 4 embryos will have it. Parents get at most two choices of simple single gene traits and few traits are determined by a single gene.

Very little is known today about normal human genetics, that is what genes to test for, but that will change and is not an inherent limit to this technology. The curious fact that we know almost nothing about the genetics of normal human traits is a story for another day.

In a few years when we have a better understanding of medical genetics parents will be able to pick the embryos with the fewest and least severe set of disease gene alleles (and even then each embryo will have many bad traits). This choice will for almost all parents trump select of any other trait. Who would pick a green-eyed baby with a 90% lifetime risk of heart disease over a one with a 10% heart disease risk and brown eyes? So concern about IVF clinics offering this is wasted breath, it is a passing notion that will last a few years at most.

This technology has no prospect of offering more detailed choices for parents. More choices would require selecting among more embryos (or among more sperm and eggs), and nothing like that is on the horizon, i.e. it won’t happen in the next thirty years.

Rare as a total eclipse–a useful Slashdot article

February 9th, 2009

Today Slashdot had an ‘Ask Slashdot’ post asking the question “Mathematics Reading List For High School Students?” Slashdot reader comments usually start are typically dismal and often worse. The only useful comments I’ve seen come to questions both technical and obscure. Looking for a Scheme compiler for the Commodore 64 or tools for hacking a router and Slashdot commenters can help.

But today a rare gem, an interesting question of general interest on /. worth reading. Here’s a summary of the suggestions:

(the obvious: Flatland, GEB)

How to Lie with Statistics by Darrell Huff, 1954
Men of Mathematics by E. T. Bell
How to Think Like a Mathematician: A Companion to Undergraduate Mathematics by Kevin Houston
All the Mathematics You Missed But Need to Know for Graduate School by Thomas A. Garrity
Prisoner’s Dilemma by William Poundstone
Schaum’s Outline of Linear Algebra by Seymour Lipschutz
The Feynmann Lectures on Physics by Richard Feynman, Robert Leighton, and Matthew Sands
Surely You’re Joking, Mr. Feynman by Richard Feynman
Bringing Down the House: The Inside Story of Six M.I.T. Students Who Took Vegas for Millions by Ben Mezrich
The Golden Ratio: The Story of PHI, the World’s Most Astonishing Number by Mario Livio
Fermat’s Last Theorem by Simon Singh
The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography by Simon Singh
The Codebreakers: The Comprehensive Story of Secret Communication from Ancient Times to the Internet by David Kahn
Against the Gods: The Remarkable Story of Risk by Peter Bernstein
Knots : Mathematics with a Twist by A. B. Sossinsky
The Little Schemer by Daniel P. Friedman and Matthias Felleisen
The Pleasures of Counting by Thomas William Körner
Innumeracy and A Mathematician reads the Newspaper by John Allen Paulos
The Shape of Space by Jeff Weeks
‘e’: The Story of A Number by Eli Maor
What is mathematics? by Courant and Robbins
A Pathway Into Number Theory by R. P. Burn
Zero: The Biography of a Dangerous Idea by Charles Seife
A Long Way From Euclid by Constance Reid

and to add a few not mentioned:
Chaos by James Gleick
Five Equations That Changed the World: The Power and Poetry of Mathematics by Michael Guillen
Mathematical People: Profiles and Interviews by Donald J. Albers and Gerald L. Alexanderson

And last and best, any of the books of Martin Gardner’s Recreational Mathematics columns from Scientific American.