Autoresearch · Othello

Training a model to play Othello with Autoresearch

Autoresearch lets an AI agent run its own machine-learning experiments: editing the code, training, checking results, and trying again, hundreds of times. I pointed it at a small model and asked it to learn Othello from nothing but lists of moves. It learned to play legal games. And when I looked inside, the model had built a picture of the board.

scroll to see how it went
A layered Othello board with flipping discs and a lattice revealing the model’s internal board representation
What Autoresearch is

The AI runs the experiments

Improving an AI model normally means a slow human loop: change some code, train the model, check whether it got better, try again, over and over. Autoresearch, a project by Andrej Karpathy, hands that entire loop to an AI agent so it can run on its own, hundreds of times.

I gave it a concrete job with a clear scorecard: train a small model to play Othello. The catch is that the model is never told the rules. It only ever sees finished games written out as lists of moves, like d3 c5 f6 …, the way you might pick up a game by watching thousands of them.

Othello is a good test because you can simply check whether the moves the model makes are legal. No opinion required.

How it worked

A five-minute experiment, on repeat

The AI agent ran the same loop over and over, unsupervised, on a graphics chip I rented by the hour:

1
Tweak the training recipe
2
Train the model for exactly 5 minutes
3
Measure whether it improved
4
Keep the change if better, undo it if not
↻ then do it again: a fresh idea every few minutes, all night

Everything was fair game for the AI to change: the size of the model, how fast it learned, the shape of its internal wiring. My only job was to decide what counts as "better", the goal it optimizes toward. That choice turned out to matter more than I expected.

The first run  · 91 experiments · about 10 hours

First, I asked it to be a good guesser

For the first run, "better" meant one thing: get better at predicting the next move in a game. The bet is that if the model can reliably guess what comes next, it must be picking up something real about how Othello works.

It worked. Over about ten hours, the AI kept finding small improvements. Each dot below is one experiment; the line tracks its best result so far.

How well it predicted the next move (lower is better)

Here's the surprising part. I never asked the model to follow the rules, only to predict moves. But as it got better at guessing, it started actually playing legal Othello on its own. Watch the difference between its early attempts and its best moment in this run:

Hour one
Hour seven
Left: a partly-trained model plays some real moves, then slips onto an illegal square (✕). Right: a later model plays a clean game start to finish.
Then it found a loophole

Partway through, the AI discovered a clever data trick that nudged its prediction score higher, but quietly made its actual play worse. It was optimizing the thing I measured, not the thing I wanted. That gap between a proxy and the real goal is a classic trap, sometimes called Goodhart's law: when a measure becomes the target, it stops being a good measure.

So I changed the question.

The second run  · 39 experiments · about 5 hours

Then I asked it to actually play

This time "better" meant the thing I really cared about: play a complete, fully legal game, start to finish, with no illegal moves at all. A much harder bar, and one the loophole from before couldn't fake.

It climbed fast, and this run knew when to quit. I'd set it to stop automatically once it stopped improving, so it wrapped itself up after about five hours instead of running until the money ran out.

Share of games played legally start to finish (higher is better)

By the end, the model had genuinely learned the game, from nothing but lists of moves:

of its games are legal from start to finish
of individual moves are legal
win rate against random play
The trained model playing itself: real games, filling the board.
Looking inside

But does it actually "get" the board?

Here's what nagged me. The model only ever saw move lists, never a board. So is it really tracking the game, or just parroting patterns it has seen? There's a way to check, using a technique called mechanistic interpretability, which studies a model's inner workings to understand how it reaches its answers. You peek inside the model's internal activity as it reads a game and ask whether the current board is written down in there somewhere.

It turns out the board really is in there. Reading the model's internal activity, we can reconstruct what's on each square (mine, yours, or empty) with 92.8% accuracy, far above the roughly 33% you'd get by guessing. The further a square moves from paper toward ink below, the more reliably the board shows up in the model's internal activity:

We can even watch it happen. On the left is the board the model has reconstructed internally as it reads a game; on the right is the real board. They track each other closely: the model is holding the game in its head, move by move:

what the model pictures
the real board

This mirrors a well-known result called "Othello-GPT," where researchers found the same thing in a larger model: evidence that models trained only to predict can build genuine internal models of the world they're predicting. (The original paper.)

In short

Running on its own, Autoresearch trained a small model to play legal Othello, worked around a pitfall it discovered along the way, and ended with a model that had quietly built a map of the board it was never shown.

All told: about 130 experiments across the two runs, roughly 15 hours of compute on a rented GPU, for around $50. Every run is in the logs.