MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / get_observation

Method get_observation

rl3/flappy2envs.py:42–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 return self.get_observation()
41
42 def get_observation(self):
43 # game state returns a dictionary which describes
44 # the meaning of each value
45 # we only want the values
46 obs = self.env.getGameState()
47 return np.array(list(obs.values()))
48
49 def set_display(self, boolean_value):
50 self.env.display_screen = boolean_value

Callers 2

stepMethod · 0.95
resetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected