GOLEM
GOLEM copied to clipboard
Add general crossovers for graphs with cycles
Now we have Crossovers for multi-root graphs thanks to #84 . But we still have no alternative for cycled graphs.
I have an idea on how to apply crossovers that work for DAGs to generic connected graphs with cycles:
Crossover that preserves cycles:
- Find all cycling components in the graph
- Represent cycling components as a kind of "meta"-nodes -- we get "virtual" DAG from cycled graph
- Perform usual crossover on this virtual DAG
- Return usual cycles back from "meta"-nodes The implementation of that can be somewhat involved. I'm not sure if it worth it.
Another idea is to iteratively build 3rd graph by taking random subgraphs in alternating manner from parent graphs.