SP / TM connectivity questions

thank you @gmirey, i can understand that in the neocortex theory . But in the NUPIC, i mean in programming algorithm, it has to be defined clearly. So how can NUPIC choose the cells to make synapses to ?? ( random or near cells or …?) do you know that ? pls show me. thank you.