Hacker News new | past | comments | ask | show | jobs | submit login

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.




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".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: