Evolutionary Algorithms are great because what you have to define is not how to solve the problem, but some measure of how close a particular guess at a solution is to the correct answer. This is often easier! This measure of fitness is basically the "environment", and as we know, evolution fits the population to the environment. Then all you do is start your population off with random guesses, breed and mutate the fittest (the ones that are closest to the solution) and you'll rapidly get a very accurate answer.
Perhaps the best thing about coding up these algorithms is that it teaches us how evolution works, that evolution works well to solve problems, and that randomness and mutation are key to it working, and they're used to solve problems, not make a mess.