File Exchange

image thumbnail

The Standard Bat Algorithm (BA)

version 2.0.0 (2.42 KB) by XS Yang
This demo shows how the bat algorithm works.


Updated 03 Apr 2020

View Version History

View License

The standard bat algorithm (BA) is inspired by the echolocation characteristics of microbats. This demo solves a function of d=10 dimensions. It is straightforward to extend it to solve other functions and optimization problems.

The details can be found in the book: Xin-She Yang, Nature-Inspired Optimization Algorithms, Elsevier Insights, (2014).

Cite As

XS Yang (2021). The Standard Bat Algorithm (BA) (, MATLAB Central File Exchange. Retrieved .

Xin-She Yang, Nature-Inspired Optimization Algorithms, Elsevier Insights, (2014)

Comments and Ratings (2)

Taha Butt

Hello Yang, in your file line number 36 what does rand(1,d) implies? i think it is the population that you se to 1 in n=input(1) line number 17. you told in the code to write the population between 20 to 40 but, why you didnt write it by yourself? i am trying yo write the population 20 instead of 1 but it would not let me.

Haydar Khayou

It's wonderful but I have a question: Why Loudness and Emission_Rate are updated in each iteration for the whole swarm and not for each bat?
I actually have tried to rewrite the code with updating Loudness and Emission_Rate for each bat but the best solution didn't improve.

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!