Realization of Autonomous Sensor Networks with AI based Self-reconfiguration and Optimal Data Transmission Algorithms in resource constrained nodes