wireless sensor networks optimization algorithm internet of things ad hoc networks artificial intelligence machine learning