Manuscript Offprint

arXiv:2609.02339

AGI Maze Prediction Datasets: A Compact Benchmark for Learning World Dynamics with Transformers

Alexey Potapov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

World modeling requires a predictive model to maintain and update an internal state adequate for reasoning about the consequences of actions. We introduce the AGI Maze Prediction Datasets and Benchmark, a lightweight controlled testbed for studying this capability in Transformers and other predictive models. Derived from procedurally generated, stateful grid worlds, the benchmark comprises per-step transition prediction, fixed-horizon state prediction, and sequential textual-observation prediction. Source-maze-disjoint training and validation splits, together with greedy exact-match evaluation, distinguish learning transferable action-conditioned dynamics from memorizing transitions in familiar layouts.

We establish from-scratch byte-level Transformer baselines and compare them with two working-memory-augmented architectures. A generic auxiliary latent-memory Transformer can fit some training sets perfectly but does not consistently improve held-out performance. In contrast, a pseudo-video spatial-memory Transformer initializes a two-dimensional latent workspace from the input map and updates it from action history without receiving intermediate maps, positions, or state labels. Under the same data, objectives, and evaluation protocol, this model reaches perfect validation accuracy on selected fixed-horizon tasks where the byte and unstructured-memory baselines do not, and substantially improves sequential text-trace prediction. These results suggest that structured, task-aligned working memory can be more useful than additional latent capacity alone. More broadly, we argue that language grounding is mediated by persistent data structures and computations over them; the benchmark offers a compact setting for testing architectures that couple textual interfaces to learned structured state.

1. Introduction

A central open problem on the path to general-purpose artificial intelligence is world modeling: learning internal representations of an environment that support prediction, state estimation, and action-conditioned reasoning. A useful world model must do more than associate a visible input with an immediate output. It must preserve information about the current state, update that information after an action, and make it available for predicting what will happen next. Such representations are central to model-based reinforcement learning and have enabled agents to learn compressed spatial and temporal models of environments, imagine possible futures, and improve behavior through those imagined trajectories [1, 2]. Learning structured state representations is particularly important when environments contain objects, relations, spatial topology, or other compositional regularities [3].

For large language models (LLMs), the problem takes a distinctive form. The standard LLM is trained and used primarily as a next-token predictor over a finite textual context. In an interactive task, its persistent state is therefore usually external to the network: previous observations are appended to the prompt; retrieved documents are inserted into it; and, when an agent is allowed tools, maps, notes, programs, or databases are maintained outside the model. This externalization is often useful, and executable world models maintained by coding agents are a promising practical approach [4]. Yet it does not establish that the predictive model itself has learned a stable, manipulable representation of the environment. In particular, a program placed in an agent workspace is an external artifact: it is constructed, inspected, and executed outside the forward pass, effectively as a black box from the perspective of the frozen language model.

This distinction matters because a textual action-observation history is not generally a natural representation of a structured state. Even a small grid world has two-dimensional adjacency, obstacles, object locations, inventory variables, and possibly non-local transition mechanisms. An LLM agent can describe these facts in prose, but the description is linear, costly to update, and prone to omission or inconsistency. A typical external note produced by SOTA LLMs with a world-modeling agentic harness while solving a maze may look as follows: