code: def get_state(self):
          
          # Include battery level in state
          battery = self.player.stats['battery']/100
          # Create observation from sensor proximities
          # TODO: Have state persist, then update columns by `sensed_type`
  
          # Multi-channel; detecting `items`
          if len(self.mode['items']) > 0:
              observation = []
              for sensor in self.player.sensors:
                  col = []
                  # Always include range in channel 0
                  col.append(sensor.proximity_norm())
                  for item_type in self.mode['items']:
                      if sensor.sensed_type == item_type:
                          col.append(sensor.proximity_norm())
                      else:
                          # Default to 1 (`max_range/max_range`)
                          col.append(1)
                  observation.append(col)
              if 'battery' in self.mode:
                  observation.append([battery,1,1])
  
          # Single-channel; walls only
          else:
              observation = [o.proximity_norm() for o in self.player.sensors]
              if 'battery' in self.mode:
                  observation.append(battery)
  
          return observation
docs: Create state from sensors and battery