Awan Nahel Mahmood, Turkan Ahmed Khaleel
The Wireless Sensor Networks (WSNs) are widely used in environmental monitoring, healthcare, and smart farming. However, energy consumption remains critical since battery-powered sensor nodes directly affect network lifetime. The conventional clustering and multi-hop routing algorithms are prone to collapse when used in dynamic environments, resulting in poor energy consumption and frequent node failures. This paper proposes a novel reinforcement learning (RL) routing algorithm based on Q-learning to enhance energy savings in WSNs. The algorithm is dynamic in assigning routes based on node energy, communication distance, and packet size, and adapts in real-time to network changes. It ensures that data transfer is efficient and the load distribution throughout the network is even by updating routing decisions with Q-learning. These simulation outcomes indicate that the suggested algorithm can save up to 25% of energy per round relative to traditional protocols and increase network life to 50 times that of the LEACH protocol