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

Method __init__

rl3/es_flappy.py:26–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24
25class Env:
26 def __init__(self):
27 self.game = FlappyBird(pipe_gap=125)
28 self.env = PLE(self.game, fps=30, display_screen=False)
29 self.env.init()
30 self.env.getGameState = self.game.getGameState # maybe not necessary
31
32 # by convention we want to use (0,1)
33 # but the game uses (None, 119)
34 self.action_map = self.env.getActionSet() #[None, 119]
35
36 def step(self, action):
37 action = self.action_map[action]

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected