Introducing Intelligence in Vehicular Ad Hoc Networks Using Machine Learning Algorithms