Skip to content

feat: add crossTopTwo and crossTopThree multi-parent crossover operators#442

Closed
Yadelew-zemene wants to merge 2 commits into
iCog-Labs-Dev:devfrom
Yadelew-zemene:feature/cross-top-k
Closed

feat: add crossTopTwo and crossTopThree multi-parent crossover operators#442
Yadelew-zemene wants to merge 2 commits into
iCog-Labs-Dev:devfrom
Yadelew-zemene:feature/cross-top-k

Conversation

@Yadelew-zemene

Copy link
Copy Markdown
Contributor

Purpose

Introduce multi-parent crossover operators to improve exploration in hill climbing:

  • crossTopTwo → pairwise crossover
  • crossTopThree → 3-simplex crossover

What’s included

  • Added crossTopTwo with pairwise instance merging
  • Added crossTopThree with triple-instance merging
  • Implemented structured loop hierarchy (inner / middle / outer)
  • Added helper functions for instance extraction and merging
  • Added unit tests for loop components and top-level functions

Key idea

Instead of crossing a single parent with others, this introduces:

  • pairwise recombination (2-parent)
  • triple recombination (3-parent)

This enables richer interaction between high-quality candidates and improves diversity of generated instances.

Notes for reviewers

Recommended review order:

  1. cross-top-two-helpers.metta
  2. cross-top-two.metta
  3. cross-top-three-helpers.metta
  4. cross-top-three.metta
  5. test/cross-top-two-test.metta
  6. test/cross-top-three-test.metta

Testing

  • Unit tests added for:
    • merge helpers
    • loop structures (inner / middle / outer)
  • Structural tests validate limit constraints on generated instances

Yagth and others added 2 commits April 14, 2026 09:54
- added crossTopTwo (pairwise crossover)
- added crossTopThree (3-simplex crossover)
- added helper functions for merging instances pairwise and multi-level merging
- added unit tests for loops and top-level functions
- ensured limit constraints are respected
@Yagth Yagth changed the base branch from main to dev May 6, 2026 10:13
@Yagth Yagth closed this May 6, 2026
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.

2 participants