Learning Dynamic Cognitive Map with Autonomous Navigation