feat(ga, api): Implement advanced GA strategy and refactor API for v0.4.0 #16
Reference in New Issue
Block a user
Delete Branch "v0.4.0-dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit introduces a major enhancement to the genetic algorithm's convergence logic and refactors key parts of the API for better clarity and usability.
feat(ga): Re-implements the GA solver (CPU & CUDA) to use a more robust strategy based on Elitism, Crossover, and Mutation. This replaces the previous, less efficient model and is designed to significantly improve accuracy and convergence speed.
feat(api): Updates
GA_Optionsto expose the new GA strategy parameters:mutation_percentagetomutation_strengthfor clarity.elite_ratio,crossover_ratio, andmutation_ratio.__post_init__validator to ensure ratios are valid.refactor(api): Moves
quadratic_solvefrom a standalone function to a method of theFunctionclass (f1.quadratic_solve()). This provides a cleaner, more object-oriented API.docs: Updates the README,
GA_Optionsdoc page, andquadratic_solvedoc page to reflect all API changes, new parameters, and updated usage examples.chore: Bumps version to 0.4.0.
This commit introduces a major enhancement to the genetic algorithm's convergence logic and refactors key parts of the API for better clarity and usability. - **feat(ga):** Re-implements the GA solver (CPU & CUDA) to use a more robust strategy based on Elitism, Crossover, and Mutation. This replaces the previous, less efficient model and is designed to significantly improve accuracy and convergence speed. - **feat(api):** Updates `GA_Options` to expose the new GA strategy parameters: - Renames `mutation_percentage` to `mutation_strength` for clarity. - Adds `elite_ratio`, `crossover_ratio`, and `mutation_ratio`. - Includes a `__post_init__` validator to ensure ratios are valid. - **refactor(api):** Moves `quadratic_solve` from a standalone function to a method of the `Function` class (`f1.quadratic_solve()`). This provides a cleaner, more object-oriented API. - **docs:** Updates the README, `GA_Options` doc page, and `quadratic_solve` doc page to reflect all API changes, new parameters, and updated usage examples. - **chore:** Bumps version to 0.4.0.