Pātuhitia tēnei: Optimal control of discrete time stochastic systems