Wireless Sensor Networks (WSNs) support a wide range of real-time applications thanks to their small form factor, low cost, and ease of deployment. However, their inherent dynamics—characterized by continuously fluctuating node energy, link quality,...
Wireless Sensor Networks (WSNs) support a wide range of real-time applications thanks to their small form factor, low cost, and ease of deployment. However, their inherent dynamics—characterized by continuously fluctuating node energy, link quality, and congestion—render traditional static routing protocols inefficient and prone to performance degradation. To overcome these limitations, we introduce AMWA-RL, an energy-efficient, intelligent routing protocol for Software-Defined WSNs (SDWSNs) that integrates adaptive reinforcement learning with a dynamic-weight reward mechanism, all while keeping signaling overhead and latency to a minimum. AMWA-RL’s self-adaptive framework optimizes routing in real time by locally adjusting threshold weights for residual energy, link quality, and congestion based on neighbor‐status analysis. Simultaneously, an SDN controller maintains a global network view and fine-tunes these weights across the network to reflect global conditions. This combination of strategies enables autonomous, distributed decision-making that continuously evolves with network state. At its core lies our dynamic-weight reward‐shaping algorithm, which computes a time-varying composite reward by assigning and updating weights to each metric according to the currently measured network demands. NS-3 simulations demonstrate that AMWA-RL can extend network lifetime by 10–23 %, improve packet delivery ratio by 8–15 %, and cut end-to-end delay by up to 12 % compared to leading protocols. By balancing local adaptability with global coordination, AMWA-RL significantly enhances energy efficiency, reliability, and responsiveness—making it ideally suited for diverse real-time WSN deployments.