In this paper an individual - suitable function calculating design for WSNs is conferred. A multi-agent- located construction for WSNs is planned and an analytical type of the active combination is built for the function appropriation difficulty. The purpose of this study is to identify the threats identified by clustering genetic algorithms in clustering networks, which will prolong network lifetime. In addition, optimal routing is done using the fuzzy function. Simulation results show that the simulated genetic algorithm improves diagnostic speed and improves energy consumption.©2019. CBIORE-IJRED. All rights reservedArticle History: Received May 16th 2018; Received in revised form Octiber 6th 2018; Accepted Jnauary 6th 2019; Available onlineHow to Cite This Article: Al-Hayali, S., Ucan, O., Rahebi, J. and Bayat, O. (2019) Detection of Attacks on Wireless Sensor Network Using Genetic Algorithms Based on Fuzzy. International Journal of Renewable Energy Development, 8(1), 57-64.https://doi.org/10.14710/ijred.8.1.57-64