Krista's Coding Corner


Genetic algorithms

Genetic algorithms, sounds quite hard, don't they? But they aren't that bad. I once made this example for one occasion, and I think it is the best way to show what genetic algorithms are.

These algorithms are way to solve problems. We have just stole the solving techinique from nature. If you think about it: the technique is REALLY old and has seen thousands of years of product development, so it has to be good. ^^

Here are some snippets from the program output. They show what the program does == evolves the sentence until it is what we want.

PS. Because we use command "random" the output or the road to the final result isn't always the same. Sometimes it takes more rounds and sometimes it takes less. If you would be like really really lucky, the answer could be found almost immediately but the odds are agaist you :)

Commit Log

- 28.04.2012 Added screenshot.

blog comments powered by Disqus