(Jun '19 update: original standalone Scheme SP and TM have been archived: may be useful as an intro to HTM-scheme but the libraries in HTM-scheme/algorithms have better code. Algorithms in current use (in the combined_sequences project) are apical_tiebreak_temporal_memory.ss and column_pooler.ss. See algorithms/htm_concept.ss for an intro to HTM-scheme data structures and coding approach.)
Hierarchical Temporal Memory in Scheme (previously) now includes a standalone R6RS Scheme translation of temporal_memory.py and hello_tm.py
The “Temporal Memory Algorithm” section of temporal-memory.ss is annotated with the pseudocode from BaMI Temporal-Memory-Algorithm-Details.pdf