Replies: 1 comment
-
Looks good, thanks for bringing it over! I actually have a use case for this right now, I'll get back with some feedback on my experience on using it in practice. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've added a simple genetic optimization solver for continuous functions to my fork -
https://github.com/cuda/mathnet-numerics/tree/ga
I'm not sure of the design. I used delegates for the primary functions (pairing, mating, mutating, evaluating/cost, and convergence) so users could pass in lambdas.
Simple example using defaults (minimize x^2 where -10 < x < 10):
The solver takes in a cost function as a delegate and an IList of bounds.
Users can override the default behavior by setting the various delegates using lambdas (or they could use regular methods):
I prefixed the solver and bounds with Continuous so we could support other function types in the future, but since they are already in the Continuous namespace it might be redundant.
Any comments on the design or code would be greatly appreciated.
Thanks,
Marcus
Beta Was this translation helpful? Give feedback.
All reactions