## 4 Proposed Snake Optimizer
### Pseudocode and Operational Flow
The number of runs, set to 10, indicates that the optimization process is repeated multiple times for each scenario, ensuring that the results are averaged over these runs to provide a more robust assessment of SO's performance. Max iterations refer to the maximum number of iterations permitted for each simulation run of SO. This value is dynamically assigned from the iteration counts being tested. The population size, although not explicitly defined in the provided code, plays a significant role in determining the diversity of solutions generated by the optimizer. The best fitness value is initially set to negative infinity, indicating that the optimizer will accept any improvement during the early stages of the process. Convergence time is initialized to the maximum number of iterations, serving as a benchmark to measure how quickly the optimizer can find a near-optimal solution. Table 2 also lists constants used during the exploration and exploitation phases, such as the exploration constant and the exploitation constant. These constants control the balance between searching for new solutions and refining existing ones. Environmental factors like temperature and food quantity are modeled mathematically, with temperature influencing the behavior of the optimizer based on the iteration count, and food quantity guiding the transition between exploration and exploitation phases. Fitness history is initialized to a NaN array, ready to store the fitness values of solutions across iterations. Spectral capacity is assumed to have a maximum of 1 bps/Hz per band, serving as a benchmark for evaluating the network's performance. Finally, the collision rate and utilization efficiency are calculated based on the final allocation of bands to secondary users, providing key metrics for assessing the effectiveness of SO. Compared to traditional \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Number of Secondary Users (SUs) & scenario.num\_SUs \\ \hline Number of Primary Users (PUs) & scenario.num\_PUs \\ \hline Number of Bands & scenario.num\_bands \\ \hline Iteration Counts & \([30,50,100]\) \\ \hline Number of Runs & 10 \\ \hline Max Iterations & iter\_count \\ \hline Population Size & Pop\_Size \\ \hline Best Fitness Value (Initial) & \(-\infty\) \\ \hline Convergence Time (Initial) & max\_iterations \\ \hline Exploration Constant (\(c_{2}\)) & 0.05 \\ \hline Exploitation Constant (\(c_{3}\)) & 2 \\ \hline Temperature & \(\exp\Bigl{(}-\frac{\mathrm{Curr\_Iter}}{\mathrm{Max\_Iter}}\Bigr{)}\) \\ \hline Food Quantity (\(Q\)) & \(c_{1}\times\exp\Bigl{(}\frac{\mathrm{Curr\_Iter}-\mathrm{Max\_Iter}}{ \mathrm{Max\_Iter}}\Bigr{)}\) \\ \hline Fitness History (Initial) & \(\mathrm{nan(1,max\_iterations)}\) \\ \hline Spectral Capacity & \(1\) bps/Hz (per band) \\ \hline Collision Rate (Final) & final collisions \\ \hline Utilization Efficiency (Final) & \(\Bigl{(}\frac{\mathrm{num\_bands}-\mathrm{final\_collisions}}{\mathrm{num\_bands}} \Bigr{)}\times 100\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters and their values from SO. meta-heuristics such as PSO, GA, or ACO, SO introduces biologically inspired modes (e.g., fight and mating) that enable it to adaptively balance exploration and exploitation based on environmental cues (e.g., food availability, temperature). Unlike velocity-driven updates (in PSO) or crossover/mutation operators (in GA), SO employs a behavioral mechanism that is both dynamic and context-aware. ## 5 Results and Discussion

### Experiment Result for First Scenario

The experiment results for the first scenario of SO are depicted through Figures 4-12, showing various aspects of the optimization process across different iteration counts. Figure 4 illustrates the mean best fitness value over 30 iterations. The curve shows a rapid increase in fitness during the initial iterations, reaching a plateau around the 10 th iteration. The final mean fitness value stabilizes at approximately 14.3, indicating that the optimizer quickly converges to a near-optimal solution.