Playing to Par: Reinforcement Learning for Provably Optimal Quadrilateral Block Decompositions

Arjun Narayanan, Per-Olof Persson

UC Berkeley

Published September 26, 2026 · on the feed September 29, 2026 · ▲ 3 · arXiv 2609.32146

LLM training & RLAgents3D, worlds & games Full code arXiv ↗Hugging Face ↗Weights ↗

The abstract

A quadrilateral block decomposition of a planar domain is judged by whether it is complete, whether its elements are well shaped, and how many of its vertices are irregular. The last has a provable floor: the discrete Gauss-Bonnet identity enforces a lower bound on the total vertex irregularity of any all-quadrilateral mesh of a given domain purely based on its topology and corner angles. We train a reinforcement learning agent to build decompositions that reach this bound, which we call par. It acts directly on the mesh's half-edge data structure through local edits, with a policy network whose convolutions follow the mesh's own connectivity, so it applies unchanged to domains larger than any seen in training. The reward targets the floor directly, and it is sparse: random play reaches it on no domain with more than eight sides. We overcome this exploration barrier via behaviour cloning on optimal meshes that are trivial to construct, walked backward into demonstrations, before training it with PPO. On 96 held-out domains the agent produces an all-quadrilateral mesh on every one, a usable one on 95.7 on average, and a provably optimal one on 90; Gmsh's strongest configuration at the same element count completes 51, is usable on 38 and optimal on none, and even at three to fourteen times the elements never produces a more regular mesh. On 64 domains twice the training size the agent completes all, is usable on 62, and keeps a median excess over par below one against Gmsh's 39 at the same element count.

The Brief

2:53

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Playing to Par. Reinforcement Learning for Provably Optimal Quadrilateral Block Decompositions. By Arjun Narayanan and one other, from U C Berkeley. Published on the twenty-sixth of September. Its code repository is worked out: about one hundred and eighty source files, with a readme and a licence.

Splitting a flat region into quadrilateral blocks is judged on three counts. Is the decomposition complete? Are its elements well shaped? And how many of its vertices are irregular? The third has a floor you can prove. The discrete Gauss-Bonnet identity sets a lower bound on the total vertex irregularity of any all-quadrilateral mesh of a given domain, and that bound depends only on the domain's topology and its corner angles. It holds before a single element is placed. The authors call this bound par, borrowing from golf, where par is the score a hole is set to be played in. Knowing the floor exists is not the same as reaching it, and the question is whether a mesh can be built that actually gets there, while also staying complete and well shaped.

The approach is to train a reinforcement learning agent whose target is par itself. The agent works directly on the mesh's half-edge data structure, making local edits. Its policy network uses convolutions that follow the mesh's own connectivity, and because of that, the same trained network applies unchanged to domains larger than any it saw in training.

The reward points straight at the floor, and that makes it sparse. Random play never reaches par on any domain with more than eight sides, so an agent exploring on its own would rarely see a reward at all. The authors get around this exploration barrier with a trick of construction. Some optimal meshes are trivial to build, so they build them, then walk them backward into demonstrations. The agent first learns from those by behaviour cloning, and only then trains with PPO. The demonstrations give it a starting point from which the sparse reward can actually be found, and reinforcement learning takes over from there.

On ninety-six held-out domains, the agent produces an all-quadrilateral mesh on every one, a usable mesh on ninety-five point seven on average, and a provably optimal mesh on ninety. The comparison is Gmsh in its strongest configuration, at the same element count. It completes fifty-one, is usable on thirty-eight, and reaches optimal on none. Even when Gmsh is allowed three to fourteen times as many elements, it never produces a more regular mesh.

Generalization is the second test. The agent was run on sixty-four domains twice the size of those in training, the case that its connectivity-following network was designed to handle. It completed all of them and was usable on sixty-two. Its median excess over par stayed below one, against thirty-nine for Gmsh at the same element count.

Golf gives the paper its image and also its logic. Par is not an aspiration here but a number fixed in advance by the geometry, so every result can be scored against the best that is possible. The agent reaches that score on ninety of ninety-six held-out domains, and the backward-walked demonstrations are what got it far enough to start learning.

Paper Quest · 7 chapters · about 40 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

Every outline has a floor on irregularity. Reaching it is the hard part.

You need to split a flat mechanical-part outline into quadrilateral blocks. A thin block can be smoothed later, but a vertex with the wrong number of edges is a flaw that survives every refinement.

The road ahead

  1. 1 · The problem ~6 min Some meshes have a provable floor on irregularity, but meshers rarely aim at it, and a learner aiming at it almost never earns the bonus for reaching it.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~9 min Reach a provable floor called par by first imitating moves walked backward from easy optimal meshes, then improving with reinforcement learning.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Compute par, build easy optimal meshes, walk them backward into demonstrations, clone them, then train further with PPO.
  6. 6 · The experiment ~6 min You’ll guess: On held-out domains where the reinforcement learning agent built quadrilateral meshes, how often did Gmsh's strongest configuration produce a provably optimal mesh at the same element count?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.