class_docstr: This class creates a maze problem given a map.
class_docstr_tok: ["This","class","creates","a","maze","problem","given","a","map","."]
code: def _step(self, action):
      assert self.action_space.contains(action), "%r (%s) invalid" % (
          action,
          type(action),
      )
  
      if np.random.uniform(0, 1) > self.motion_noise:
          state0 = self.state[0]
          state1 = self.state[1]
          if action == 0:  # north
              state1 = np.minimum(self.room_lengths[1] - 1, state1 + 1)
          elif action == 1:  # east
              state0 = np.minimum(self.room_lengths[0] - 1, state0 + 1)
          elif action == 2:  # south
              state1 = np.maximum(0, state1 - 1)
          else:  # west
              state0 = np.maximum(0, state0 - 1)
          if not ([state0, state1] in self.wall_states):
              self.state[0] = state0
              self.state[1] = state1
  
      done = self._is_goal(self.state)
      reward = -1.0
      return self._encode_state(self.state), reward, done, {}
  
file_path: CNTK/Examples/ReinforcementLearning/deeprl/env/maze2d.py
imports: import gym
  import numpy
  from gym import spaces
  from gym.utils import seeding
label_desc: Use image node_id 3 for calling the Maze2D obj's underlying member method code with example usage: obj._step(action) and returns: self,  reward,  done,  dict