Request for MATLAB Code of Elephant Search Algorithm (ESA)
12 views (last 30 days)
Show older comments
Hi everyone,
I’m looking for a MATLAB implementation of the Elephant Search Algorithm (ESA) for optimization problems. I couldn’t find an existing code online, and I’d appreciate it if someone could share a working implementation or guide me on how to code it based on its original paper.
If anyone has experience implementing ESA in MATLAB or can point me to a useful resource, I’d be very grateful.
Thanks in advance!
7 Comments
Sam Chak
on 10 Mar 2025
Hi @Sina
For practical reasons, it's probably a good idea to run a simple script for one or two epochs before implementing the full iteration loop. This allows you to observe how the elephants (candidate solutions) move in the search space, whether they converge too quickly or spread out as expected. It saves time in debugging later, when analyzing results across many iterations would be more complex.
A simple convex test function for running the ESA script for two epochs would be a Quadratic Bowl function:
within the domain
. The function is smooth and has a well-defined global minimum at
, making it suitable for testing exploration behavior. You can initialize a small herd consisting of approximately 10 elephants and use the randi() function to maintain the candidate solutions in integer form.
Please remember to post the MATLAB script here for testing and discussion.
Answers (2)
Image Analyst
on 6 Mar 2025
You might find some interesting things in the File Exchange:
Looks like lots of elephants there.
7 Comments
Sam Chak
on 9 Mar 2025
Hi @Sina
Unfortunately, I do not write optimizer code because I am not the inventor. It may be now to consider a Plan B while awaiting a response from the inventor of the ESA.
Since you still have time before the seminar, you can select another optimizer with which you feel confident and comfortable working. There are currently over 500 different metaheuristic optimization algorithms documented, some of which are available in MATLAB code on File Exchange and GitHub. You need not regard ESA as a Holy Grail-level optimizer.
Walter Roberson
on 9 Mar 2025
I have a seminar in a few weeks, and one of the algorithms I need to use to solve an optimization problem is this algorithm.
Time to get writing the code yourself. No-one hanging around seems to have to code for it, and it is rather unlikely that anyone will volunteer to code it up just because you need it.
See Also
Categories
Find more on Direct Search in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
