docstr: Return 10 state features of observation:
  4 features indicating whether the agent can see a ghost
      in that direction (UP, RIGHT, DOWN, LEFT)
  4 features indicating whether he can feel a wall in each of the
      cardinal directions, which is set to 1 if he is adjacent to a wall
  1 feature indicating whether he can hear a ghost, which is set to 1
      if he is within Manhattan distance 2 of a ghost
  1 feature indicating whether he can smell food (adjacent or
      diagonally adjacent to any food)
docstr_tok: ["Return","10","state","features","of","observation",":","4","features","indicating","whether","the","agent","can","see","a","ghost","in","that","direction","(","UP",",","RIGHT",",","DOWN",",","LEFT",")","4","features","indicating","whether","he","can","feel","a","wall","in","each","of","the","cardinal","directions",",","which","is","set","to","1","if","he","is","adjacent","to","a","wall","1","feature","indicating","whether","he","can","hear","a","ghost",",","which","is","set","to","1","if","he","is","within","Manhattan","distance","2","of","a","ghost","1","feature","indicating","whether","he","can","smell","food","(","adjacent","or","diagonally","adjacent","to","any","food",")"]
code: def _make_ob(self):
      """
      Return 10 state features of observation:
      4 features indicating whether the agent can see a ghost
          in that direction (UP, RIGHT, DOWN, LEFT)
      4 features indicating whether he can feel a wall in each of the
          cardinal directions, which is set to 1 if he is adjacent to a wall
      1 feature indicating whether he can hear a ghost, which is set to 1
          if he is within Manhattan distance 2 of a ghost
      1 feature indicating whether he can smell food (adjacent or
          diagonally adjacent to any food)
      """
      ob = np.zeros(STATE_DIM)
      for i, action in enumerate(ACTIONS):
          ob[i] = self._see_ghost(action)
          next_pos = self.next_pos(
              self.internal_state.agent_pos, action
          )
          # If an agent couldn't move from the current position, then there is a wall
          if next_pos == self.internal_state.agent_pos:
              ob[i + len(ACTIONS)] = 1
      if self._hear_ghost():
          ob[2 * len(ACTIONS)] = 1
      if self._smell_food():
          ob[2 * len(ACTIONS) + 1] = 1
      return ob
  
imports: import logging
  from typing import NamedTuple
  import numpy
  from gym import Env
  from gym.spaces import Box, Discrete
label_desc: Use image node_id 8 for calling the PocManEnv obj's underlying member method code with example usage: obj._make_ob() and returns: ob