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 support for grammatical evolution #311

Open
markcoletti opened this issue Oct 19, 2023 · 8 comments
Open

Add support for grammatical evolution #311

markcoletti opened this issue Oct 19, 2023 · 8 comments
Assignees
Labels
needs-driven Needed for an immediate application
Milestone

Comments

@markcoletti
Copy link
Collaborator

We have a few work-related needs for grammatical evolution support.

@markcoletti markcoletti added this to the Release 0.9 milestone Oct 19, 2023
@markcoletti markcoletti added the needs-driven Needed for an immediate application label Oct 19, 2023
@escott-mitre
Copy link
Contributor

@escott-mitre
Copy link
Contributor

escott-mitre commented Nov 4, 2023

I like how PonyGE calls its high-level EA a "search_loop"

That's more intuitive than the way we call our generational_ea methods and the like "metaheuristics" or "monolithic algorithms." They are search loops.

@escott-mitre
Copy link
Contributor

escott-mitre commented Nov 4, 2023

What we will want from PonyGE2 is in the grammar.py and possibly derivation.py modules.

PonyGE2 is well-organized and documented at the meso-level, but doesn't appear to have unit tests. So we'll start there.

@escott-mitre
Copy link
Contributor

Cataloguing a few places in grammar.py that we'll need to refactor and/or think about to make compatible with LEAP:

Special "ramping" and "reverse-mapping" features:
image

Problem-specific parameters that Pony associates with a fitness function:
image

Dependence of ramping on population size:
image

@escott-mitre
Copy link
Contributor

escott-mitre commented Nov 4, 2023

See the PonyGE2 tech report. The complication around ramping is probably part of the "Ramped Half-and-Half" initialization scheme they discuss.

Paper discussing initailization schemes in GE—may need to read it to understand what the code is doing: Fagan et al., 2016

@SigmaX SigmaX self-assigned this Jan 15, 2024
@lukepmccombs
Copy link
Collaborator

lukepmccombs commented Jan 17, 2024

Genomes are mapped to phenomes here mapper.py

@lukepmccombs
Copy link
Collaborator

lukepmccombs commented Jan 29, 2024

Started trying to translate code on my end, beginning with constructing the Tree class and all its base functionality. I wasn't eager to use their classes (some functions I found clunky or they depend on their framework) and was looking to replace it with an existing library if possible. rustworkx won't work since you can't order a traversal without effectively rebuilding the tree elsewhere. I found treelib which looks well used and has a lot of the base functionality we'd need to implement and maintain (subtree replacement, tree expansion / traversal, etc.). Their documentation isn't the easiest to work with, though.

@escott-mitre
Copy link
Contributor

@lukepmccombs — Any further thoughts/progress/plans on this?

We're dusting it off to try and continue. What we've got (and you'd already seen) is a light adaptation of the Grammar class in the 311-ge branch. I still had a couple questions about how it works but having perfect docs/test suite maybe isn't the most important.

Looks like what still needs done is

  • Porting over the mapper functions, which you noted use a custom Tree implementation, and
  • Porting over the derivation module (Or is this really needed?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-driven Needed for an immediate application
Projects
None yet
Development

No branches or pull requests

4 participants