code: def learnTransitions(self):
      
  
      print "Learning transitions"
      for (i, j), locationSDR in self.locations.iteritems():
        print "i, j", (i, j)
        for (di, dj), transitionSDR in self.transitions.iteritems():
          i2 = i + di
          j2 = j + dj
          if (0 <= i2 < self.diameter and
              0 <= j2 < self.diameter):
            for _ in xrange(5):
              self.locationLayer.reset()
              self.locationLayer.compute(newLocation=self.locations[(i,j)])
              self.locationLayer.compute(deltaLocation=transitionSDR,
                                         newLocation=self.locations[(i2, j2)])
  
      self.locationLayer.reset()
docs: Train the location layer to do path integration. For every location, teach
      it each previous-location + motor command pair.