Phase 2
The second phase calculates the predictive state for each cell. A cell will turn on its predictive state output if one of its segments becomes active, i.e. if enough of its lateral inputs are currently active due to feed-forward input. In this case, the cell queues up the following changes: a) reinforcement of the currently active segment (lines 47-48), and b) reinforcement of a segment that could have predicted this activation, i.e. a segment that has a (potentially weak) match to activity during the previous time step (lines 50-53).
42. for c, i in cells 43. for s in segments(c, i) 44. if segmentActive(s, t, activeState) then 45. predictiveState(c, i, t) = 1 46. 47. activeUpdate = getSegmentActiveSynapses (c, i, s, t, false) 48. segmentUpdateList.add(activeUpdate) 49. 50. predSegment = getBestMatchingSegment(c, i, t-1) 51. predUpdate = getSegmentActiveSynapses( 52. c, i, predSegment, t-1, true) 53. segmentUpdateList.add(predUpdate)
|