A Neural Network Model of Spatial Memory