Re:Genetic Algorithm for Knapsack Problem
by gamegoblin on Wednesday June 19, 2013 @04:46AM
(#5904442)
How does this compare to a the typical branch-and-bound or dynamic programming solution?
[ Parent
| on HN ]
Re:Genetic Algorithm for Knapsack Problem
by pkolaczk on Wednesday June 19, 2013 @06:15AM
(#5904702)
It is very likely worse. GAs and ESs are good only if you can't come up with a dedicated heuristic that understands the structure of the problem it aims to solve.
For this specific problem, if it's allowed to have several items of the same type, the solution is easily noticeable while modelling dynamic programming problem, without writing any code.