## 4 The Proposed Binary White Shark Optimizer
### Discretization Strategy  
In the literature, discretization is performed using various transfer functions. To convert the outputs of these transfer functions into binary values (0 or 1), different thresholding approaches are employed. The thresholding method used in this study is presented in Equation (4). \[w_{k+1}^{i}=\left\{ \begin{array}{l l}1,&\quad if\quad rand<w_{k}^{i}\\ 0,&\quad if\quad otherwise\end{array} \right. \tag{4}\]  
where \(w_{k}^{i}\) represents white sharks. The rand is a random value in the range. In the WSO algorithm, if the position update value can exceed the randomly generated value, it is equalized to take the value of 1, in other cases it will be zero. In this study, to evaluate the impact of discretization functions, the bWSO-0 algorithm was first implemented without employing any transfer function. Subsequently, experiments were conducted using S-Shape, V-Shape, and the proposed logarithmic transfer function. The transfer functions used in all proposed bWSO variants are presented in Table 2 and the corresponding Figure 3. Figure 3 presents the graphical representation of the transfer functions used in the bWSO variants, including S-shaped, V-shaped, and the proposed logarithmic transfer function. These curves illustrate how the continuous values generated by the optimization algorithm are converted into binary values (0 or 1) during the discretization process. The logarithmic transfer function provides a more flexible and gradual probability distribution on the transformation curve compared to traditional S-shaped and V-shaped functions. This characteristic enables the algorithm to maintain a better balance between exploration and exploitation during the search process, thereby preventing entrapment in local minima and improving solution quality. In addition, the natural monotonic structure \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Proposed bWSO** & **Transfer Functions** & **Proposed bWSO** & **Transfer Functions** \\ \hline bWSO-log & Logarithmic = \(\log_{2}(|x|+1)\) & bWSO-v1 & \(V_{1}=\left|\textit{erf}(\frac{\sqrt{\pi}}{2}(x))\right|\) \\ bWSO-s1 & \(S_{1}=\frac{1}{1+e^{-2\alpha}}\) & bWSO-v2 & \(V_{2}=\left|\textit{tanh}(x)\right|\) \\ bWSO-s2 & \(S_{2}=\frac{1}{1+e^{-x}}\) & bWSO-v3 & \(V_{3}=\left|x\sqrt{1+\left(x\right)^{2}}\right|\) \\ bWSO-s3 & \(S_{3}=\frac{1}{1+e^{\left(-\sqrt{\pi}\right)}}\) & bWSO-v4 & \(V_{4}=\left|\frac{2}{\pi}\textit{arctan}\left(\frac{\pi}{2}x\right)\right|\) \\ bWSO-s4 & \(S_{4}=\frac{1}{1+e^{\left(-\sqrt{\pi}\right)}}\) & bWSO-0 & Transfer function not used. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Definition of the transfer functions (S-shaped, V-shaped and proposed function). of the logarithmic function offers a more controlled binary conversion mechanism in the solution space. The pseudocode of the proposed bWSO algorithm is provided in Algorithm 2. Figure 3: Graphical representation of the transfer functions (**a**) S-shaped, (**b**) V-shaped, (**c**) logarithmic. ```
1: Initialize the parameters of the problem
2: Initialize the parameters of WSO
3: Randomly generate the initial positions of WSO
4: Initialize the velocity of the initial population
5: Evaluate the positions of the initial population
6:while\((k<K)\)do
7: Update the parameters, \(p_{1}\), \(p_{2}\), \(\mu\), \(a\), \(b\), \(w_{0}\), \(f\), \(mv\), and \(s_{s}\), using their corresponding update rules defined in the algorithm.