Smart Walkers in Discrete Space

Gianluca Peri, Lorenzo Buffoni, Giacomo Chiti, Duccio Fanelli, Raffaele Marino, Andrea Nocentini, Pier Paolo PantiarXiv 2026 · DOI

Abstract

We study the statistical properties of trainable agents moving in discrete space. After introducing the mathematical framework, we first analyze the dynamics of two completely random walkers, mutually competing in a chaser-target interaction scheme. The statistics of the encounters is analytically obtained and the predictions tested versus numerical simulations. We then move forward to extend the baseline case to agents capable of learning and adapting to an external reward signal, using reinforcement learning. Smart walkers morph the statistics of the encounter, to maximize their cumulated reward, as confirmed by combined numerical and analytical insights. More interestingly, configuration entropy proves a reliable proxy to gauge the acquired ability of the agents to cope with the assigned task when no other information about them (i.e. reward signal, policy, etc) is present. We further test the proposed measure of learned skills by operating the Stockfish chess engine against a quasi-random untrained opponent. The obtained conclusions corroborate our claim.

Introduction: Modeling Strategic Interactions

Traditional random walk models, foundational in statistical physics and finance, typically assume agents are memoryless and move purely stochastically. However, real-world agents—from predators to financial traders—act strategically, adapting their movements based on experience and environmental feedback. This paper addresses the challenge of modeling these strategic interactions by introducing "smart" walkers that learn to optimize their meeting points in a discrete space.

The core scenario involves a "chaser-target" interaction on a 1D grid where two agents move until they collide. If the collision location determines the payout (e.g., Alice prefers the left side, Bob the right), the introduction of learning alters the fundamental statistical properties of the encounter.

The 1D grid setup with two agents (orange and blue) at different starting positions.

Methods: From Stochastic Baselines to Reinforcement Learning

The study begins with a rigorous analytical baseline for two "dumb" random walkers on a 1D grid. Using the Kronecker product of individual transition matrices, the authors treat shared cells as absorbing states to calculate exact probability distributions for first encounters and mean meeting times.

One agent (Alice) is then upgraded to a Smart Walker using:

  • Reinforcement Learning: Alice is trained via Q-learning with Boltzmann exploration to learn a state-dependent policy.
  • Reward Shaping: Training occurs under various reward signals (linear, time-dependent, and sinusoidal).
  • Entropy Metrics: The authors compare the Shannon entropy of the learned policy (internal state) with the configuration entropy of the global Markov process (observable behavior).

Key Results and Insights

The introduction of a smart agent drastically shifts encounter probability distributions away from the standard parabolic shapes seen in purely random walks. The analytical framework successfully predicts these shifts by incorporating the learned Q-table into the global transition matrix.

Comparison of theoretical and experimental encounter probabilities across site indices, showing high alignment.

A significant finding is that configuration entropy—calculated solely by observing where agents spend time—serves as a reliable proxy for skill. This allows for measuring an agent's "intelligence" without access to its internal policy or reward function. This was validated using the Stockfish chess engine, where configuration entropy accurately tracked skill levels and detected the structural shift at the engine's full-strength level (Level 20).

Conclusion

This work bridges stochastic processes and reinforcement learning, demonstrating that learning morphs the underlying mathematics of movement. By showing that configuration entropy correlates with hidden policy entropy, the authors provide a tool for evaluating "black-box" agents in adversarial or biological contexts. Future work will explore multi-agent learning and more complex spatial topologies.

Summary updated

Abstract

We study the statistical properties of trainable agents moving in discrete space. After introducing the mathematical framework, we first analyze the dynamics of two completely random walkers, mutually competing in a chaser-target interaction scheme. The statistics of the encounters is analytically obtained and the predictions tested versus numerical simulations. We then move forward to extend the baseline case to agents capable of learning and adapting to an external reward signal, using reinforcement learning. Smart walkers morph the statistics of the encounter, to maximize their cumulated reward, as confirmed by combined numerical and analytical insights. More interestingly, configuration entropy proves a reliable proxy to gauge the acquired ability of the agents to cope with the assigned task when no other information about them (i.e. reward signal, policy, etc) is present. We further test the proposed measure of learned skills by operating the Stockfish chess engine against a quasi-random untrained opponent. The obtained conclusions corroborate our claim.
BibTeX
@misc{peri2026smart,
  author = {Gianluca Peri and Lorenzo Buffoni and Giacomo Chiti and Duccio Fanelli and Raffaele Marino and Andrea Nocentini and Pier Paolo Panti},
  title = {{Smart Walkers in Discrete Space}},
  year = {2026},
  eprint = {2601.22235},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.22235},
}
Figure