# Polar Lights Optimizer
## Introduction

Polar Lights Optimization (PLO) is a metaheuristic algorithm inspired by the aurora phenomenon, also known as polar lights. This optimization technique is designed to mimic the natural behavior of high-energy particles in the Earth's magnetic field. The aurora phenomenon, observed at high latitudes, results from the interaction between solar wind particles and the Earth's magnetic field, creating luminous patterns in the sky. PLO leverages concepts from this natural process, including gyration motion and aurora oval walk strategies, to optimize solutions in various problem domains.

## Algorithm Description

PLO is based on the motion of energetic particles in a magnetic field, which is modeled through the following key components:

### Initialization

The algorithm starts with an initial population of candidate solutions. Each candidate solution is a vector in a $D$-dimensional space. The initial population is generated randomly within predefined bounds: $X(N,D)=LB+R\times (UB-LB)$ where:
* $N$ – Population size
* $D$ – Dimension of the problem
* $LB$ – Lower bounds of the solution space
* $UB$ – Upper bounds of the solution space
* $R$ – Random values between $[0,1]$

### Gyration Motion

Particles exhibit gyration motion, which is modeled by the following update formula for velocity: $v(t)=v_{0}e^{\frac {qBt-\alpha t}{m}}$ where:
* $v_{0}$ – Initial velocity
* $q$ – Particle charge
* $B$ – Magnetic field intensity
* $m$ – Particle mass
* $\alpha$ – Damping factor
This motion helps explore local regions of the search space.

### Aurora Oval Walk

The aurora oval walk is modeled by the following update formula: $Ao={\text{Levy}}(d)\times (X_{\text{avg}}(j)-X(i,j))+LB+r_{1}\times {\frac {UB-LB}{2}}$ where:
* ${\text{Levy}}(d)$ – Step size distribution
* $X_{\text{avg}}(j)$ – Average position of the particle population
* $r_{1}$ – Random number
This component facilitates global exploration of the search space.

### Combination

By combining the Gyration Motion and the Aurora Oval Walk, a new formula is modeled to achieve a better balance: $X_{\text{new}}(i,j)=X(i,j)+r_{2}\times (W_{1}\times v(t)+W_{2}\times Ao)$ where:
* $W_{1}$ - The weight of v(t)
* $W_{2}$ - The weight of Ao
* $r_{2}$ – Random number
The particle motion in the PLO encompasses both global exploration and local exploitation.

### Particle Collision

The particle collision strategy helps avoid premature convergence and enhances global exploration: $X_{\text{new}}(i,j)=X(i,j)+\sin(r_{3}\times \pi )\times (X(i,j)-X(a,j))$ where:
* $X(a,j)$ – Position of the collided particle
* $r_{3}$ – Random number
* $K$ – Collision probability

### Pseudo-code

The PLO algorithm can be summarized in the following pseudo-code:

## Time Complexity

The time complexity of the PLO algorithm is: $O({\text{PLO}})=O(2\times (n^{2}\times d)\times \log n\times ME)$ where:
* $n$ – Number of particles
* $d$ – Dimension of the problem
* $ME$ – Number of evaluations

## Applications

PLO has been successfully applied to various real-world problems, including:

### Multi-Threshold Image Segmentation

PLO is used to optimize threshold values for effective image segmentation, enabling accurate differentiation between regions in an image.

### Feature Selection

In medical data analysis, PLO is utilized to select relevant features, improving the performance of classification and prediction models. The binary PLO-based feature selection method has been tested on multiple datasets.