Flow Field Chess

A chess engine that thinks in fields, not search trees — a deliberately unfit opponent that reasons from physics instead of a database. Rust → WebAssembly, entirely in your browser.

What is a flow-field engine?

Most chess computers search — millions of positions deep, propped up by opening books and endgame tables. Flow Field Chess does none of that. It treats the board as a physical space and lets every piece radiate influence: a terrain of pressure, attack, resistance, momentum and diffusion. Each turn it rebuilds that terrain from scratch and simply flows downhill. No search tree. No database. No memory of how chess is “supposed” to go.

What comes out is an opponent that is clever, occasionally baffling, sometimes plainly bad, and nearly always interesting — a peculiar mathematician who never opened a theory book but is suspiciously well-read on gradients.

The five core fields

PressureSigned map of advantage, P = Fw − Fb.
AttackWho can hit what, weighted by piece strength.
ResistanceFriction from occupancy, threats and king zones.
TraceMovement memory & intent via quaternion heading.
FlowDiffusion of influence through resistance over time.

These five are the skeleton; a drawer of borrowed algorithms (reaction–diffusion, Ising spins, lattice–Boltzmann, and ten more) supplies the personality. The full mathematics lives in the paper.

The paper

Flow Field Chess: A Deliberately Unfit Engine PUBLISHED The concept and its mathematics — fields, kernels, diffusion, the quaternion trace and a Hamiltonian view. A non-competitive engine, presented honestly.
DOI: 10.5281/zenodo.21028769 (CC‑BY‑4.0) · academia.edu
PDF

Flow Field Chess: A Joyfully Unfit Chess Engine

Abstract

This project is not a chess engine in the normal sense. It is a math lab dressed in a chess suit. Instead of opening books, endgame tablebases, or a brute force search, this system runs a collection of physical and mathematical algorithms that were never designed for chess at all. The result is a player that is often clever, sometimes baffling, occasionally bad, and nearly always interesting. The goal is not perfection. The goal is a fair and fun opponent that sees the same board you see and reasons from the same geometry you see, just through a strange lens.

Why this exists

By the late 1990s, chess computers were already statistical beasts. They could search deep, memorize millions of positions, and use data gathered from every grandmaster game they could find. That is impressive and also profoundly unfun. It is not you versus a rival mind. It is you versus an encyclopedia with an electric motor.

Flow Field Chess aims for something different: a computer opponent that is not omniscient. It does not "know" chess. It only sees the pieces, the geometry, and a set of formulas that evaluate fields in space and time. The opponent is a math student, not a chess god.

The core principle

Everything in this engine is a field, and every field is computed from the current board state. The AI is forced to learn the board from scratch every turn. It cannot reference a database. It cannot peek at a library of openings. It can only evaluate the fields that the formulas create and then move based on those fields. That constraint is what makes the games feel fair and engaging.

The core fields (the structural backbone)

These five fields are the skeleton. Everything else is flavour.

The extra algorithms (the wild experiments)

Every extra algorithm is optional. Each one is intentionally "wrong" for chess in the sense that it was created for an entirely different domain. The fun is watching how these foreign tools still produce chess-like behaviour.

Why this is fun to play

The system is intentionally limited. It is not searching twenty moves ahead, so it makes mistakes. It does not know openings, so it gets confused. It often sees patterns you do not see and misses tactics you do see. That is exactly the sweet spot for a human opponent: competitive, but also fallible.

You are not facing a chess god. You are facing a peculiar mathematician who knows nothing about chess but is intensely curious about gradients, diffusion and fields. It feels like playing against a human who only read the rules last week and then built a physics simulator to help them decide.

Why this is a scientific exercise

Most chess engines converge on the same approach: search, prune, evaluate, and rely on enormous knowledge. This project explores the opposite: can we drive a game with mathematics alone? Can we stitch together unrelated algorithms and still get coherent play? The answer is surprisingly often yes. It is a way to study how rich behaviour can emerge from simple field equations, and how far you can push "algorithmic intuition" without a search tree.

Practical uses beyond chess

These formulas are not toys. Reaction–diffusion drives biological modelling and procedural graphics. Cellular automata model growth, fire, erosion and network spreading. Resistor networks and flow diffusion power routing, terrain analysis and cost maps. Ising models appear in statistical physics and probabilistic inference; wave models in acoustics and vibration; lattice–Boltzmann in engineering fluid simulation. Low-frequency filtering is signal processing 101. Curl tools come from fluid dynamics; pheromone models from swarm optimization and logistics; Gaussian occupancy maps from robotics navigation; topological persistence from data analysis; kernel methods from statistics, vision and machine learning. So yes, this is chess — but the toolbox is absolutely real.

The big claim

This might be the worst chess engine ever written, and that is the point. It is not engineered to win; it is engineered to think in creative, mathematical ways and to be entertaining. It loses in a way that teaches you something. It wins in a way that makes you laugh. That is the kind of "intelligence" we wanted: playful, imperfect, and fun.

Closing note

If you ever wished your chess opponent was less of a database and more of a strange professor who refuses to stop talking about gradients, welcome home.