Abstract
Humans navigate complex environments by exploiting structural regularities rather than memorizing raw spatial data. We propose the Generative Modular Planning (GMP) framework, which models cognitive maps as compressed, programmatic representations synthesized via Large Language Models (LLMs). By treating navigation as the execution of reusable subroutines on modular fragments, our model accurately predicts human search patterns in structured mazes, outperforming traditional search-based AI planners.
Introduction
In classical AI, planning is often framed as a search through a massive decision tree of possible actions. While mathematically sound, this approach hits a "complexity wall" in the real world—navigating a city or managing a massive construction project involves too many variables for raw search.
Yet, humans do this with ease. The missing link is structure. Most AI models treat every "state" (like a street corner) as a unique entity. Humans, however, recognize that the world is repetitive and modular. We don't memorize every brick; we recognize a "residential block" pattern and reuse our strategy for it. This research seeks to formalize this intuition: how do we represent the world as a compressed, programmatic map to make planning computationally efficient?
Methods: Generative Modular Planning (GMP)
The authors introduce the Generative Modular Planning (GMP) framework, which consists of two main components:
- Generative Map Module (GMM): Instead of a raw grid, the world is represented as a Python program. The researchers used GPT-4 to perform "program synthesis." Given a map, the LLM identifies repeating fragments (modules) and writes code to reconstruct the map using transformations like rotations and reflections. The model uses the Minimum Description Length (MDL) principle to pick the "simplest" program that explains the map.
- Fragment-based Planning (FP): Instead of solving the whole map at once, the agent solves a small "decision tree" for a single fragment and then reuses that policy whenever it encounters that fragment again.
To test this, the researchers conducted a Behavioral Experiment using a Maze Search Task (MST). Thirty participants navigated 2D grid-world mazes that contained hidden exits and repeating structural patterns (e.g., a 3x3 room pattern repeated four times).
Key Insights
- Cognitive Maps as Recipes: The core insight is that a cognitive map isn't a static image; it's a recipe. By representing a map as a program (e.g., "repeat this L-shaped hallway four times"), the brain drastically reduces the amount of information it needs to store.
- LLMs as Inductive Bias Engines: The paper highlights a novel use for LLMs—not as chatbots, but as tools to extract human-like "inductive biases." GPT-4 proved capable of looking at a grid and "seeing" the same modules a human might, effectively acting as an embedding of human priors.
- Efficiency over Optimality: Humans often appear "suboptimal" because they don't take the mathematically shortest path. This research suggests that what looks like suboptimality is actually efficiency. Humans are "locally optimal" within a module and reuse that strategy globally to save mental energy, even if it adds a few extra steps.
Results and Discussion
The experiment demonstrated that humans are "highly modular," consistently searching unit-by-unit according to the programmatic structure identified by the GMM. The GMP model significantly outperformed traditional models—such as "Optimal Expected Utility" or "Limited Horizon" planners—at predicting actual human moves. Furthermore, by using programmatic representations, the model requires drastically less memory than unstructured planning algorithms, mirroring the resource constraints of the human brain.
While the model is highly predictive, it currently uses a strict definition of modularity. Humans often skip fragments they deem unlikely to contain a goal, a heuristic the current model doesn't fully capture. Future work will explore how humans "debug" their mental programs when encountering unexpected obstacles and how to refine LLM-generated code to be more robust and less noisy.
Summary updated