# A Brain Storm and Chaotic Accelerated Particle Swarm Optimization Hybridization
## 2 Background
### The BSO Algorithm
This mean that the population update process occurs \(T\) times. Algorithm 1 contains simple pseudocode for the developed BSO. ```  
```
Set parameters;  Initialize the population with \(N\) randomly generated ideas;  Initialize iteration number, \(t\); while\(T\) is not reacheddo  Cluster \(N\) ideas into \(m\) clusters;  Evaluate ideas and find cluster centers; ifrand() \(<p_{rep}\)then  Disrupt the center of a randomly selected cluster;  end if for each idea \(i\) in the population:do ifrand() \(<p_{gen}\)then  Select one cluster; ifrand() \(<p_{enc}\)then  Select center idea; else  Select random idea;  end if else  Select two clusters; ifrand() \(<p_{trac0}\)then  Select and combine centers; else  Select and combine two random ideas;  end if  Generate a new idea; ifthe new idea is better than current idea \(i\)then  Update the current idea \(i\) as the new one;  end if  end if Update \(t\);  end while
```  
**Algorithm 1**BSO Algorithm  
**Termination criteria:** Many termination criteria can be applied to BSO. One of the most common ones, and the one used in this paper, is when the maximum number of iterations \(T\) is reached. This mean that the population update process occurs \(T\) times. Algorithm 1 contains simple pseudocode for the developed BSO. ```
Set parameters;  Initialize the population with \(N\) randomly generated ideas;  Initialize iteration number, \(t\); while\(T\) is not reacheddo  Cluster \(N\) ideas into \(m\) clusters;  Evaluate ideas and find cluster centers; ifrand() \(<p_{rep}\)then  Disrupt the center of a randomly selected cluster;  end if for each idea \(i\) in the population:do ifrand() \(<p_{gen}\)then  Select one cluster; ifrand() \(<p_{enc}\)then  Select center idea; else  Select random idea;  end if else  Select two clusters; ifrand()  Select and combine centers; else  Select and combine centers; else  Select and combine two random ideas;  end if  end for  Generate a new idea; ifthe new idea is better than current idea \(i\)then  Update the current idea \(i\) as the new one;  end if  end for  Update \(t\);  end if
```  
**Algorithm 2**BSO Algorithm  
**Clustering: \(k\)-Means Algorithm**  
In general, a clustering algorithm is presented with a set of objects (or data points) and groups them into clusters, meaning groups, according to the similarities they share. Clustering is a process met in many fields, such as data analysis, machine learning and pattern recognition. BSO utilizes clustering in order to group similar ideas (solutions) together. In BSO, ideas exist in the \(D\)-dimensional space of the optimization problem, thus similarity is examined as the distance between them in that space. The \(k\)-means algorithm is a clustering algorithm that groups objects according to their Euclidean distance with respect to the space they belong in [41]. It forms groups around centers (centroids), which are the same in number as the number of clusters needed, and keeps refining them according to their distances from the iteratively updated centroids. Basic pseudocode for the \(k\)-means clustering process is presented in Algorithm 2. ```
Initialize the population \(N\);  Initialize the population \order to speed up convergence. Particularly, it initializes the centroids to be adequately distant from each other, leading to (probably) better results than random initialization. ```
Set number of clusters, \(k\);  Randomly initialize \(k\) random points in the same space as the data and denote them as centroids;  Set termination criterion, \(T\); whileT is not reacheddo  Assign all points to the nearest centroid based on Euclidean distance ;  Recalculate the cluster centroids of each cluster as the average value per dimension;  end while
```
**Algorithm 2**\(k\)-means Algorithm

It should be emphasized that the centroid of the \(k\)-means or \(k\)-means++ algorithm is not related to the cluster center we referred to in the BSO algorithm. The centroid is not necessarily a member of the population, it is a point in space that serves as a center and a point of reference.