arXiv:2611.09271cs.AINov 2026

Manuscript Offprint

arXiv:2611.09271

Zero-Shot Weight-Space Programming Across a Difficulty-Graded Ladder of Two-Player Games

Eduardo C. Garrido-Merchán

Abstract

Weight-space programming sets every weight of a feed-forward network by hand, from an explicit specification of the desired computation, with no gradient descent and no training data anywhere in the construction. We ask how far a large language model can carry this practice, zero-shot, across games of deliberately increasing difficulty. We design a four-rung ladder (Nim, tic-tac-toe, two sizes of Connect Four, and a chess endgame) spanning four axes of difficulty, and build a second, independent network at each rung, using a structurally unrelated game at matched difficulty, to separate what a rung's finding says about the difficulty level from what it says about the one game used to measure it. Ten networks are built and independently verified. Six admit a complete, non-statistical proof of correctness against an independent oracle. The chess-endgame rung is exact where correctness is cheap, move legality and, in one network, an exact one-ply mate detector, and collapses where it is expensive, composing a multi-move mating plan, from 84.1–100% success at the one-ply tactics it was built to get right down to 0.57–9.13% in full adversarial play; its replicate shows this collapse is an order of magnitude less severe under a shorter required plan and exact rather than heuristic safety checks. The standard-sized rung confirms, by holding hand-set evaluation weights fixed and adding only shallow search, that the remaining gap is an architectural ceiling rather than a matter of engineering effort, and this exact collapse reproduces across two structurally unrelated games. We release all ten networks, their independent oracles, construction-cost measurements, and a cold-prompt protocol for a future cross-model comparison.

1 Introduction

A feed-forward network with ReLU activations can represent an arbitrary piecewise-linear function once its weights are fixed, and nothing in that representational fact requires the weights to come from gradient descent on a training set. Takehi et al. (2026) coined the term weight-space programming for exactly this observation, demonstrating a general-purpose language-model agent that reads and writes a neural network's weights directly, with no optimizer and no gradient descent anywhere in the loop, across eight experiments spanning diagnosing what a small network was trained on from its weights alone, repairing a reinforcement-learning policy by editing a few percent of its parameters, and writing entirely new game-playing networks from scratch for several Atari-style grid games, three MinAtar environments, and 9x9 Go. Tic-tac-toe and Nim are not among their experiments; the present repository's own tic-tac-toe network, built independently as a first application of the same general paradigm to a new, smaller game, already existed before the present study and is reused here as this ladder's second rung, verified by brute-force search of the complete tic-tac-toe game tree to never lose moving first or second against any sequence of legal opponent replies. The present paper asks a harder and more useful question than any single additional game would answer: tic-tac-toe is a small, well-understood, lookahead-shallow game, and a single success there says little about where the technique stops working. We want the boundary, not one more point inside it.

Answering that question requires a sample of games, not a single game, and the sample has to be built so that a failure can be traced to a specific cause rather than to an unstructured increase in general difficulty. We therefore design a four-rung ladder that varies, one axis at a time wherever the axis structure allows it, four properties that plausibly govern whether a game's optimal or near-optimal policy can be compiled by hand into a bounded-depth ReLU circuit: the size of the reachable state space, which determines both whether the resulting network's correctness can be proved exhaustively or only estimated and, once exhaustive proof is no longer available, the cost of any statistical evaluation; the existence of a closed-form optimal strategy, ranging from Nim's arithmetic rule to tic-tac-toe's tiered heuristic to Connect Four's and chess's absence of any known compact rule; the geometry of the action space, from a flat choice over a fixed cell set, to a gravity-constrained or flanking-capture choice over a larger board, to sliding pieces that block one another on a shared board; and the planning horizon a competent policy needs, from one ply to the roughly ten-to-sixteen-ply mating plan of a two-piece-versus-king chess endgame. A single game per rung cannot separate a property of the difficulty level from an accident of the one game chosen to probe it, so at each rung we additionally build a second, independent network for a structurally unrelated game at matched difficulty: Wythoff's game beside Nim, Dots and Boxes beside tic-tac-toe, Othello at a small and at the standard board size beside the two Connect Four sizes, and King-and-Queen-versus-King beside King-and-Rook-versus-King. Every network in the ladder is new code and new tests built for this study, with the sole exception of tic-tac-toe, whose solution and proof already existed in this repository and is reused as this ladder's second rung and as the one worked example shown to any model being asked to extend the technique.

