## 3 Proposed Methodology  
### Proposed System Model  
Figure 1 and Table 1 unveils the system model in which CRN including PUs and SUs. The network consists of '\(n\)' PUs and '\(m\)' SUs, all that are shared for communication over '\(k\)' available channels. Although the primary users have a higher priority to these channels, secondary users can use this unused spectrum opportunistically without creating any interference on communication services of primary user. Such a model in which each PU is equipped with a base station that uses one of the channels allocated to PUs for communication. The SUs need to operate over these channels without causing any harmful interference to the PUs. Since SUs must share the spectrum with PUs, they must intelligently decide which channels to use for transmission in order to avoid interfering with channels currently occupied by PUs. Various combinations of the number of SUs (\(m\)) that can be activated on a PU-based channel, the number of PUs, and the available channels are tested in these simulation scenarios. The scenarios are used to assess the performance of SO in optimizing resource utilization for SUs based on channel availability. Across the scenarios, we vary \(n\) and \(m\) to evaluate how well SO adapts to different numbers of PUs (\(n\)) and SUs (\(m\)) in the network. For each scenario, the experiment runs using multiple iteration counts to test how well SO minimize collisions between SUs and maximize spectrum utilization efficiency. In this task, the algorithm must choose a set of channel assignments for SUs by tuning them in an iterative manner so as to reduce interference and maximize spectral capacity. Performance metrics considered for evaluation consist of the mean final fitness, convergence time, spectrum utilization efficiency (SUE), collision rate, and overall spectral capacity, thus giving a broader perspective to measure optimization in different network parameters. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Scenario** & \(n\) & \(m\) & \(k\) \\ \hline
1 & 5 & 10 & 15 \\
2 & 4 & 8 & 12 \\
3 & 6 & 12 & 20 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Scenario configurations. These system models and scenarios aim to analyze how SO handles dynamic communication channel allocation in a CRN, balancing the access demands of PUs and the opportunistic access needs of SUs, while enhancing overall network performance. We consider a CRN as the environment for our proposed RL framework, which supports both PUs and SUs in an idealized star topology. Let there be a total of \(n\) PUs and \(n\) SUs communicating over \(k\) available channels in the network. Primary users have licensed access rights to these communication channels, whereas secondary users aim to opportunistically use the spectrum under lower transmission power constraints to avoid interference. This is a dynamic environment: each time a new SU enters the network, it must adjust its transmission parameters in real time to prevent interference with PUs while still achieving efficient spectrum usage. The dynamic nature of CRN demands an intelligent allocation strategy that adapts to changing network conditions. In this scenario, SO functions as an RL agent that interacts with the environment by iteratively adjusting channel assignments for SUs. Its objective is to maximize spectral capacity, minimize collisions between SUs and PUs, and optimize global network performance through intelligent channel allocation. The agent obtains evaluative feedback from the environment through a reward signal, which is based on the current network state. This reward reflects key performance indicators such as the number of collisions, spectrum utilization efficiency, and total spectral capacity achieved at each timestep \(t\). Through this iterative learning process, SO gradually learns how to allocate channels optimally under various CRN scenarios, including conditions where multiple primary users control disjoint or overlapping spectral bands and new secondary users join dynamically.