Learning Optimal Gait Parameters Using The Episodic Natural Actor-Critic Method