Can an AI set a neural network's weights directly, by reasoning, instead of training it?
This question was inspired by a recent article from MIT, in which network weights are written and edited directly by an AI model. We call it the original article below. A second article, Qwenputer, which compiles a working CPU into a language model's weights, shaped the later direction of this work. The code in this small experiment follows the original article's ideas on a laptop, with Claude Opus 5.5 designing the networks and writing the code.
A neural network turns its input into an output through layers of simple units. Each connection between units has a weight, a number, and the weights decide what the network does. Normally they're found by training. Here, Claude set them by hand, so they can play simple 2D games.
For each game, Claude designed a strategy and wrote a script that sets every weight of a small network. The network's size was fixed in advance so that the same network could also be trained, for a fair comparison. These handwritten networks were then compared with trained ones, mixed with training, and matched against an ordinary program.
A separate Opus 5.5 session was given three of the game networks and asked which game each one plays, from their weights alone.
The goal was to change one fact inside a small language model with no training: make it say the Eiffel Tower is in Rome, while keeping everything else it knows.
The small Walled In network couldn't afford to look even one cell ahead, so it followed a fixed route. The flood-fill network, arranged to repeat one small rule across the whole board, played far better, even with fewer weights. What matters is the right shape for the strategy, not just size.
The blind networks had mistakes that only showed in play. Letting Claude run practice games, see how they were lost and fix the cause improved every network, some of them several times over.
The flood-fill network and the program written from the same design chose the same move in every position tested, and played the same games, move for move. See the comparison.
Claude found the few positions where the trained Walled In network kept crashing and rewrote some of its units to handle them. The edited network beat the original most of the time, but it was a targeted patch: it didn't get better against the other opponents.
Fine-tuning improved the flood-fill network slightly but couldn't change its strategy. Its units were set as hard on/off switches, which give training nothing to adjust. Softer weights would leave room for training, at the cost of less exact logic, but that wasn't tested.
For a complex game, there are two ways to get a good player. Training needs a simulator and a lot of compute, but no one has to invent the strategy: it has played dozens of Atari games about as well as a professional human tester, and beaten the best Go players. Designing an algorithm needs an expert's insight, testing and tuning, but it gives a readable program. Once that program exists, writing it into a network's weights adds nothing, because the program already plays as well. Training has costs too: it needs tuning, and our own short runs fell far short. And as AIs get better at design, the expert's time may get cheap. Where working on weights does offer something code can't is in trained networks: patching behaviour that no one ever wrote down.
When Claude writes a network by hand, it first designs an algorithm and then compiles it into weights. So the same algorithm can also be written as ordinary code, as the flood-fill program shows.
A network like ours, which runs once from input to output with nothing carried over (a feed-forward network), does a fixed amount of work per pass. So it can only run algorithms with a known upper bound on their steps. Running any algorithm needs memory and a loop, not just a larger network.
In a language model, the attention layers keep what they computed for earlier words (the key-value cache) and look back at it. In Qwenputer, a kind of layer called DeltaNet keeps a running memory that holds the CPU's code, data and registers, and each generated word is one tick of its clock. A feed-forward network that feeds part of its output back in as input runs as a recurrent network. That costs the same at every step, while attention gets more expensive as the sequence grows. Attention's advantage is exact recall of any past token, and it's easier to train.
Neurons were shown to work as logic gates in 1943. What's new is an AI doing it by reasoning, at scale: the original article's model wrote a Breakout network's weights out by hand in one reply, with no code run, and a 1.5-million-weight Go network from a single script, with no forward passes.
Guessing the game worked from the weights alone. The language-model edit designed from the weights alone changed nothing, and the original article's attempt to tell a sycophantic language model from its weights alone failed.
For a game strategy, code does the same job and is easier to read, debug and extend. Training may still beat hand design in hard games, as learned networks did in Go, though with search and enormous compute. This lab didn't test that.
One direction is compiling modules into a network, as Qwenputer adds a CPU to Qwen without tools or retraining. The other direction is fixing networks: the hand-edited Walled In network and the Eiffel Tower edit here, and the original article's fix of a car-driving network and its maths edit to a language model. All of these fixes worked. The original article's were broad: the car network then succeeded in every test run, and the language model's maths score rose several-fold. Ours were more targeted: the Walled In edit beat the original network but didn't help against other opponents, and the Eiffel Tower edit also changed a related fact.
For each game, Claude read the rules and wrote a script that sets every weight. The first attempt was blind: a hash code computed from its weights file was saved before the network ever ran, so it couldn't be changed after seeing results. Later attempts could watch games and fix mistakes.
The network's inputs say where everything on the board is: the ball, paddle and bricks in Breakout, the plane, reds and greens in Airplane, and the players and walls in Walled In. Claude worked out how to set the weights so that, layer by layer, the network turns that picture into a decision, with the best next move getting the highest output. Fitting each strategy into a small network took a few tricks of its own, which the game pages explain step by step.
PPO, a standard reinforcement learning method, trained the same shapes from random weights. Each game has its own scale, so compare bars within a game only. Breakout and Airplane are scored in points per game. Walled In is scored as a percentage: a won game counts 1, a draw ½ and a lost game 0, averaged over 1,000 games against each of the three opponent programs and then over the three, so 50% means even. The same rule gives every Walled In percentage below.
These PPO runs were short, from 1M to 100M steps with one set of settings, so they show what this lab's training reached, not the most PPO could do. More steps alone helped little: Airplane's training score stopped rising at about 10M steps, and 100M steps scored 20.2, against 16.3 for the same seed at 10M. The original article's longer Breakout runs reached about 25, still far below the handwritten networks.
The best flood-fill network was trained further with PPO for 500k steps. Its units are deliberately all-or-nothing, so gradients through them are exactly zero, and only its 5 output weights could change. PPO nudged them, valuing the opponent's cells about 4% more, and its score against the opponent programs rose from 75.8% to 77.1%. Game by game, 75 games improved and 35 got worse: a small but real gain. Training polished the strategy, but it couldn't change it.
The reverse worked too. The small PPO network for Walled In is nearly deterministic, so just 8 board positions caused 99% of its avoidable crashes against itself. Rewriting 12 of its 64 units as exact checks for those positions made it score 81.5% against its original: 713 wins, 204 draws and 83 losses in 1,000 games not used to make the edit. It's a targeted patch, though, not a better player: against the other opponents it scores slightly lower than before. See both experiments, step by step.
Walled In's players also met each other in a tournament. The six players were:
There was no single ranking. The lookahead program beats the flood-fill networks, which beat the 32-unit networks, which mostly draw with the program. Each cell is the row player's score against the column player over 1,000 games, counted the same way: a win 1, a draw ½, a loss 0.
Opus 5.5 got three networks, was told they were all trained, and was asked what game each plays, from the weights alone, without running them.
| Network | Opus 5.5's guess | Verdict |
|---|---|---|
| Breakout, handwritten | MinAtar Breakout, with high confidence | Correct |
| Airplane, handwritten | Dodge one kind of object, collect another | Right game, different story |
| Walled In, trained with PPO | Single-player Snake, 65–70% confidence | Missed the opponent |
Without being asked, it said the first two didn't look trained, and it was right. Read the findings.
One change to one matrix of SmolLM2-135M, with no training, was meant to move the Eiffel Tower to Rome, while keeping everything else. The false answer was made on purpose. The model passes text through 30 layers, and reads it in small pieces: "Eiffel", for example, is split into "E" and "iffel".
The approach wasn't invented here. It follows a published method, ROME (Meng and colleagues, 2022): first find where the model handles a fact by changing its internal values during forward passes and watching the answer, then edit one matrix with a rank-one change. That's the simplest kind of change to a matrix, and it works like a single rule: "when the layer's input matches this pattern, add this to its output". Claude's scripts follow the same two steps, and attempt 3 uses ROME's formula for the edit. Its success here likely owes a lot to having learned this research, as with the game networks, where it did best when it could read the game's code.
How are Paris and Rome represented inside the model, if one edit can change the answer to some questions about France's capital but not others? A recent essay from Goodfire, Neural Networks Are Already Clean, argues that most concepts are encoded fairly cleanly in individual neurons, rather than spread across many of them in a tangled way. This lab didn't study that question, but a partial, wording-dependent side effect like this one is the kind of result that such work tries to explain.
Three small games, small networks, short training runs with one set of settings, and one edited language model. Each experiment was run once. Larger games and networks would be needed to see whether any of this scales.
At least for small networks: the clearest case behaved exactly like the program written from the same design.
Knowing how networks are built, and able to write scripts that read and set weights, Claude designed networks and worked out what others do. It did best when it also had the game's source code.
The language-model edit designed from the weights alone changed nothing. It took forward passes to make an edit work, and even then a related fact changed too.
Our training runs were short, and longer training has won in harder games such as Go. And for a game strategy, ordinary code does the same job.
Claude read the games' code before writing weights, and designed two of the three games knowing a network would play them.