Skip to content

Whale Optimization Algorithm

Leo Hanisch edited this page Nov 25, 2020 · 2 revisions

This library includes the whale optimization algorithm which Seyedali Mirjalilia and Andrew Lewis introduced in their paper The Whale Optimization Algorithm in 2016 (DOI: 10.1016/j.advengsoft.2016.01.008).

Features

Enables the whale optimization algorithm to one of the provided 2D functions. The algorithm tries to find the global minimum of the selected function. Any of landscapes' 2D or nD functions can be selected.

The plot shows all whales and their velocities.

CLI

To print all available options execute:

swarm whales -h

API

In addition to the cli you can also use the API:

from swarmlib import WOAProblem, FUNCTIONS

problem = WOAProblem(function=FUNCTIONS['michalewicz'], whales=14, iteration_number=10)
best_whale = problem.solve()
problem.replay()

Example

whale optimization algorithm