Dynamics Control Algorithm for Autonomous Underwater Vehicle by Reinforcement Learning and Teaching Method