Wireless sensor networks (WSNs) have motivated researchers to explore novel approaches to optimize cluster formation. Clustering algorithms play a vital role in WSN s, wheresensor nodes are organized into clusters to reduce energy consumption and prolong network lifetime. This paper proposes an Al based energy-efficient clustering algorithm tailored for homogeneous clustering scenarios. The current research work leverages artificial intelligence techniques, such as ML. Optimization algorithms are used to dynamically form clusters based on the sensor nodes' energy levels and proximity. The key focus is on creating clusters with balanced energy distribution, which helps in avoiding the early depletion of energy in certain nodes and achieving a more uniform utilization of resources. The meaning of grouping calculations in WSNs couldn't possibly be more significant. These calculations should work out some kind of harmony between different clashing goals. On one hand, they should disseminate the bunch and make a beeline for guarantee even energy utilization among sensor hubs. On different, they should limit the above related with group development and support, as exorbitant bunching can prompt superfluous control message trades, accordingly, consuming extra energy.