Predictive Energy Optimization In Connected And Automated Vehicles Using Approximate Dynamic Programming