def act(self, observation, reward):
"""
Interact with and learn from the environment.
Returns the suggested control vector.
"""
observation = np.ravel_multi_index(observation, self.input_shape)
self.xp_q.update_reward(reward)
action = self.best_action(observation)
self.xp_q.add(observation, action)
action = np.unravel_index(action, self.output_shape)
return action
eye_experiment.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录