[WIP] Update docstrings for physics-inspired algorithms#105
Merged
Conversation
Co-authored-by: Anselmoo <13209783+Anselmoo@users.noreply.github.com>
…n physics-inspired optimizers Co-authored-by: Anselmoo <13209783+Anselmoo@users.noreply.github.com>
Contributor
Author
Fixed in commit b934eb1: Linting issues resolved:
Parameter descriptions expanded:
All optimizers tested and working correctly. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR completes the COCO/BBOB compliant docstring updates for all 4 physics-inspired optimization algorithms. The work adds comprehensive documentation following the COCO/BBOB template, fixes linting issues by replacing unicode symbols with LaTeX notation, and adds required seed parameter support for reproducibility.
Key changes:
- Added complete algorithm metadata, mathematical formulations, and BBOB performance characteristics for all 4 algorithms
- Enhanced parameter descriptions from terse to comprehensive format
- Fixed all RUF002 linting warnings by replacing
×with$\times$LaTeX notation - Added
seedparameter to ASO and RIME algorithms for BBOB compliance
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
opt/physics_inspired/rime_optimizer.py |
Complete RIME docstring with ice formation physics model, added seed parameter, expanded hyperparameter descriptions, fixed LaTeX notation |
opt/physics_inspired/gravitational_search.py |
Complete GSA docstring emphasizing Newton's gravity laws, mass-fitness relationship, expanded parameter descriptions with detailed physics explanations |
opt/physics_inspired/equilibrium_optimizer.py |
Complete EO docstring with mass balance equilibrium physics, control volume formulation, comprehensive parameter documentation |
opt/physics_inspired/atom_search.py |
Complete ASO docstring with Lennard-Jones molecular dynamics, added seed parameter, detailed force calculation explanations |
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update Optimizer Docstrings - Physics-Inspired Category (4 files) ✅ COMPLETE
All Tasks Completed ✅
gravitational_search.pydocstring (GSA - Newton's gravity laws)equilibrium_optimizer.pydocstring (EO - Mass balance equilibrium)atom_search.pydocstring (ASO - Molecular dynamics)rime_optimizer.pydocstring (RIME - Ice formation physics)seedparameter support toatom_search.pyandrime_optimizer.py(BBOB requirement)uv run ruff check opt/physics_inspired/Acceptance Criteria ✅
uv run ruff check opt/physics_inspired/(0 errors)Latest Changes (Dec 24, 2025)
Fixed Linting Issues:
×with$\times$LaTeX notation in Complexity metadata field (all 4 files)×with$\times$in BBOB budget usage notes (all 4 files)Enhanced Descriptions:
Expanded hyperparameter table descriptions from terse to comprehensive:
Before:
Number of agents (solutions)After:
Number of agents (candidate solutions) in populationBefore:
Maximum iterationsAfter:
Maximum number of iterations for optimizationBefore:
Generation rate controlAfter:
Generation rate control constant (controls magnitude)Summary
Physics-Inspired Category: 4/4 files complete (100%)
All files now include:
Physics Analogies Emphasized:
BBOB Compliance:
np.random.default_rng(self.seed)seed=42Validation:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.