Generic implementation of a genetic algorithm with two example use cases: Knapsack Problem and Traveling Sales Person Problem.