## 3 Proposed Methodology
### Mud-Ring Algorithm for Switch Selection  
The motivation behind employing the MRA lies in its ability to optimize switch selection within a network, particularly focusing on identifying the most suitable \"entry-point switch\" for data originating from the data acquisition layer. In network architectures, efficient traffic management is critical to ensure seamless data flow and prevent congestion or overloading of switch flow tables. The MRA is inspired by the foraging behavior of dolphins (intelligent agents), which involves strategically encircling prey with a ring of mud. Similarly, in the network context, the MRA facilitates an intelligent agent, which refers to a virtual or software entity that operates autonomously within the network environment. These agents are programmed with decision-making capabilities and algorithms that enable them to interact with network components, such as switches, in an intelligent and adaptive manner. An intelligent agent interacts with switches (prey), evaluating factors such as proximity and flow table utilization. The algorithm aims to select switches that can effectively manage incoming data flows by dynamically evaluating these parameters to optimize network performance and resource utilization. This approach not only enhances the efficiency of routing decisions but also mitigates potential issues related to flow table overloading, ensuring that the network remains responsive and capable of meeting operational demands effectively. Thus, the MRA serves as a proactive mechanism to intelligently manage switch selection, aligning with the overarching objective of optimizing data flow management within complex network environments. The detailed procedure of the MRA algorithm and its mathematical computations are explained in the following section. **Step 1:** Initially, the software entities (intelligent searching agents) and switches (\"prey\") are distributed randomly in a ring topology network, with interconnections resembling \"mud rings\". **Step 2:** The software entities explore the switches with random movements throughout the network to select an optimal switch. The new positions of these software entities are adjusted based on switch proximity, utilizing Equation (1). \[N_{P}=C_{P}+RM\times D \tag{1}\]  
where '\(N_{P}\)' denotes the new position of the software entity; '\(C_{P}\)' indicates the current position of the software entity, which can be expressed as a coordinate or a topology position; '\(RM\)' represents the random movement factor, The '\(RM\)' value represents a random number or vector that introduces uncertainty in software entity movement, preventing bias towards specific network areas and ensuring thorough exploration of all possible switches, with values ranging from 0 to 1; and '\(D\)' represents the distance between the software entity and a switch. The exploration phase continues for a specified number of iterations. **Step 3:** The software entities evaluate and update their positions based on their fitness function, which is determined by factors such as switch proximity and flow table usage. These updates are calculated to strategically position the software entities around the chosen switch, using Equation (2). \[N_{P}=C_{P}+f-w_{i}\times TS_{D} \tag{2}\]  
where '\(w_{i}\)' denotes the weighted movement of iteration '\(i\)', which adjusts the degree of movement toward or away from the target switch. '\(f\)' represents the fitness function, which evaluates how well a switch meets the criteria based on proximity and other factors. '\(TS_{D}\)' denotes the distance to the target switch, which is used to guide the entity toward or away from the switch based on the fitness value. The fitness function is mathematically expressed in Equation (3). \[f=w_{1}\times PF+w_{2}\times FT \tag{3}\]  
where '\(w_{1},w_{2}\)' are the weights that control the relative importance of each factor. '\(PF\)' represents the proximity factor, which evaluates how close the switch is to the softwareentity.