Brain-Inspired Planning For Better Generalization In Reinforcement Learning