Coders Packet

Optimisation of Knapsack Problem Using Genetic Algorithm In Python

By Deepak Kumar Jha

The Knapsack problem is one of the contemporary problems of modern computing and we will try to solve this using a Genetic Algorithm.

Basic solutions to the Knapsack problems with a high enough given number of items can take a very long time to compute. This is where genetic algorithms come into play. These algorithms produce random generation, where crossover and mutations of solutions take place, and then using a fitness function passes on the best solutions to next generation (in nature this is known as natural selection) to repeat the same on the new population till the time we hit the number of generation limit or achieve the fitness score expected from it.

Download Complete Code


No comments yet