We have activeSegments from the previous timestep. If a certain activeColumn from the current timestep corresponds with an activeSegment from the previous (it is predicted), we update the synapses on that segment (in _adaptSegment method):
if binSearch(prevActiveCells, synapse.presynapticCell) != -1:
_ permanence += permanenceIncrement_
To me, this line reads “if the predictive cell from the previous timestep is amongst the active cells from the previous timestep, increase the permanence of the synapse”
We want to increase the connection between the previous predictive cell and the previous active cell so that when the active cell appears again it makes the same prediction.
However the predictive cell isn’t necessarily amongst the previous active cells. Eg. last timestep predictive cell was index 36, correctly predicted index 36 at this timestep, but last timestep active cells did not contain index 36. By this logic, the synaptic permanence isn’t increased?
Thanks for reading