MCPcopy Create free account
hub / github.com/rlcode/reinforcement-learning / __init__

Method __init__

1-grid-world/env.py:158–166  ·  view source on GitHub ↗
(self, title="DynamicGridWorld", step_penalty=0.0, render_mode="human")

Source from the content-addressed store, hash-verified

156 HUD = 32
157
158 def __init__(self, title="DynamicGridWorld", step_penalty=0.0, render_mode="human"):
159 self.title, self.step_penalty, self.render_mode = title, step_penalty, render_mode
160 self.agent = [0, 0]
161 self.obstacles_init = [[0, 1], [1, 2], [2, 3]]
162 self.goal = [4, 4]
163 self.obstacles = []
164 self.counter, self.episode, self.score, self._hit = 0, 0, 0.0, 0
165 self.last_score = None
166 self._screen = None
167
168 def reset(self):
169 # Capture the prior episode's final score before wiping.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected