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

Enumerative algorithm for synthesis #251

Merged
merged 7 commits into from
Nov 3, 2024
Merged

Enumerative algorithm for synthesis #251

merged 7 commits into from
Nov 3, 2024

Conversation

alcides
Copy link
Owner

@alcides alcides commented Nov 1, 2024

This PR introduces a new SearchAlgorithm: EnumerativeSearch.

It uses generators to yield all individuals that are possible in the grammar, via BFS (smaller individuals first).

  • Core algorithm
  • iterate for all Metahandlers
  • support for dependent types.

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 81.77778% with 41 lines in your changes missing coverage. Please review.

Project coverage is 89.11%. Comparing base (aa263bd) to head (84a7e36).
Report is 82 commits behind head on main.

Files with missing lines Patch % Lines
geneticengine/algorithms/enumerative.py 75.94% 19 Missing ⚠️
geneticengine/grammar/metahandlers/strings.py 36.36% 7 Missing ⚠️
geneticengine/grammar/metahandlers/floats.py 33.33% 4 Missing ⚠️
geneticengine/algorithms/gp/operators/selection.py 25.00% 3 Missing ⚠️
geneticengine/grammar/metahandlers/ints.py 77.77% 2 Missing ⚠️
geneticengine/representations/tree/operators.py 60.00% 2 Missing ⚠️
...neticengine/algorithms/gp/operators/combinators.py 50.00% 1 Missing ⚠️
geneticengine/algorithms/one_plus_one.py 66.66% 1 Missing ⚠️
geneticengine/grammar/metahandlers/vars.py 66.66% 1 Missing ⚠️
geneticengine/representations/common.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
+ Coverage   89.10%   89.11%   +0.01%     
==========================================
  Files          90       91       +1     
  Lines        4717     4816      +99     
==========================================
+ Hits         4203     4292      +89     
- Misses        514      524      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alcides
Copy link
Owner Author

alcides commented Nov 2, 2024

Closes #151.

@alcides alcides merged commit 80af28a into main Nov 3, 2024
9 of 10 checks passed
@alcides alcides deleted the enumerative branch November 19, 2024 08:45
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

Successfully merging this pull request may close these issues.

1 participant