An implementation of the Hierarchical Temporal Memory / Cortical Learning Algorithm