A spiking neural network of state transition probabilities in model-based reinforcement learning