Phase 1. The first phase calculates the active state for each cell
The first phase calculates the active state for each cell. For each winning column we determine which cells should become active. If the bottom-up input was predicted by any cell (i.e. its predictiveState was 1 due to a sequence segment in the previous time step), then those cells become active (lines 4-9). If the bottom-up input was unexpected (i.e. no cells had predictiveState output on), then each cell in the column becomes active (lines 11-13).
1. for c in activeColumns(t) 2. 3. buPredicted = false 4. for i = 0 to cellsPerColumn - 1 5. if predictiveState(c, i, t-1) == true then 6. s = getActiveSegment(c, i, t-1, activeState) 7. if s.sequenceSegment == true then 8. buPredicted = true 9. activeState(c, i, t) = 1 10. 11. if buPredicted == false then 12. for i = 0 to cellsPerColumn - 1 13. activeState(c, i, t) = 1
|