*Result*: Distributed Fuzzy Logic Algorithm for Cyberattack Detection and Energy Efficiency in Wireless Sensor Networks.
*Further Information*
*Wireless sensor networks (WSNs) are critical for applications like environmental monitoring and industrial automation but face challenges balancing cybersecurity and energy efficiency. Existing approaches, such as centralized intrusion detection systems (IDS) and machine learning (ML) models, suffer from high computational overhead, scalability issues, and an inability to adapt to dynamic threats. This paper proposes a distributed fuzzy logic algorithm (DFLA) that integrates cyberattack detection and energy optimization through a decentralized architecture. By employing fuzzy logic to handle uncertainty, Dempster-Shafer theory for decision fusion, and the Reptile Search Algorithm for parameter adjustment, DFLA uses dual-objective rules to dynamically evaluate metrics such as packet drop rate, residual energy, and signal strength deviation. Nodes autonomously compute an attack risk level (ARL) and adjust transmission using localized fuzzy inference systems (FIS), minimizing reliance on cluster heads. Validated on real-world datasets (WSN-DS, CIC-IDS2017) and testbeds (TinyOS), DFLA achieves 99.87% detection accuracy for Blackhole and Flooding attacks, outperforming E-LEACH and RSA-IT2FLS while reducing energy consumption by 48%. The distributed design ensures scalability with lower communication overhead than centralized systems. [ABSTRACT FROM AUTHOR]*