Cultured Perl: Genetic Algorithms, The Next Generation 35
BritMit writes "One of the more intriguing types of algorithm is the genetic algorithm. Genetic algorithms mimic Darwinian natural selection, where "fitness" selects individuals for survival, breeding, and, hence, adaptive mutation. A previous article: Genetic algorithms applied with Perl covered the background on this, and provided two Perl implementations, one that bred bytes and another that bred words. This follow-up article expands this idea of Perl evolution with more advanced material on genetic algorithms."
Genetic algorithm (Score:2, Funny)
I think this is an important demonstration of the lack of real substance to Darwin's ideas. Perhaps those inefficiencies in the human body (appendix and so forth) are really just bugs or backwards compatibility modules in an engineered product.
Re:Genetic algorithm -Typical creationist rhetoric (Score:2)
The fact is, Genetic algorithms are quite good at answering questions like. What's the best sequence of events to follow in order to survive (survive doesn't neccesarily mean live here) a circumstance. End users don't want to teach a program they buy to work they want a working program. Genetic algorithms ARE used to help develop these programs.
Perhaps as people get more tech savy they will see more genetic algorithms in their everyday lives. Thinks like handwriting or voice recognition on PDA's.
Just because something isn't in mainstream use is a poor argument for it's validity. I mean by your argument Brittany spears is one of the greatest vocalists of all time!
Re:Genetic algorithm -Typical creationist rhetoric (Score:2)
>Perhaps as people get more tech savy they will see more genetic algorithms in their everyday lives.
Not likely. GAs (or better Evolutionary algorithms) are quite good at finding an abritrary good solution in a practicably unknown problem space in restricted time, but are terribly inefficient.
So, if you want to find several solutions, it's more efficient to have a good look at the problem space and to find a more efficient algorithm. Often random-search or hill-climber delivers an acceptable solution in much shorter time.
At least, that is what I'm told. I'm lacking practical experience in that field.
> [...] like handwriting or voice recognition on PDA's.
Another EA has delivered us a quite good solution for pattern recognition: the brain. Now, we just have to understand it
On a sidenote, where are the advanced topics the poster spoke of? Not seeing a single link to meta-eas, multipopulations (island models) or speciation.
Links to more Perl, and a link to algorithms for genetics, but evolutionary algorithms?
Because you are impatient (Score:2)
Good point. Come back in a billion years and *then* judge.
Re:Genetic algorithm (Score:1)
God's been sitting back for 5000-5 million years watching his genetic algorithm work, and only had to reboot once . Compare that to the creationism methods of MS that produces systems that have to be rebooted daily, I'd say God's Darwn system works better....
Re:Genetic algorithm (Score:1)
hold on a minute? (Score:2, Funny)
I mean, didn't Darwin denounce evolution on his deathbed?
---Lane
Re:hold on a minute? (Score:2)
Re:hold on a minute? (Score:3, Informative)
I know that's a joke, but just in case someone decides to take it seriously....
This is one of those persistent myths. Darwin apparently did dislike the way certain atheists tried to appropriate his work as a theological agrument, but there's no proof he ever disavowed evolution or converted back to Christianity at the end of his life. (Review: The Darwin Legend by James Moore) [rpi.edu]
That said, evolution and theology have little to do with each other. If you believe in God (or some version thereof), there's no reason to disbelieve that she/he/it used evolution as a mechanism of creation. Personally, I think a supreme being is an unnecessary complication, but that's not related to evolution either.
Re:hold on a minute? (Score:2)
Sounds like a great hedge to me. If God exists, then the denunciation may save him. If not, then the Universe does not give a fudge about what he denounces because it is "un-caring". Thus, no risk.
Performance (Score:2, Funny)
Almost like real evolution at work.
Re:Performance (Score:1)
Well, to me Perl does indeed look like the raw guts of some kind of living creature.
Uhh, but why? (Score:2)
Perl: Kinda Cool
I hate to say it but Perl+GA's sounds like an education in ridiculousness. GA's are slow, Perl is slow. GA's are complicated and esoteric, Perl is esoteric and (in some cases) unmaintainable. Hmm. Can you image the number of bugs that must exist in this code?
Anyway, I'm all for new tech GA's but implementing in perl seems like a wasted effort.
-Sean
Re:Uhh, but why? (Score:4, Interesting)
Do you even know what esoteric means? Can you give me a definition of it that applies to Perl but not, for instance, C? Very few people on this planet can program, so the activity is by definition esoteric.
Now, I bet you mean that Perl is idiosyncratic, which is another thing entirely. It certainly is, especially compared with say Python, which is very structured. But here we get back to programmer efficiency. Perl's motto is, "There's more than one way to do it." If you can't handle the complexity, you're free to do it your own way. Even if your own way is using another language. Many Perl programmers swear by the language's flexibility and power; those people who prefer more restricted languages are free to use them.
I hope you realize, in retrospect, what a silly statement that is. Yes, poorly-written Perl is hard to maintain. Reply and give me a list of languages that make shitty code easy to maintain, eh?
Your comment about bugs is just as silly. Good programmers write good code; poor programmers write poor code and then blame their tools.
GAs and Perl are a great fit; it's precisely because they're both so alive that they work well together. A highly structured language would make it more difficult to do all sorts of wierd shit that you're not "supposed" to do. GAs are developing faster than the languages we use to describe them. It only makes sense to use the most expressive, idiomatic languages we have to manipulate them.
Re:Uhh, but why? (Score:2)
OT, but that's excactly what languages like COBOL and Java attempt to do, and why they're so popular with business. They enforce a certain minimum structure on every piece of code, they force you to declare (and think about!) types, and they limit the degree to which obfuscation is possible, by restricting certain kinds of features.
To some extent, these languages do succeed at this goal. I've been called in to take over projects in Perl, C++, Java and other languages. I do think it's more difficult to screw up Java code as much as one can in other languages - which is also why it's the last language I'd pick for a personal project, since it's frustratingly restrictive.
Re:Uhh, but why? (Score:1)
Thanks!
Ted
Re:Uhh, but why? (Score:1)
http://www.perl.com/pub/a/2001/06/27/ctoperl.html [perl.com]
Also in the Apache world mod_perl is known to be very fast, even compared to native CGI:s Did you even know that you can save a Perl program to a binary by a certain switch after the interpreter has done its job?
Perl Rules!
Starbar!
Genetic Algorithm Java Applets (Score:4, Informative)
http://cs.felk.cvut.cz/~xobitko/ga/ [felk.cvut.cz]
Dave
hmmm... (Score:2)
ok, who wants to build this DNA and see what happens?
*patent pending
aw shit (Score:2)
Re:hmmm... (Score:2)
perl -e 'for ($a; $a
This terminates. Fun code, though!
Re:hmmm... (Score:2)
the Perl source is screwed up by an HTML filter (Score:1)
http://lifelogs.com/source/words.txt
http://li
Basically the '' characters were filtered out. Sorry for the inconvenience.
Ted
Re:the Perl source is screwed up by an HTML filter (Score:1)
Ted