Forming latent codes for decision-making and spatial navigation: a generative modeling perspective - World Wide