r/algorithms • u/AshishKhuraishy • Dec 07 '18
Genetic Algorithm - Applications & Examples
https://codecampanion.blogspot.com/2018/12/genetic-algorithm-explained.html
28
Upvotes
2
u/e_for_oil-er Dec 07 '18
I implemented a genetic algorithm in an Optimization class, and I was surprised of the efficiency and precision it had! In some cases (bumpy functions with a lot of local minimums), the algorithm (differential evolution) was better than traditional gradient descent methods because it could go "uphill" when reaching a local convexity zone, something gradient methods do not usually allow.
1
u/successbux Dec 07 '18
I am implementing a genetic algorithm for travelling salesman problem with modified cycle crossover Man it's real tough
3
u/[deleted] Dec 08 '18
I mean, I guess I'll be the contrarian. Can we just stop saying that genetic algorithms are good for solving TSP instances? They're not. Branch and cut algorithms can solve (to provable optimality) TSP instances on hundreds of nodes in seconds on a laptop. Concorde, arguable the best TSP solver out there, has solved (again, provable optimality) an instance with 85900 nodes, using branch and cut.
Genetic algorithms have their place. But if your problem can be easily modeled as an integer linear program, you're almost surely better off using branch and cut.