MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / step

Method step

rl3/es_flappy.py:36–42  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

34 self.action_map = self.env.getActionSet() #[None, 119]
35
36 def step(self, action):
37 action = self.action_map[action]
38 reward = self.env.act(action)
39 done = self.env.game_over()
40 obs = self.get_observation()
41 # don't bother returning an info dictionary like gym
42 return obs, reward, done
43
44 def reset(self):
45 self.env.reset_game()

Callers 15

test_agentFunction · 0.45
ddpgFunction · 0.45
reward_functionFunction · 0.45
play_one_episodeFunction · 0.45
trainFunction · 0.45
trainFunction · 0.45
trainFunction · 0.45
trainFunction · 0.45
gym_tutorial.pyFile · 0.45
play_oneFunction · 0.45
dqn_tf.pyFile · 0.45
play_oneFunction · 0.45

Calls 3

get_observationMethod · 0.95
actMethod · 0.45
game_overMethod · 0.45

Tested by 3

test_agentFunction · 0.36
test_agentFunction · 0.36
test_agentFunction · 0.36