Gravar-mail: Head motion stabilization during quadruped robot locomotion: combining CPGs and stochastic optimization methods