Zing Forum

Reading

Running the Table: From Billiards Tables to Neural Networks—Exploring Cognitive Science Metaphors of Human Focus

This article introduces a unique open-source project that explores the nature of human hyperfocus through an interdisciplinary lens combining billiards physics simulation, reinforcement learning agents, and cognitive science, revealing the deep connections between belief, prediction, action, and surprise.

认知科学强化学习Q学习注意力缺陷ADHD预测误差神经科学机器学习专注状态Python
Published 2026-05-16 16:24Recent activity 2026-05-16 16:32Estimated read 6 min
Running the Table: From Billiards Tables to Neural Networks—Exploring Cognitive Science Metaphors of Human Focus
1

Section 01

Introduction: From Billiards Tables to Neural Networks—Exploring Cognitive Metaphors of Human Focus

This article introduces the open-source project "Running the Table", which uses an interdisciplinary perspective combining billiards physics simulation, reinforcement learning agents, and cognitive science to explore the nature of human hyperfocus through the metaphor of "running the table". It reveals the deep connections between belief, prediction, action, and surprise, with the core proposition: "We are all prediction engines."

2

Section 02

Background: The Project's Metaphor and Core Proposition

"Running the Table" originally refers to clearing all balls in one turn in billiards. This project gives it a deeper meaning—a metaphor for physical simulation, neural network training, and human hyperfocus. Core view: Every person (and large language models) is a prediction engine; the quality of life depends on the quality of internal simulations and the ability to recognize when training data is exhausted. Cognition is defined as a continuous prediction process: guess based on belief → act → receive feedback → process surprise → update belief.

3

Section 03

Methodology: Cognitive Model from Three Perspectives

The project applies its core algorithm to three substrates: 1. Billiards table physical world: The rules are clear but full of uncertainty; players need to simulate trajectories internally, and mistakes drive learning. 2. Neural network Q-learning: AI agents build an understanding of billiards dynamics through trial and error; reward prediction errors are similar to dopamine signals. 3. Human mind and ADHD: The ADHD brain is a "high-threshold narrative engine" that requires strong stimuli to activate; under the right conditions, it enters deep focus and is redefined as neurodiversity rather than a defect.

4

Section 04

Core Mechanism: Belief-Action-Surprise Cycle and Focus State

The core cycle is belief → guess → action → reality → surprise → update belief. This cycle exists in billiards (angle prediction → strike → result feedback → adjust understanding), neural networks (Q-value estimation → choose action → reward → update weights), and the human mind (existing views → expected response → action → actual feedback → adjust cognition). Dopamine is a prediction error signal: when results exceed expectations, it releases pleasure to reinforce behavior; otherwise, it inhibits. The focus state is "complete narrative capture", where consciousness is occupied by the prediction cycle, entering a state of flow.

5

Section 05

Key Findings: Illusions and the Essence of Scientific Method

"Illusion of confidence" shares the same origin as machine learning's "out-of-distribution generalization": when a system faces an unfamiliar situation, it still makes predictions, which may be wrong but confident. The scientific method is a systematic process to reduce prediction errors: hypothesis → experiment → observation → correction, building an accurate understanding of nature. Managing beliefs (identifying data sufficiency) is an important cognitive skill.

6

Section 06

Technical Implementation: Interactive Demo and Usage Guide

The project uses Python and FastAPI to build an interactive demo where you can observe the learning process of Q-learning agents. Installation command: pip install fastapi uvicorn. Run: python demo.py (automatically opens http://127.0.0.1:8765). Configuration parameters: FAST_MODE=1 to speed up learning, NO_OPEN=1 to disable automatic browser opening, PORT=8765 to customize the port.

7

Section 07

Conclusion: Cognitive Insights from an Interdisciplinary Perspective

The project connects physics, neuroscience, machine learning, and psychology through metaphors, revealing that billiards cue balls, neural network weights, and brain neurons all run the same core algorithm: predict → correct → learn. Understanding this can help us better recognize our own focus, biases, learning processes, and how to navigate the world amid uncertainty.