News for hackers. Stuff that matters.
Re:Intro to Genetic Algorithms in Javascript Part 2 by bkanber on Saturday September 15, 2012 @05:16PM (#4527338)
Correct and correct.

The knapsack problem does have an excellent dynamic programming solution. And of course, where there's a simpler algorithm, you should use it.

This article isn't about the knapsack problem; it's about learning GAs. The knapsack problem is just an easy-to-visualize and easy-to-implement problem to solve in order to demonstrate features of genetic algorithms.

Re:Intro to Genetic Algorithms in Javascript Part 2 by Swizec on Saturday September 15, 2012 @05:38PM (#4527384)
Fair point.

I once used genetic algorithms for path planning where A* would do. While it was fun to implement, the scoring was based on "goodness of path found in time X" ... I didn't get a very high score on that homework.

On the other hand, I got a surprisingly high score for what was essentially "random guessing until you run out of time".