Skip to content

Latest commit

History

History
23 lines (15 loc) 路 2.43 KB

README.md

File metadata and controls

23 lines (15 loc) 路 2.43 KB

.github/workflows/build.yml

knapsack-problem

Jenetics is an awesome Java library for genetic algorithms (GAs). Many Jenetics examples are very concise and make excessive use of lambdas, which can make it hard for beginners to take them as a starting point for their custom problems.

The goal of this project is to provide a detailed implementation that solves the infamous knapsack problem, implementing the following interfaces to illustrate Jenetics' core concepts:

The Problem(s)

The project consists of two implementations: a single- (so package) and a multi-objective optimization (mo package). Both knapsack problems stem from John Burkardt's home page from the Department of Scientific Computing of the Florida State University:

Note that while the knapsack problem is a good example to demonstrate a single-objective GA, it is generally not necessary to use a multi-objective GA for multiple knapsacks. The different objectives鈥攊.e. the separate knapsacks鈥攄o not compete with each other. One is basically only interested in the combination of knapsacks that yields the highest profit. However, the example still helps to get used to Jenetics' relatively new API for multi-objective problems (io.jenetics.ext.moea).