Skip to content

Conversation

@Sadik-Ahmet
Copy link

This PR adds the Narwhal Optimization Algorithm (NWOA) to mealpy's collection of swarm-based metaheuristic algorithms. NWOA is a nature-inspired optimization algorithm that mimics the hunting behavior and echolocation capabilities of narwhals.

🔬 Algorithm Overview

NWOA draws inspiration from narwhals' unique characteristics:

  • Echolocation clicks that intensify as they approach prey
  • Spiral tusk used for stunning prey during hunting
  • Sonar communication for sharing prey location information
  • Energy-based pursuit modeling predator-prey dynamics

The algorithm balances exploration and exploitation through wave strength modeling, cosine similarity distance, prey energy decay, and dynamic exploration ratio.

📚 Reference

Paper:

Masadeh, R., Almomani, O., Zaqebah, A., Masadeh, S., Alshqurat, K., Sharieh, A., & Alsharman, N. (2025).
Narwhal Optimizer: A Nature-Inspired Optimization Algorithm for Solving Complex Optimization Problems.
Computers, Materials & Continua, 85(2).
DOI: 10.32604/cmc.2025.066797

✨ Implementation Features

  • ✅ Full compliance with mealpy's Optimizer base class
  • ✅ All 17 equations from original paper implemented
  • ✅ Type hints and comprehensive docstrings
  • ✅ Parameter validation and boundary handling
  • ✅ Tested on CEC 2017 benchmark suite

📁 Files Added/Modified

  • mealpy/swarm_based/NWOA.py - OriginalNWOA implementation (213 lines)
  • mealpy/__init__.py - Added NWOA import
  • tests/swarm_based/test_NWOA.py - Comprehensive tests

🧪 Testing

✅ Import tests passed
✅ Sphere function test (fitness: 3.30e+00)
✅ Algorithm converges correctly

Ready for review! 🚀

- Add OriginalNWOA implementation to swarm_based
- Add comprehensive tests for NWOA
- Update mealpy __init__.py to export NWOA
- Add documentation and examples

Implements bio-inspired algorithm based on narwhal hunting
behavior with sonar waves and energy-based convergence.

Ref: https://doi.org/10.32604/cmc.2025.066797
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant