Robot, make thyself
Genetic algorithms seem like another one of those cutting-edge discussion topics reserved for only the most knowledgeable and i-did-it-before-it-was-cool hipsters. It fits in the same category as non-relational, decentralized database hype (read: the cloud). But genetic algorithms may be what defines the future of programming, you know, the IA and evangelion MAGI stuff. Genetic algorithms work like evolution in biology. A group of “candidates” is created with slight variation between individuals. Each is assessed for its fitness. The most successful candidates are cloned and randomly mutated to form the second generation. The rest die off. This method works well for some problems, given that you have 1. a way to measure fitness, 2. a reasonable range of values to test, 3. an absurd amount of computing power. Now think about this: how do calculators compute sine? They can only do a couple things: add, compare and memorize. (If you’re genuinely interested, here.) In the same way, this random directed guessing method of genetic algorithms is as viable and practical as something as common as the sine function, as as as as as. Genetic algorithms are cool for simple problems, like finding the shortest path between two vertices or building champion mousetrap cars. But if you told someone to use random guessing in their network packet routing programs, they’d think you were insane. As a result, there is a split in intention among people who are interested in computer programming: some people study hard so they can make faster and faster algorithms while some people study hard so they can make faster and faster computers, machines with ridiculous calculation rates that would suit a directed guessing program very well. Just today, I used this model of genetic guessing in a polynomial solver, which was great, because it worked. Faster than whatever my TI uses to find zeros. Then I tried having the computer figure out the quadratic formula on its own. After ~500 generations I got 2k4/bk*b*c)c/+ca-ak)a. So, no.
I’ll bet this is the kind of discussion that floats everywhere when you get to be a computer science undergrad. From what I can see, this kind of environment is equally likely to be awesome as it is to drive me insane. Like, could you imagine taking a class on this? And woah, assignments and tests on this? Just this morning, I was dreaming about having a 9 hour test next thursday (very precisely next thursday) where you would get the specification for a new regular expression format and you would have to implement it without using any existing regex functions. In contrast, I also think about code that is designed to evolve itself into more code, kind of like the protein evolving programs that run 24/7 someplace. I’ve got a long way to go.