Every network in this ladder is constructed the same way the tic-tac-toe network was: as an explicit, named sequence of linear maps, ReLU non-linearities, and concatenations, with every entry of every weight and bias matrix assigned once, before any game is ever played, by reasoning about the target game rather than by fitting data. We refer to a network built this way as weight-space programmed, and we make the term precise in Section 3. The construction toolkit itself is small and reused across every block: a sum-and-threshold identity turns a ReLU unit into a logical AND over binary indicators, a two-stage ReLU gadget clips a nonnegative integer count into the range [0,1] and thereby implements an OR, a dot product against a ±1\pm1 encoding of a stored binary state implements an exact-match detector, and a tiered score is built by summing several of these indicator signals after multiplying each tier by a weight so many orders of magnitude larger than the one below it that no combination of lower-tier signals can ever outscore a single higher-tier one, which gives a strict lexicographic priority order without any control flow in the forward pass. The only genuinely new primitive this study needed, absent from the original tic-tac-toe construction, is an exact identity that implements a bitwise exclusive-or of two binary ReLU-gate outputs, used to encode Nim's optimal strategy; we state and verify it in Section 3.

The headline empirical finding concerns where and how the technique fails, and whether that failure is a property of the difficulty rung or of the one game used to probe it; that the technique eventually fails somewhere was never in doubt. Six of the ten networks, covering the two easiest rungs under two unrelated game mechanics each (Nim and Wythoff's game; tic-tac-toe and Dots and Boxes) and the third rung's smaller board under two unrelated game mechanics (a reduced Connect Four board and a reduced Othello board), admit a complete proof that the constructed network achieves the exact game-theoretic outcome from every reachable state, verified against an independently written oracle with no shared code and no sampling, at a state-space scale that reaches 104 399 non-terminal positions for Connect Four and 53 651 for Othello, both roughly two orders of magnitude past tic-tac-toe's 4520. The fourth rung, two chess endgames with only three pieces on the board each, is where the technique's two component skills come apart: encoding the legal-move geometry of sliding, mutually blocking pieces by hand turns out to be entirely tractable in both endgames, verified exactly against from-scratch retrograde-analysis oracles over all legal positions (175 168 for King-and-Rook, 144 508 for King-and-Queen), while composing that correct local reasoning into a globally valid multi-move mating plan is not, collapsing the King-and-Rook network's success rate from 84.1% at the one-ply tactic it was explicitly built to recognize down to 0.57% in full adversarial play, and the King-and-Queen network's success rate from a perfect, circuit-verified 100% down to 9.13%, a collapse roughly sixteen times less severe under a shorter required plan and an exact rather than heuristic one-ply safety net. The fifth rung, standard Connect Four and standard Othello, confirms by direct controlled comparison, holding the hand-set evaluation weights fixed and adding only a small amount of recursive search on the opponent's side, that the remaining gap is architectural rather than a matter of insufficient engineering effort on our part: a policy that shares the opponent's exact evaluation function but looks zero plies ahead loses every single game, or very close to it, to one that looks two to four plies ahead, under two structurally unrelated game mechanics.

Because the research question concerns a particular model's capability, not an abstract claim about language models in general, we also prepare, alongside the main engineered study, a separate and strictly controlled protocol for testing other models under identical conditions: one prompt per block, administered cold with no tool access and no opportunity to iterate, containing the tic-tac-toe solution as the only worked example of the paradigm and an explicit specification of every input and output convention, graded by the same independent oracles used throughout this paper. We describe that protocol in Section 3 and report it as infrastructure for a cross-model study rather than as a result of the present paper, since administering it to other providers' models is outside the scope of what we could execute here.