# Compiling all the information into something cohesive

**URL:** <https://discourse.numenta.org/t/compiling-all-the-information-into-something-cohesive/7946>\
**Category:** Getting Started\
**Tags:** sequence-memory, research, encoders, question, community\
**Created:** [October 14, 2020, 6:44pm UTC](https://discourse.numenta.org/t/compiling-all-the-information-into-something-cohesive/7946 "2020-10-14T18:44:05Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![CollinsEM](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/collinsem/32/160_2.png) [@CollinsEM](https://discourse.numenta.org/u/CollinsEM)\
**Post date:** [October 15, 2020, 12:23pm UTC](https://discourse.numenta.org/t/compiling-all-the-information-into-something-cohesive/7946/3 "2020-10-15T12:23:26Z")

</div>

I [wrote an integer encoder](https://discourse.numenta.org/t/grid-cell-inspired-scalar-encoder/4242) a while back that might meet your needs. The encoding was inspired by a series of discussions about grid cell modules. Given a series of partition widths (I chose prime values for reasons explained in the post), the representation stores the encoded number as a series of bits (one per partition) indicating the number modulo by each of the partition widths. The representation has excellent capacity and maintains sparseness as well. It does not provide much in the way of semantic overlap for nearby values, opting instead to encode that information as bit shifts in the representation.

I included [some JavaScript code](https://discourse.numenta.org/t/grid-cell-inspired-scalar-encoder/4242/3) to provide a reference implementation, but it’s fairly straight-forward to implement in any language. Please have a look and let me know if you find it useful.

---

_[View the full topic](https://discourse.numenta.org/t/compiling-all-the-information-into-something-cohesive/7946)._
