## 4 Performance Evaluation
### Result Evaluation
#### 4.3.8 Energy Consumption  
When compared to the current MAC protocols, our suggested Q-learning method for UWCNs has been shown to perform better in terms of energy consumption and efficient use of network resources, as shown in Figure 19.  
The MAC layer's integrated Q-learning algorithm improves energy usage by constantly adjusting transmission settings in response to the state of the network. The system's flexibility enables it to modify characteristics like duty cycle and transmission power, guaranteeing effective energy use between nodes. Moreover, our Q-learning methodology has shown exceptional performance in circumstances when the number of nodes in the network varies. The Q-learning method adjusts to the shifting dynamics as the number of nodes rises, improving the MAC protocol for better performance. In contrast to conventional MAC protocols that could have scaling problems, our Q-learning approach makes use of its learning power to efficiently handle the higher node  
Figure 19: Energy consumption vs. number of nodes. Figure 18: Collision vs. avg. traffic load. density. UWCNs with dynamic deployment situations might find this flexibility to be an attractive option as it translates into lower congestion for network resources and increased energy efficiency. Overall, compared to current MAC protocols, our suggested Q-learning approach demonstrates its capacity to achieve improved energy consumption and scalability performance, making it a significant improvement in the field of underwater sensor network communication. Concerning energy consumption and offering load per node packet per second, our novel Q-learning method for UWCNs has shown impressive performance gains over current MAC protocols, as shown in Figure 20. Through the clever modification of transmission parameters, the Q-learning algorithm integrated into the MAC layer is essential for dynamically optimizing energy usage. The entire network lifespan is increased as a result of this flexibility, which guarantees that the underwater sensor nodes are more energy efficient. Apart from its excellent energy management, our Q-learning method performs very well in terms of offer load per node packet per second, which is an important parameter to evaluate the network's communication efficiency. Because of its learning capabilities, the system can optimize packet transmission rates per node and distribute resources dynamically. As a consequence, the communication burden is distributed more evenly and effectively across the network, reducing congestion and increasing throughput overall. Our Q-learning technique consistently outperforms competitors in comparative evaluations with current MAC protocols, providing a comprehensive solution that guarantees a more equitable and efficient use of network resources per node packet per second in UWCNs, while also optimizing energy consumption. The network's energy efficiency, as shown in Figure 21, shows a steady decline as the average traffic load increases, supporting the pattern seen in Figure 16 regarding the PDR. Notably, energy efficiency is mostly determined by the interaction between the weighting factors \(\beta_{1}\) and \(\beta_{2}\). In particular, the network achieves better energy efficiency when \(\beta_{1}\) is less than \(\beta_{2}\), indicating a stronger focus on the energy-efficient reward element specified by \(r_{2}\) as opposed to collision avoidance, \(r_{1}\). This suggests that with these parameter values, the system gives energy conservation a higher priority than collision avoidance, which leads to a more effective use of network resources when traffic load fluctuates. The results highlight how important parameter adjustment is to achieve a balance between the competing goals of energy efficiency and network collision avoidance. Figure 20: Energy consumption vs. offered load. The results described in Figure 22 show the performance of the proposed Q-learning-based MAC protocol and a fixed MAC protocol from episode 1 to episode 500 in underwater wireless sensor networks (UWSNs).