Saturday, December 08, 2007

The Genesis of Design

I met a neat guy the other day.

This guy had a pretty crazy claim. He said had created a program which did for computing what evolution does for life: It adapts to what ever problem it faces.

And he challenged me to test it out. So I did. Over the next few weeks I'm going to blog what I find out.

So just imagine for one second you had a time machine, and you traveled into the future 2000 years, and you purchased a kid's biology teaching toy, an Insta-Biomatic 3000. It allowed you to create little populations of simple organisms that you could evolve into different things by telling them what you wanted them to do, and feeding the ones who work towards your goal, while starving the ones who rebel. Now imagine for a second this product exists today, and I own one. Yeah, sounds like crap, right? Wait and see...

So I decide I'm gonna start out simple. The claim is it can be trained to do any task from image recognition to signal processing, but I need to understand it first. I start by seeing if it can figure out how to multiply a number by itself. Easy to express, easy to know when it's right. I create a new set of organisms, and I give them all random numbers to work with, and I let it run for a bit, and at first it's just fail fail fail across the board. I smile to myself and think, "Oh sure. It's gonna do what now?" and the best part it I'm not telling it the right answer at all, I'm just telling it, "Nope, you got it wrong." It's a bit like asking 10,000 people "The question is: 8485832451, what's the answer?" and then telling them they're all dead wrong, thanks for playing, no you don't get to know what the answer was.

But after about a minute and a half of just completely random guessing, one of them got it right just by sheer luck. Then a few seconds later he got it right again. And then he missed, but his neighbor got it. On the next try they both got it, and soon after that it was a small chorus of consistently right answers. After 3 minutes I had a small population of organisms whom 90% of them would consistently get the answer right, no matter what number I handed them.

Ok, big deal. It can multiply a random number by itself consistantly. More to the point it can evolve a solution where 90% of the population arrives at the right answer 100% of the time. Multiplying 64 bit integers isn't exactly super amazing, let's do something harder.

So I start over with a new population who's never solved any problem, and I change the problem from "n times n" to "n times (n plus 1)". So now they have to add 1 to the number before multiplying. The problem is harder, and it takes them a little longer to arrive at a solution, but they do.

So then I figure I'm gonna get tricky on them, and change the problem in mid stream. I make it so once we've played the game 150 times, I'm going to add one to the number I'm adding. So it starts "n times (n plus 1)" but goes to "n times (n plus 2)" after 150 tries.

Well, just like before, they all arrive at a consensus and are quite pleased with themselves, until all of the sudden the 151st time happens, and I go, "No. You're all wrong.". Well they kept trying, and pretty quick one of guesses the new number and spreads the word around, and soon enough we're back up to 90% of the population getting it right... until the 301st time comes around and I do it again, and they all have to guess the new number again. And wouldn't you know it, they find it much quicker too! In fact by the 7th time I've played this number changing game, they've figured out that I change the number every 150 times, and they've accounted for this in their DNA so they start guessing the new number right away. Ok, this was the promise, right? It adapts to it's environment, even while it's in mid-stride. Pretty neat, but I still think I can trick it.

So I change the game again. This time I add one to the number when they've arrived at a 60% consensus. I figure right around the time word is starting to spread around, I'm gonna switch it out on them. But this doesn't deter them; the carefully play the game until 60% of them are also incrementing the number every time, and therefore staying in step with my guess. Clever!

Alright, well how about this: Every time they grow the consensus of right answers more than 0.003% in a single round of guesses, I change the number to something completely random.

Well, this does stump them a bit more because they're unable to come up with a really solid solution for how the number is changing, since it's changing at random.

But after about 10 minutes, I realize they've devised a way to cheat: They've evolved a completely stable population that gets the answer right a low enough percentage of the time, and gives wrong answers the rest of the time that it doesn't tip the consensus and change the number any more! In this way they stay the most happy, because they've learned that growing the consensus too fast means they won't be rewarded until they guess the new random number. Meanwhile they slowly grow the number getting it right, but keep this conspiracy amongst them to keep giving wrong answers most of the time, until 90% are doing exactly the same thing, yet the size of the consensus never grows by more than 0.003% in a single round.

Clearly Orgel's Second Rule is hard at work here: Evolution is cleverer than you are.

Stay tuned for more, because this is just the very beginning of what this thing is capable of.

Labels: , ,

1 Comments:

Blogger Justin Lyon said...

I'm tuned in and waiting to hear more.

2/15/2008 7:39 AM  

Post a Comment

Links to this post:

Create a Link

<< Home