Skip to content

Update 1.4.0#148

Merged
HyperCodec merged 44 commits intomainfrom
dev
Mar 10, 2026
Merged

Update 1.4.0#148
HyperCodec merged 44 commits intomainfrom
dev

Conversation

@HyperCodec
Copy link
Owner

Many small internal rewrites/QoL features, as well as a complete rewrite of the speciation feature with tons of new functionality.

HyperCodec and others added 30 commits March 9, 2026 13:04
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Fix ActionIfIsolated::DoNothing infinite loop when all species are isolated
…Cargo.toml

Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
…ayered-observer

Add QoL trait impls to `LayeredObserver`
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Add examples to CI workflow, register missing example metadata, and add comprehensive test suite
@HyperCodec HyperCodec self-assigned this Mar 10, 2026
@HyperCodec HyperCodec added the enhancement New feature or request label Mar 10, 2026
@HyperCodec HyperCodec marked this pull request as ready for review March 10, 2026 12:51
Copilot AI review requested due to automatic review settings March 10, 2026 12:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates genetic-rs toward the 1.4.0 release by introducing a redesigned speciation core (shared in genetic-rs-common), updating builtin speciated eliminator/repopulator behavior, and adding a larger integration-test suite plus CI coverage for examples.

Changes:

  • Add new speciation module in genetic-rs-common (Speciated, SpeciatedPopulation) and re-export Speciated via the prelude under the speciation feature.
  • Implement/update speciated builtin components (SpeciatedFitnessEliminator, SpeciatedCrossoverRepopulator) and observer QoL (FitnessObserver layering trait impls).
  • Add integration tests + feature-gated [[test]] entries and run examples in CI; update speciation example + README text.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
genetic-rs/tests/speciation.rs New integration tests covering speciated population grouping/iteration and speciated eliminator invariants.
genetic-rs/tests/simulation.rs New integration tests for GeneticSim invariants and FitnessEliminator behavior.
genetic-rs/tests/repopulator.rs New integration tests for builtin repopulators and FromParent.
genetic-rs/tests/knockout.rs New integration tests for knockout eliminator behavior and helpers.
genetic-rs/tests/eliminator.rs Adds tests validating new LayeredObserver trait impls (Default/Clone/Debug/Eq).
genetic-rs/examples/speciation.rs Updates speciation example to new divergence-based API and new speciated wrappers.
genetic-rs/Cargo.toml Adds [[example]] and [[test]] entries with required-features for gated execution.
genetic-rs-common/src/speciation.rs New shared speciation API: Speciated + SpeciatedPopulation utilities.
genetic-rs-common/src/prelude.rs Re-exports Speciated behind the speciation feature.
genetic-rs-common/src/lib.rs Exposes new speciation module behind the speciation feature.
genetic-rs-common/src/builtin/repopulator.rs Adds FromParent, Default for crossover repopulator, and rewrites speciated crossover repopulator logic.
genetic-rs-common/src/builtin/eliminator.rs Adds closure observer impl and derives for LayeredObserver; introduces SpeciatedFitnessEliminator.
README.md Adds ecosystem section and updates “minimal usage” wording.
.github/workflows/ci-cd.yml Adds a job to run examples in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Mar 10, 2026

@HyperCodec I've opened a new pull request, #149, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Mar 10, 2026

@HyperCodec I've opened a new pull request, #150, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 10, 2026 13:05
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Broaden FitnessObserver blanket impl to accept FnMut closures
Copilot AI and others added 2 commits March 10, 2026 13:07
…rce invariants

Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Restrict `SpeciatedPopulation::species` to enforce non-empty species invariant
@HyperCodec HyperCodec merged commit 882d66d into main Mar 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants