A Model-based Reinforcement Learning Algorithm For Biped Walking