Using Genetic Algorithms in Ruby - via @codeship
Did you know that there's a way to use the power of natural selection to solve programming challenges? It's when you want to find not just a valid solution but the solution that will give you the best results. For example, if you have a backpack that only fits a certain amount of stuff and you want to maximize the amount of stuff you can bring, then you could use a genetic algorithm to find the best solution. This is also known as *the knapsack problem*. The genetic algorithm is not the only way to solve this kind of problem, but it's an interesting one because it's modeled after real-world behavior.
Mar-15-2018, 14:32:58 GMT
- Technology: