-
Notifications
You must be signed in to change notification settings - Fork 63
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
Introduce functional genetic algorithm operators #109
base: master
Are you sure you want to change the base?
Conversation
Alternative implementations for genetic algorithm operators are introduced. These alternative implementations conform to the paradigm of functional programming, and they are batchable (via simply adding a leftmost dimension to the population, or via `torch.func.vmap`). A custom genetic algorithm can be implemented by combining these operators.
for more information, see https://pre-commit.ci
This commit adds a new example notebook which demonstrates how one can use the functional operators API to solve problems where a solution is expressed via objects. A bugfix is also introduced for the method `make_callable_evaluator` for problems where the dtype is set as object.
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #109 +/- ##
==========================================
+ Coverage 76.74% 76.80% +0.05%
==========================================
Files 49 58 +9
Lines 7509 9000 +1491
==========================================
+ Hits 5763 6912 +1149
- Misses 1746 2088 +342 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it
Alternative implementations for genetic algorithm operators are introduced. These alternative implementations conform to the paradigm of functional programming, and they are batchable (via simply adding a leftmost dimension to the population, or via
torch.func.vmap
).A custom genetic algorithm can be implemented by combining these operators.