feat(ga): Overhaul GA for multi-root robustness and CPU performance #21

Merged
jono merged 1 commits from v0.6.0-dev into main 2025-10-30 15:36:07 +00:00
Owner

🚀 Performance (CPU)

  • Replaces np.polyval with a parallel Numba JIT function (_calculate_ranks_numba).
  • Replaces O(N \log N) np.argsort with O(N) np.argpartition in the GA loop.
  • Adds numba as a core dependency.

🧠 Robustness (Algorithm)

  • Implements Blend Crossover (BLX-\alpha) for better, extrapolative exploration.
  • Uses a hybrid selection model (top X% for crossover, 100% for mutation) to preserve root niches.
  • Adds selection_percentile and blend_alpha to GA_Options for tuning.
### 🚀 Performance (CPU) * Replaces `np.polyval` with a parallel Numba JIT function (`_calculate_ranks_numba`). * Replaces $O(N \log N)$ `np.argsort` with $O(N)$ `np.argpartition` in the GA loop. * Adds `numba` as a core dependency. ### 🧠 Robustness (Algorithm) * Implements Blend Crossover (BLX-$\alpha$) for better, extrapolative exploration. * Uses a hybrid selection model (top X% for crossover, 100% for mutation) to preserve root niches. * Adds `selection_percentile` and `blend_alpha` to `GA_Options` for tuning.
jono added 1 commit 2025-10-30 15:31:45 +00:00
feat(ga): Overhaul GA for multi-root robustness and CPU performance
All checks were successful
Run Python Tests / test (3.12) (pull_request) Successful in 34s
Run Python Tests / test (3.8) (pull_request) Successful in 35s
Run Python Tests / test (3.10) (pull_request) Successful in 3m8s
Publish Python Package to PyPI / deploy (push) Successful in 12s
9d967210fa
### 🚀 Performance (CPU)
* Replaces `np.polyval` with a parallel Numba JIT function (`_calculate_ranks_numba`).
* Replaces $O(N \log N)$ `np.argsort` with $O(N)$ `np.argpartition` in the GA loop.
* Adds `numba` as a core dependency.

### 🧠 Robustness (Algorithm)
* Implements Blend Crossover (BLX-$\alpha$) for better, extrapolative exploration.
* Uses a hybrid selection model (top X% for crossover, 100% for mutation) to preserve root niches.
* Adds `selection_percentile` and `blend_alpha` to `GA_Options` for tuning.
jono merged commit 9d967210fa into main 2025-10-30 15:36:07 +00:00
jono deleted branch v0.6.0-dev 2025-10-30 15:36:07 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jono/PolySolve#21