feat(ga): Overhaul GA for multi-root robustness and CPU performance
All checks were successful
All checks were successful
### 🚀 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.
This commit was merged in pull request #21.
This commit is contained in:
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
||||
[project]
|
||||
# --- Core Metadata ---
|
||||
name = "polysolve"
|
||||
version = "0.5.1"
|
||||
version = "0.6.0"
|
||||
authors = [
|
||||
{ name="Jonathan Rampersad", email="jonathan@jono-rams.work" },
|
||||
]
|
||||
@@ -33,7 +33,8 @@ classifiers = [
|
||||
|
||||
# --- Dependencies ---
|
||||
dependencies = [
|
||||
"numpy>=1.21"
|
||||
"numpy>=1.21",
|
||||
"numba"
|
||||
]
|
||||
|
||||
# --- Optional Dependencies (Extras) ---
|
||||
|
||||
Reference in New Issue
Block a user