public void TLearning() {
        for(int c = 0; c < xDimension*yDimension; c++) {
            for(int i = 0; i < cellsPerColumn; i++) {
                if(learnState.get(time).get(c).get(i)) {
                    adaptSegments(segmentUpdateList.get(c).get(i), true);
                    // segmentUpdateList.get(c).get(i).clear();
                } else if (!predictiveState.get(time).get(c).get(i) && predictiveState.get(time-1 > 0 ? time-1 : 0).get(c).get(i)) {
                    adaptSegments(segmentUpdateList.get(c).get(i), false);
                    // segmentUpdateList.get(c).get(i).clear();
                }
                segmentUpdateList.get(c).get(i).clear();
            }
        }
    }