Reducing The Need For Communication In Wireless Sensor Networks Using Machine Learning And Planning Techniques