Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 385 Bytes

File metadata and controls

10 lines (6 loc) · 385 Bytes

Knapsack---Genetic-Algorithms

This is an example of solving the knapsack problem using Genetic Algorithms.

Global optimum is obtained in almost 80% of the total runs.

Elitism and wheel selection based on a cumulative probability distribution are used for selection of parents.

Crossover and mutation are fairly straightforward.

Compiled using g++ 7.1.1 and tested on Arch Linux.