code: def learnObjects(self, objectPlacements):
      
      for monitor in self.monitors.values():
        monitor.afterPlaceObjects(objectPlacements)
  
      for objectName, objectDict in self.objects.iteritems():
        self.reset()
  
        objectPlacement = objectPlacements[objectName]
  
        for locationName, featureName in objectDict.iteritems():
          egocentricLocation = (locationName[0] + objectPlacement[0],
                                locationName[1] + objectPlacement[1])
  
          locationSDR = self.locations[egocentricLocation]
          featureSDR = self.features[featureName]
          transitionSDR = np.empty(0)
  
          self.locationLayer.reset()
          self.inputLayer.reset()
  
          for _ in xrange(10):
            self.doTimestep(locationSDR, transitionSDR, featureSDR,
                            egocentricLocation, learn=True)
  
          self.inputRepresentations[(featureName, egocentricLocation)] = (
            self.inputLayer.getActiveCells())
  
        self.objectRepresentations[objectName] = self.objectLayer.getActiveCells()
        self.learnedObjectPlacements[objectName] = objectPlacement
docs: Learn each provided object in egocentric space. Touch every location on each
      object.
  
      This method doesn't try move the sensor along a path. Instead it just leaps
      the sensor to each object location, resetting the location layer with each
      leap.
  
      This method simultaneously learns 4 sets of synapses:
      - location -> input
      - input -> location
      - input -> object
      - object -> input