This class provides an implementation of the extended classic knapsack
problem using a genetic algorithm. The goal of the problem is to reach a given
volume (of a knapsack) by putting a number of items into the knapsack.
The closer the sum of the item volumes to the given volume the better.
The extension to the classic knapsack is that each item can have a specific
color. The fewer colors the items in the packed knapsack have, the better
the solution is regarded.
For further descriptions, compare the "coins" example also provided.
author: Klaus Meffert since: 3.0 |