# How new segment is created in winner cell in burst column for the first time stamp

**URL:** <https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664>\
**Category:** Lounge\
**Tags:** question\
**Created:** [October 5, 2018, 3:46pm UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664 "2018-10-05T15:46:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bipul\_kalita](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bipul_kalita/32/3098_2.png) [@bipul\_kalita](https://discourse.numenta.org/u/bipul_kalita)\
**Post date:** [October 5, 2018, 3:46pm UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664/1 "2018-10-05T15:46:06Z")

</div>

As in pseudo code of **function burstColumn(column):**  
…  
…  
**33. winnerCell = leastUsedCell(column)**  
**34. if LEARNING\_ENABLED:**  
**35. learningSegment = growNewSegment(winnerCell)**  
…  
…  
lets say for the first SDR as input to Temporal Memory algorithm, first it selects an active column from SDR as active(burst) and randomly selects a winner cell , now I am confused about how segments will be created in that winner cell? since for now it’s only one winner cell in one selected active column for the first time stamp.  
honestly I want to know how **growNewSegment(winnerCell)** function works.  
thank you.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [October 5, 2018, 5:17pm UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664/2 "2018-10-05T17:17:34Z")

</div>

Following the source code:

> <https://github.com/numenta/nupic/blob/master/src/nupic/algorithms/temporal_memory.py#L528-L535>

> <https://github.com/numenta/nupic/blob/master/src/nupic/algorithms/temporal_memory.py#L628-L630>

> <https://github.com/numenta/nupic/blob/master/src/nupic/algorithms/temporal_memory.py#L664-L692>

---

<div class="post-metadata">

**Author:** ![sheiser1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/sheiser1/32/766_2.png) [@sheiser1](https://discourse.numenta.org/u/sheiser1)\
**Post date:** [October 5, 2018, 10:18pm UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664/3 "2018-10-05T22:18:58Z")

</div>

A new segment is grown on the winner cell chosen in each column (1 on each winner of the 40 activated columns)

---

<div class="post-metadata">

**Author:** ![bipul\_kalita](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bipul_kalita/32/3098_2.png) [@bipul\_kalita](https://discourse.numenta.org/u/bipul_kalita)\
**Post date:** [October 6, 2018, 5:27am UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664/4 "2018-10-06T05:27:58Z")

</div>

**so for the first time** a new segment will be grown in the selected winner cell in 1 column from 40 columns(active SDR columns). But how many synapses will be there? because to grow a segment means to grow its synapses.

---

<div class="post-metadata">

**Author:** ![Paul\_Lamb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/paul_lamb/32/2725_2.png) [@Paul\_Lamb](https://discourse.numenta.org/u/Paul_Lamb)\
**Post date:** [October 6, 2018, 4:34pm UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664/5 "2018-10-06T16:34:09Z")

</div>

Each new segment will start out with up to maxNewSynapseCount synapses.

> <https://github.com/numenta/nupic/blob/master/src/nupic/algorithms/temporal_memory.py#L626>

---

<div class="post-metadata">

**Author:** ![sheiser1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/sheiser1/32/766_2.png) [@sheiser1](https://discourse.numenta.org/u/sheiser1)\
**Post date:** [October 7, 2018, 11:43pm UTC](https://discourse.numenta.org/t/how-new-segment-is-created-in-winner-cell-in-burst-column-for-the-first-time-stamp/4664/6 "2018-10-07T23:43:20Z")

</div>

If there is a best matching segment on any cells in the column, the number of new synapses grown on the segment = ‘maxNewSynapseCount’ (default=20 I think) _minus_ the number of active synapses already on that segment.

If there is no best matching segment on any cell in the column, the least used cell in the column (with fewest existing segments) grows a new segment with ‘maxNewSynapseCount’ synapses formed to the ‘prevWinnerCells’.
