Pātuhitia tēnei: Tutorial , optimization via simulation with bayesian statistics and dynamic programming