# Exploring the "Repeating Inputs" problem

**URL:** <https://discourse.numenta.org/t/exploring-the-repeating-inputs-problem/5498>\
**Category:** Tangential Theories\
**Tags:** temporal-memory\
**Created:** [February 22, 2019, 7:05pm UTC](https://discourse.numenta.org/t/exploring-the-repeating-inputs-problem/5498 "2019-02-22T19:05:35Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![marty1885](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/marty1885/32/1891_2.png) [@marty1885](https://discourse.numenta.org/u/marty1885)\
**Post date:** [February 23, 2019, 3:00pm UTC](https://discourse.numenta.org/t/exploring-the-repeating-inputs-problem/5498/5 "2019-02-23T15:00:21Z")

</div>

I haven’t read the official TM learning algorithm. I’ve just followed what Matt describe in HTMSchool. Maybe that’s the cause?

This is the current TM core code.

```auto
xt::xarray<bool> active_cells = applyBurst(predictive_cells_, x); //If column has no cell being predictive, burst the column
xt::xarray<uint32_t> overlap = cells_.calcOverlap(active_cells, connected_permanence_); //Run trough all connections and calculate how many connected cells are on for all cells
predictive_cells_ = (overlap > connected_thr_); //Filter all badly predicted cells, all cells passing this stage is predictive
if(learn == true) {
	xt::xarray<bool> apply_learning = selectLearningCell(active_cells); //Select a random cell if column in bursting
	xt::xarray<bool> last_active = active_cells_;
	cells_.learnCorrilation(last_active, apply_learning, permanence_incerment_, rmanence_decerment_); //inc/dec the connection strength
	cells_.growSynapse(last_active, apply_learning, initial_permanence_); //Make new connections to all active cells that's not connected
}
active_cells_ = active_cells; //Store the new active cells
return xt::sum(predictive_cells_, -1); //Since only one cell is needed for the column to be predicting, sum up the cells in the column to generate the prediction

```

My algorithm tries to connect a learning cell to all previously active (including bursting) cells. As what Matt have states in HTM School. Which causes a lot of unneeded connection. But I can always remove them later on.  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/2/2fbc0f5a1b61c3a29644bc2f8183f539de30a6e5.png)

---

_[View the full topic](https://discourse.numenta.org/t/exploring-the-repeating-inputs-problem/5498)._
