Optimal Predictive And Adaptive Control