Skip to content

victor-mlai/GeneticAlgorithm

Repository files navigation

GeneticAlgorithm

solves the Knapsack problem

The DNA

contains 0s and 1s.

0 means the object i is not included in the knapsack

Selection

uses the proportional roulette wheel selection

Cross-over

randomly choose the gene from parent0 or parent1

Mutation

randomly flip the bit ( 1->0 and 0->1 )

Repeat until I get the same result nr_tries times

About

solves the Knapsack problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages