Feat: implement Mantis Shrimp Optimization Algorithm (MShOA)#741
Feat: implement Mantis Shrimp Optimization Algorithm (MShOA)#741firefly-cpp merged 9 commits intoNiaOrg:masterfrom
Conversation
firefly-cpp
left a comment
There was a problem hiding this comment.
Dear @gunbaz,
Thank you for your pull request. I am not yet familiar with this metaphor‑based nature‑inspired algorithm, but it certainly looks like an interesting addition to the library.
Could you confirm whether the results of this implementation match those of the original implementation?
Also, please add a test scenario and an example, and include algo information in the Algorithms.md file.
Removed unnecessary blank line in test_run_iteration.
|
Dear @firefly-cpp , Thank you for the review and the requested changes. All pending issues have now been addressed: The implementation has been fully aligned with the mathematical model from the original paper, and the logic has been reviewed again to ensure correctness. A complete test scenario (test_mshoa.py) has been added and validated. An example script (run_mshoa.py) is included for reproducibility. Algorithm details have been added to Algorithms.md. All Codacy issues (merge markers, long lines, trailing whitespace) have been fully resolved. Please let me know if anything else needs adjustment. |
|
Thanks, @gunbaz! I think this PR is ready for inclusion in niapy. I will ask @GregaVrbancic to publish a new version once the PR is merged. @gunbaz, when the new version is released, could you please test it? |
|
Sure, I'll test it once the new version is released. Thanks! |
🦗 Algorithm Description
This PR implements the Mantis Search Algorithm (MShOA), a novel bio-inspired meta-heuristic algorithm based on the aggressive hunting behavior of Mantis Shrimp.
Reference:
Sánchez Cortez, J. A., et al. (2025). "A Novel Bio-Inspired Optimization Algorithm Based on Mantis Shrimp Survival Tactics". Mathematics, 13(9), 1500.
🚀 Performance & Efficiency Benchmark
To demonstrate the algorithm's capability, I conducted a robust benchmark comparing MShOA against standard NiaPy implementations of PSO, DE, and GWO.
Test Conditions:
🏆 Results:
As seen in the benchmark graph below, MShOA (Red Bar/Line) demonstrates superior performance in two key areas:
Speed (Computational Efficiency):
Accuracy (Convergence):
✅ Checklist
mshoa.py)MantisSearchAlgorithmto__init__.py