Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Differential Evolution Algorithm #499

Open
steinhauserc opened this issue May 6, 2024 · 2 comments
Open

Add Differential Evolution Algorithm #499

steinhauserc opened this issue May 6, 2024 · 2 comments

Comments

@steinhauserc
Copy link

Differential evolution would be an addition to the evolutionary algorithms implemented in argmin-rs. The only other I've seen so far is Particle Swarm Optimization. It's good that this algorithm implementation already exists because some things like PopulationState already exists.

A "full" implementation would have a relatively large list of different evolution strategies (see scipy.optimize.differential_evolution for examples). I think it would be reasonable for the initial implementation in argmin-rs to have a couple of different strategies available and to be implemented such that it's relatively simple to add additional strategies in the future.

@steinhauserc
Copy link
Author

I'm new to rust but am happy to work on adding this algorithm to argmin-rs. It's a bit of a small task to help me learn. I may have a question or two along the way. From reading the Particle Swarm Optimization, I think it will be relatively simple to use that as an example outline for how to implement the algorithm in the argmin-rs. framework.

@steinhauserc
Copy link
Author

I think I'm most of the way to having an initial implementation working but I'm getting hung up on the following. Part of the evolution step involves constructing a state vector where some of the elements come from vector x and others come from a "mutated" vector.

To borrow from the wikipedia page, here's a text description of what's happening.

If r_i < CR or i=R, then set y_i = ..., otherwise set y_i=x_i

This just requires being able to modify indexed values of each state vector which feels like it should be trivial, but I'm having trouble making it happen within the framework where type P has a list of traits (like here).

I might be able to make it work for me individually, but part of my objective for this initial rust project is to make it compliant with the overall library.

Any help pointing me in the right direction would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant