A generic implementation of genetic algorithm for a customizable fitness function in a single dimensional search space.