Sunday, April 22, 2007

Tank, no tank, tank, no tank...



This book looks awesome. I was particularly interested in the idea that programs can evolve in the same way living things evolve through natural selection. The idea came from Dawkin’s The Selfish Gene, in which he stated that in order to see evolution by selection, all you need is variation in a population, a way for members of the population to reproduce, and for them to reproduce imperfectly. If you then have a way to selecting force (such as limited resources) for “fitter” attributes, you can drive evolution. The idea that you can do this with computers sounds so cool. You can model situations that are so mathematically complex that it would be very difficult to find the best possible parameters using your own logic. For instance, say you want to build an ideal airplane wing. Now, the aerodynamics of those things are a bitch to figure out, so you can’t expect to figure out the best design through your own calculations. So what you do is write a program that takes a bunch of different airplanes with different types of wings, and it makes them fly. Then, it takes the ones that fly the best and it lets them reproduce in such a way that the planes’ “offspring” are similar, but not the same as the parents. You repeat this process over and over, and then in the end, you are (theoretically) left with airplane wings that fly really well. You then look at the parameters of the wings, and you build your real wing based off those parameters. It sounds genius. It is, however, very complicated, and can produce unintended results, as my engineering-major boyfriend pointed out. Consider this:

The US military was trying to find a way to be able to tell whether or not a tank was hiding in some particular area. So, they thought they might apply this idea of evolving programs to design a program that could learn to read a picture and figure out whether a tank is hiding in it. So what they did was go out one day and take thousands of picture: tank, no tank, tank, no tank, etc… They came back, and they fed these pictures to the program. Now, the program started out really dumb—it had no idea what was a tank and what wasn’t, so the program initially guessed randomly whether there was or wasn’t a tank present. So in making it’s predictions, the computer messed up a lot at first. But the programmers were patient. Every time the computer messed up, the programmers let it know, so it redesigned its schema to better fit the definition of “tank” vs. “no tank”. Eventually, the computer was able to perfectly tell which pictures had tanks and which did not. To make sure the computer was not just memorizing the pictures, they saved a couple that they did not show to the computer until the end, and it managed to get those right as well. So, the military was very happy because they thought they had made the computer learn the difference between tank and no tank. Then, as a final test, they went out and took some new tank & no tank pics and showed them to the computer. They were unpleasantly surprised: the computer had gone back to being dumb again—it got just as many wrong as right. What happened? Why could the computer figure out the first group of images but not the second? It turned out that in the first group of images, all of the “tank” pictures had been taken in the morning, but all of the “no tank” pictures had been taken later in the day. They hadn’t taught the computer the difference between tank and no tank: they had taught it the difference between day and night! Just a reminder of how complex these things are…

3 comments:

Bobby said...

I've always found the idea of evolution to be very interesting. Just the thought that we all evolve to best suit our surroundings is amazing. I think the most incredible part is that it all happens by random mutations in our DNA. Something is copied wrong, and if it helps us, we evolve something new. I think we should all spend more time in water. Maybe in a couple million years, we'll have gills.

Kate said...

That tank example is so interesting! So, did they ever end up figuring out a way to actually make the computer figure out if it was a tank or not? I don't really get how it works....if the computer can see the tank than wouldn't a person be able to see the tank in the picture too? I am a little confused.

berinvonrad said...

Ah, very fair question, Kate. I think the idea is that they would get the computer to recognize tanks when it was "obvious" that there was a tank there, and then, because computers operate on a more strict logic than we do, they would be able to apply that skill to pictures when we really can't tell whether a tank is there or not.