nnaisense / evotorch

Advanced evolutionary computation library built directly on top of PyTorch, created at NNAISENSE.
https://evotorch.ai
Apache License 2.0
997 stars 62 forks source link

Introduce functional genetic algorithm operators #109

Open engintoklu opened 1 month ago

engintoklu commented 1 month ago

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.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 75.32957% with 131 lines in your changes missing coverage. Please review.

Project coverage is 76.80%. Comparing base (5c58566) to head (6644480). Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
src/evotorch/operators/functional.py 81.53% 89 Missing :warning:
src/evotorch/core.py 14.28% 36 Missing :warning:
src/evotorch/tools/immutable.py 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.