Intelligent Clustering in Wireless Sensor Networks