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

Method step

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

Source from the content-addressed store, hash-verified

28 self.action_map = self.env.getActionSet() #[None, 119]
29
30 def step(self, action):
31 action = self.action_map[action]
32 reward = self.env.act(action)
33 done = self.env.game_over()
34 obs = self.get_observation()
35 # don't bother returning an info dictionary like gym
36 return obs, reward, done
37
38 def reset(self):
39 self.env.reset_game()

Callers 1

reward_functionFunction · 0.45

Calls 3

get_observationMethod · 0.95
actMethod · 0.45
game_overMethod · 0.45

Tested by

no test coverage detected