Open idabmat opened 2 years ago
Hi @idabmat ! Thank you for your contributions! I think this is a good idea! Right now I don't have much bandwidth to maintain this library anymore, if you would like I can transfer ownership and offer guidance from time to time!
In my opinion any direction forward for evolutionary algorithms in Elixir should use Nx. For example: https://github.com/jonatanklosko/meow
If you're interested in contributing something in this direction let me know :)
Thanks for the reply @seanmor5. I imagine you have enough on your plate :). I am happy to contribute to this library in any way you see fit. Either sending PRs or maintaining it. Thanks for the link to meow. Will have a look at it.
To use Genex today, a user builds a module and defines three functions. If the problem has parameters that impact how these functions should work, they can define functions to hold that data. That is the approach taken in the knapsack problem example.
But then what happens if the user wants to solve different versions of the same problem? Like solving the knapsack problem with other weights/profits/weight limits. Currently, they would have to either rewrite the module every time or duplicate it for each version. While working through Genetic Algorithms in Elixir, I opted for protocols when implementing the book's framework. I found the result easier to customise. Again, taking the knapsack problem as an example, the code would look something like this:
That would be a breaking change, but since
1.0
was not yet released, I thought this could be an appropriate time to suggest such a change.Would a PR introducing this be welcome?