The art of solving problems using genetic algorithms
Genetic algorithms provide us with a powerful and versatile tool that can be used to solve a wide array of problems and tasks. When we set to work on a new problem, we need to customize the tool and match it to that problem. This is done by making several choices, as described in the following paragraphs.
First, we need to determine the fitness function. This is how each individual will be evaluated, where larger values represent better individuals. The function does not have to be mathematical. It can be represented by an algorithm, a call to an external service, or even a result of a game played, to list a few options. We just need a way to programmatically retrieve the fitness value for any given proposed solution (individual).
Next, we need to choose an appropriate chromosome encoding. This is based on the parameters we send to the fitness function. So far, we have seen binary, integer, an ordered list, and real-coded examples...