# Lion algorithm

Lion algorithm (LA) is one among the bio-inspired (or) nature-inspired optimization algorithms (or) that are mainly based on meta-heuristic principles. It was first introduced by B. R. Rajakumar in 2012 in the name, Lion’s Algorithm.. It was further extended in 2014 to solve the system identification problem. This version was referred as LA, which has been applied by many researchers for their optimization problems.

## Inspiration from lion’s social behaviour

Lions form a social system called a "pride", which consists of 1–3 pair of lions. A pride of lions shares a common area known as territory in which a dominant lion is called as territorial lion. The territorial lion safeguards its territory from outside attackers, especially nomadic lions. This process is called territorial defense. It protects the cubs till they become sexually matured. The maturity period is about 2–4 years. The pride undergoes survival fights to protect its territory and the cubs from nomadic lions. Upon getting defeated by the nomadic lions, the dominating nomadic lion takes the role of territorial lion by killing or driving out the cubs of the pride. The lioness of the pride give birth to cubs though the new territorial lion. When the cubs of the pride mature and considered to be stronger than the territorial lion, they take over the pride. This process is called territorial take-over. If territorial take-over happens, either the old territorial lion, which is considered to be laggard, is driven out or it leaves the pride. The stronger lions and lioness form the new pride and give birth to their own cubs

## Terminology

In the LA, the terms that are associated with lion’s social system are mapped to the terminology of optimization problems. Few of such notable terms are related here.
* Lion: A potential solution to be generated or determined as optimal (or) near-optimal solution of the problem. The lion can be a territorial lion and lioness, cubs and nomadic lions that represent the solution based on the processing steps of the LA.
* Territorial lion: The strongest solution of the pride that tends to meet the objective function.
* Nomadic lion: A random solution, sometimes termed as nomad, to facilitate the exploration principle
* Laggard lion: Poor solutions that are failed in the survival fight.
* Pride: A pool of potential solutions i.e. a lion, lioness and their cubs, that are potential solutions of the search problem.
* Fertility evaluation: A process of evaluating whether the territorial lion and lioness are able to provide potential solutions in the future generations i.e. It ensures that the lion or lioness converge at every generation.
* Survival fight: It is a greedy selection process, which is often carried out between the pride and nomadic lion.

## Algorithm

The steps involved in LA are given below:
* Pride Generation: Generate $X^{male}$, $X^{female}$and $X_{1}^{nomad}$
* Determine $f(X^{male})$, $f(X^{female})$, $f(X_{1}^{nomad})$
* Initialize $f^{ref}$ as$f(X^{male})$ and $N_{g}$ as 0
* Memorize $X^{male}$ and $X^{female}$
* Apply Fertility evaluation Process
* Generation of cubpool by mating
* Gender clustering: Define $X_{cub}^{male}$ and $X_{cub}^{female}$
* Initialize $age_{cub}$ as zero
* Apply Cub growth function
* Territorial defense: If $X^{male}$ (or pride) fails in the survival fight i.e. $X_{1}^{nomad}$ defeats the pride, go to step 4, else continue
* Increase $age_{cub}$ by 1 and check whether cub attains maturity i.e., if $age_{cub}>age_{max}$, go to Step 9, else continue
* Territorial takeover: If $X_{cub}^{male}$ and $X_{cub}^{female}$ are found to be closer to optimal solution, update $X^{male}$ and $X^{female}$
* Increment $N_{g}$ by 1
* Repeat from Step 5, if termination criterion is not violated, else return $X^{male}$ as the near-optimal solution

## Variants

The LA has been further taken forward to adopt in different problem areas. According to the characteristics of the problem area, significant amendment has been done in the processes and the models used in the LA. Accordingly, diverse variants have been developed by the researchers. They can be broadly grouped as hybrid LAs and non-hybrid LAs. Hybrid LAs are the LAs that are amended by the principle of other meta-heuristics, whereas the Non-hybrid LAs take any scientific amendment inside its operation that are felt to be essential to attend the respective problem area.

## Applications

LA is applied in diverse engineering applications that range from network security, text mining, image processing, electrical systems, data mining and many more. Few of the notable applications are discussed here.
* Networking applications: In WSN, LA is used to solve the cluster head selection problem by determining optimal cluster head. Route discovery problem in both the VANET and MANET are also addressed by the LA in the literature. It is also used to detect attacks in advanced networking scenarios such as Software-Defined Networks (SDN)
* Power Systems: LA has attended generation rescheduling problem in a deregulated environment, optimal localization and sizing of FACTS devices for power quality enhancement and load-frequency controlling problem
* Cloud computing: LA is used in optimal container-resource allocation problem in cloud environment and cloud security