# Elite Opposition-Based Social Spider Optimization Algorithm for Global Function Optimization
## 2 The Social Spider Optimization Algorithm
### Computational Procedure
For (\(i=1\); \(i<N_{f}+1\); \(i++\))  Calculate \(Vib_{i}\); If (\(m_{i}<FP\)), where \(m_{i}\in rand(0,1)\) \(f_{i}^{k+1}=f_{i}^{k}+\alpha*Vib_{i}*(s_{c}-f_{i}^{k})+\beta*Vib_{i}*(s_{b}- f_{i}^{k})+\delta*(rand-\frac{1}{2})\) Else If \(f_{i}^{k+1}=f_{i}^{k}-\alpha*Vib_{i}*(s_{c}-f_{i}^{k})-\beta*Vib_{i}*(s_{b}- f_{i}^{k})+\delta*(rand-\frac{1}{2})\) End If End For Step 5: Move the male spiders according to the male cooperative operator  Find the median male individual (\(w_{N_{f}+m}\)) from \(M\). For (\(i=1\); \(i<N_{\mathit{nn}}+1\); \(i++\))  Calculate \(Vib_{i}\); If (\(w_{N_{f}+i}>w_{N_{f}+m}\)) \(m_{i}^{k+1}=m_{i}^{k}+\alpha*Vib_{i}*(s_{f}-m_{i}^{k})+\beta*(rand-\frac{1}{2})\) Else If \(m_{i}^{k+1}=m_{i}^{k}+\alpha*(\frac{\sum_{i=1}^{N_{\mathit{nn}}}m_{i}^{k}w_{N _{f}+m}}{\sum_{i=1}^{N_{\mathit{nn}}}m_{N_{f}+m}}-m_{i}^{k})\) End If End For Step 6: Perform the mating operation  For (\(i=1\); \(i<N_{\mathit{nn}}+1\); \(i++\))  If (\(m_{i}\in D\))  Find \(E^{i}\)  If (\(E^{i}\) is not empty)  From \(s_{\mathit{nnew}}\) using the roulette method  If (\(w_{\mathit{nnew}}>w_{\mathit{nnew}}\)) \(s_{\mathit{nnew}}=s_{\mathit{nnew}}\)  End If  End If  End If  End If  End If  End For Step 7: if the stop criteria is met, the process is finished; otherwise, go back to Step 3. ```  
**Algorithm 2**The Social spider optimization algorithm  
The computational procedure for the Algorithm 1 can be summarized as follow:  
``` Step 3: Think \(N\) as the total number of \(n\)-dimensional colony members, define the number of male (\(N_{\mathit{nn}}\)) and females spiders (\(N_{f}\)) in the entire population (\(S\)). \[N_{f}=floor[(0.9-rand*0.25)*N],\ N_{\mathit{nn}}=N-N_{f}\] Where \(rand\) is a random number in the range [0, 1], whereas \(floor(. )\) maps a real number to an integer number. Step 2: Initialize randomly the female members (\(F=\left\{f_{1},f_{2},\ldots,f_{N_{\mathit{nn}}}\right\}\)), male members (\(M=\left\{m_{1},m_{2},\ldots,m_{N_{\mathit{nn}}}\right\}\)) and calculate the radius of mating. \[r=\frac{\sum\limits_{j=1}^{n}p_{j}^{\mathit{high}}-p_{j}^{\mathit{low}}}{2n}\] Step 3: Calculation the weight of every spider of \(S\). For (\(i=1\); \(i<N_{\mathit{f}}+1\); \(i++\)) \(w_{i}=\frac{\left\{f_{1}\right\}-\mathit{worst}_{i}}{\mathit{box}_{i}-\mathit{worst}_{i}}\) where \(best_{i}=\max(l(s_{k}))\) and \(worst_

## 3 Elite Opposition-Based Social Spider Optimization Algorithm (EOSSO)

When the SSO calculates unimodal function and multimodal function, we can clearly discover that the solutions obtained by SSO are not good enough. In order to enhance accuracy of the algorithm, we append one optimization strategy to SSO. There is global elite opposition-based learning strategy (GEOLS). In this part, we introduce opposition-based learning (OBL) and global elite opposition based learning strategy (GEOLS). ### Opposition Based Learning (OBL)

OBL is, basically, a machine intelligence strategy which was proposed by [PERSON] in [17]. It considers the current individual and its opposite individual simultaneously in order to get a better approximation at the same time for a current candidate solution. It has been also proved that an opposite candidate solution has a greater opportunity to be closer to the global optimal solution than a random candidate solution [17]. Therefore, the concept of OBL has been utilized to enhance population based algorithms in [18; 19; 20; 21]. The general, OBL concept has been, successfully, applied in some areas of research work such as in reinforcement learning [22], window memorization for morphological algorithms [23], image processing using the opposite fuzzy sets [24; 25] and also in some popular optimization techniques like ant colony optimization [26; 27; 28], GA [29], artificial neural networks with opposite transfer function and back propagation [30; 31], DE, PSO with Cauchy mutation [32], gravitational search algorithm [33], harmonic search algorithm [34], and BBO [35; 36].