I’ve been playing a lot of Hive lately. For the uninitiated, Hive is a board game with no board. Each player has a set of hexagonal tiles, each one a bug that moves in its own way, and you win by completely surrounding your opponent’s Queen Bee. I built a small iPhone app to play it, and one of my favorite features is the game review. After every game, the app walks back through each move and gives it a grade: Best, Good, Inaccuracy, Mistake, or Blunder. At the end you get an accuracy score out of 100, like the ones chess sites give you.

A Queen surrounded on five sides, with an Ant heading for the last gap
A Queen with five neighbors. One more and the game is over.

I am not a genius at Hive. But I kept running into the same strange experience. I’d open a review, see one of my moves flagged as a Mistake, and think: no, that move was fine. I couldn’t always explain why. I couldn’t point to the sequence of moves that proved it. I just had a feeling the engine was wrong.

I’ve written before about knowing something when you see it, how we can often verify an answer we never could have produced ourselves. This felt like that. Either my gut was picking up on something the engine was missing, or I was a mediocre player who didn’t enjoy being told so. Both seemed plausible. So I decided to find out.

I did this work together with Claude, Anthropic’s AI coding agent. It wrote the code and ran the experiments, often in the background for hours at a time. My job was mostly to ask questions, push back, and decide what was worth doing next. That division of labor turned out to matter more than I expected, and I’ll come back to it at the end.

How Does a Computer Grade a Move?

Before we can ask whether a grade is right, we need to understand how it gets made. The review asks one question about every move you played:

How much did this move lower your chance of winning, compared with the best move you could have played?

To answer that, the computer needs a few things. Let me define them, since they’ll come up a lot.

Ply: a single move by one player. Two plies is one move each.

Evaluation: a formula that looks at a position and outputs one number, a score, for how good it is for the player whose turn it is.

Win Chance: that score translated into a percentage by a curve.

With those in hand, the review works like an assembly line. It takes the position before your move, searches every possible continuation a few plies ahead, scores the positions at the end of the search with the evaluation, and turns the scores into win chances.

The five steps of a review: take the position, look ahead, score the board, turn it into a win chance, grade the drop
The review is a chain. We found cracks in three of the five links.

Then it compares. If the best move kept your chances at 60% and your move dropped them to 50%, you lost 10 points. Under 7 points is Good. Beyond that, the grades get harsher:

Good under 7 points, Inaccuracy 7 to 14, Mistake 14 to 25, Blunder 25 or more
Points of win chance lost, compared with the best move.

Here’s the thing about a chain like this: it is only as strong as its weakest link. The thresholds are fixed, so a grade can only be as good as the win chances feeding into it. If the review says you had 60% when the truth was 70%, every grade built on that number is off, no matter how carefully the rest was done.

Three Cracks

When I asked Claude to dig into how the review was built, it found problems in three of those five links.

Crack 1: Seeing Too Little

Four plies is only two moves each. Many Hive plans take longer than that to pay off. You walk an Ant around the hive, slide a Beetle into position, and only then pin the piece you were after. A search that stops early never sees the payoff, so the setup looks pointless. Worse, it looks like a mistake.

To test this, Claude took four games the engine had played against itself, 126 moves in all, and graded every move twice: once at the review’s normal depth, and once looking two plies further.

28 of 100 squares highlighted
28 of every 100 grades changed when the review looked two plies further. In one game, a player’s accuracy fell from 100 to 95.

Imagine a teacher whose grade on your essay changed one time in four depending on whether they bothered to read the last paragraph. You wouldn’t trust that grade, and you shouldn’t.

Aside: There’s a subtler trap in search depth too. A search with an odd number of plies ends on your own move, so you get the last word and the position looks rosier for you. An even number ends on your opponent’s move and leans the other way. Comparing scores from different depths mixes those two biases together. A fair review only compares depths that are both odd or both even.

Crack 2: Guessing the Weights

At the end of the search, a hand-written formula scored the board. Its ideas were reasonable: count how surrounded each Queen is, reward pieces that are free to move, punish pieces trapped underneath a Beetle. But its numbers were educated guesses, picked when the app was first built:

// Value of having n of the six cells around a Queen occupied.
let SURROUND = [0, 60, 160, 340, 640, 1250, 0]
// Value of a piece that is free to move: Q S B G A M L P
let MOBILE = [50, 40, 80, 50, 110, 90, 70, 60]

Is a free Beetle really worth exactly 80, twice a free Spider? Nobody knew. And there were two bigger gaps:

  1. “Free” only meant “not pinned by the One Hive rule.” A piece boxed in so tightly it physically couldn’t slide out still counted as free.
  2. Pieces in your hand were worth nothing. Placing a piece earned points, so the engine loved dumping pieces onto the board. Good players often keep a Grasshopper or an Ant in reserve on purpose.

Crack 3: Guessing the Odds

Step 4 turns a score into a percentage with an S-shaped curve. The only justification for that curve in the code was a comment:

// About 700 (a fifth piece around a Queen) moves the odds
// from even to roughly 3:1.
return 100 / (1 + exp(-score / 700))

It’s a sensible guess. But every grade depends on it directly, and nobody had ever checked it against real games. Later on, once we had a million positions from human games, we could. When the old review told a player they had a 74% chance of winning, players in that spot actually won 84% of the time. I’ll show you the chart further down. The review wasn’t just a little noisy. It was systematically wrong.

What Is a Score, Anyway?

This is where the project got interesting to me, because fixing the formula first required answering a strange question: what does a score even mean?

Suppose the engine says a position is worth +300. What is the 300 measuring? It isn’t pawns, or points, or anything you can hold. On its own, the number is meaningless. A score only becomes meaningful if it predicts something. And the review had already, quietly, decided what that something was: who wins. So let’s make that the definition.

A Good Evaluation: one whose scores, run through the curve, correctly predict who wins.

Two very useful things fall out of this definition. It gives us a way to measure any evaluation, and a way to choose its numbers instead of guessing them.

Measuring: The Loss

Loss: the average penalty an evaluation pays for its predictions, where the penalty is −ln of the probability it gave to what actually happened. Lower is better.

Suppose the formula looks at a position and says the player to move has a 70% chance of winning. If they go on to win, the penalty is small. If they lose, it’s much bigger. The more confident the wrong prediction, the more it costs:

PredictionPenalty if rightPenalty if wrong
50%0.690.69
70%0.361.20
90%0.112.30
99%0.014.61

I’ll admit that the first time Claude reported a loss to me, I had no idea whether the number was good. The trick is the first row. A predictor that knows nothing at all, that says 50% every single time, scores 0.693 no matter what happens. That’s a coin flip. A perfect predictor would score 0, but nothing gets close, because early in a game the result genuinely isn’t decided yet. So the number that matters is how far below 0.693 you can get. And since overconfidence is punished so harshly, the only way to score well is to be confident exactly as often as you’re right. That is precisely what you want behind the percentages in a review.

Choosing: Learning the Weights

If the loss tells us how good a set of numbers is, we can search for the numbers that make it as small as possible. Chess programmers have a name for this.

Texel Tuning: fitting an evaluation’s weights so its predictions best match the results of a large set of real games. It’s named after the chess engine that popularized it.

Mathematically, it’s the same idea as drawing a line of best fit through a scatter of points. You collect a pile of positions, each tagged with who eventually won, and nudge the weights over and over until the formula’s predictions line up with what actually happened.

Positions feed features, a weighted sum, a fixed curve and a loss, which adjusts the weights
Because the weights are fitted through the exact curve the review uses, the win chances come out calibrated for free.

That last point is the clever bit. We hold the curve fixed and let the weights do all the moving. So when the fit is done, a score doesn’t just rank positions, it lands on a win chance that real games bear out. Crack 3 gets fixed as a side effect of fixing crack 2.

Aside: When I first heard “learned from thousands of games,” I assumed we were building a neural network. We weren’t. The formula is still a plain weighted sum that gives the same answer every time. Think of it as a recipe: the features are the ingredients, and the tuning only decides the amounts. Once the fitting is done, the games are thrown away and the 39 numbers are pasted into the app as constants. Nothing is learned on your phone.

New Ingredients

Weights can only weigh what the formula measures, so before fitting anything we widened what it looks at. Claude borrowed ideas from two open-source Hive engines, Mzinga and nokamute, and rebuilt the evaluation around 39 features. The most important additions:

  • Real mobility. A piece only counts as free if it actually has a legal move, with a separate weight for each bug.
  • Pieces in hand. Reserves are now worth something, so the engine stops dumping pieces just to score points.
  • Attack reach. How many of your pieces could reach the enemy Queen next turn. A real threat instead of a piece that merely happens to be nearby.
  • Finishing threats. When a Queen has four or five neighbors, how many of her remaining gaps you could fill.
  • Tempo. Whose turn it is. The old formula ignored this completely.
  • A Pillbug guard. A Pillbug next to its own Queen can lift her out of danger.

And one rule held throughout: a better fit isn’t proof of anything. Every change had to beat the previous version in actual games, at equal thinking time, or it didn’t ship.

The Part Where Everything Broke

If this all sounds tidy, it wasn’t. Most of what we tried failed the first time.

Failure 1: Too Slow to Be Useful

Working out where every piece can really move is expensive, especially Ants, which can travel anywhere around the outside of the hive. The first version of the new formula made the engine four times slower. In a fixed amount of thinking time, slower means a shallower search, and depth is strength. A smarter formula that can only see half as far is not obviously an improvement.

The fix was a rule of thumb for Ants: an Ant that can slide out at all counts as free, and it can reach the enemy Queen if she has an open side it could slip into. That brought it from 162,000 positions searched per second back up to 404,000. The old formula manages 626,000, so the new one is still about 1.5 times slower. It has to earn that back by judging better.

Failure 2: Worse Than the Guesses

To fit weights, you need positions with known outcomes. So the engine played 1,200 quick games against itself, with 6% of its moves made at random to keep the games varied.

The fitted weights predicted the held-back test games worse than the hand-picked guesses did. The random moves were deciding games, so many results said more about a late blunder than about the position. There were also too few games to drown that noise out.

The second attempt used 8,000 games, with randomness only where it helps: each game opens with 4 to 8 random plies so no two start alike, and after that only 1% of moves are random. I asked whether 8,000 games was enough, and why it took about half an hour on a fast computer. The second answer surprised me. Every move gets a fixed slice of thinking time, so a faster computer doesn’t finish sooner. It just thinks deeper in the same time.

Failure 3: The Fit That Got Worse as It Ran

With better data, the fit misbehaved in a brand new way. The loss on the very games it was fitting went up as it ran. That should never happen. Pushing that number down is the entire point of fitting.

Training loss dipping at 250 iterations, then rising to 0.639; after the fix it ends at 0.607
Training loss while fitting (lower is better). The broken fit dips, then climbs for 1,750 iterations.

The culprit was a setting meant to prevent overfitting.

Regularization: a small penalty that pulls weights toward zero so they don’t grow wild chasing noise in the data.

Our weights live in the hundreds, so a penalty on their squares was enormous compared with the signal in the data. The fit was happily trading away accuracy to keep the weights small. Turning the penalty down by a factor of ten thousand fixed it. On held-back games, the loss fell from 0.640 to 0.618, and for the first time the predictions lined up with reality: when the formula said 45%, the player won 45% of the time, and when it said 75%, they won 75% of the time.

Does It Actually Play Better?

A lower loss is encouraging, but the real test happens over the board. Each match was 200 games: 100 different openings, each played twice with the colors swapped, at a tenth of a second per move for both sides. The app has two kinds of search, Extreme (which also powers the review) and a simpler one behind Hard and Expert, so we tested both.

Extreme: 65% base game, 70.2% all expansions. Hard and Expert: 52.8% base game, 66.2% all expansions
The new formula, trained on engine games, against the old one.

A clear win with Extreme. With the simpler search in the base game, though, it was barely better than a coin flip. That gap would close later, from a direction I didn’t expect.

The Problem With Learning From Yourself

Around here I started to worry about something. All of these games were the engine playing itself. Wasn’t that a closed loop? If the engine had a blind spot, it would have it on both sides of the board. A weakness neither player knows how to exploit never loses a game, so in the data it looks harmless. The data would also only contain the kinds of positions this particular engine likes to play. And “a 70% chance” would mean 70% for this engine against itself, which is not what I want to know when I’m reviewing my own game.

The fix seemed obvious: learn from real people. Boardspace.net, one of the longest-running places to play Hive online, publishes its full game archive going back to 2006. That’s 2,430 files, 263 MB, about 240,000 games. We downloaded it slowly, one file a second, and kept it on my machine only.

Most of those games turned out to be against Boardspace’s bots, which would just bring back the self-play problem, so out they went: 211,717 of them. That left about 28,000 games between humans.

Then came another failure. When Claude replayed those games through our app’s rules, 9,327 of them, a full third, contained a move our rules said was illegal. Either our rules engine had bugs or the converter did. The rejects clustered around Beetles. It turns out the archive sometimes records a Beetle climbing onto another piece with just a dot, instead of naming the piece underneath. Claude rewrote the converter to track every stack on the board by its coordinates and write out each move from that, rather than trusting the record’s text. The rejects fell to 80.

That left 28,020 human games and 1,061,958 positions. And now we could finally ask the question that started all of this. When the review shows a win chance, is it true?

The old formula’s predictions sit above the perfect line, the new formula’s sit on it
What the review said, against how often players actually won, over a million human positions.

For me, this chart is the heart of the whole project. The old formula sits above the line everywhere. It underrated whoever had the move, and it was far too timid about big leads. The new formula hugs the line, and remember, it was trained only on engine games. It had never seen a human play.

The loss tells the same story. On the human games, the old formula scored 0.617 and the new one 0.593. That gap looks tiny until you measure from the coin flip. The old formula got 0.076 below 0.693, the new one 0.100. That’s roughly a third more knowledge about who is going to win, averaged over a million positions. Splitting it up by stage of the game shows where that knowledge comes from:

Early game 0.027 vs 0.029, middle game 0.095 vs 0.119, late game 0.118 vs 0.173
How much each formula knows beyond a coin flip (0.693 minus the loss) on 28,020 human games.

In the opening, nobody knows much, which makes sense. Too much of the game is left. But in the late game, where positions should be readable, the new formula knows 47% more than the old one.

In a Twist (!)

Next, we refitted the weights on the engine games and the human games together. Predicting people got better again: on held-back human games, the loss dropped from 0.587 to 0.551. Predicting engine games got slightly worse, which seems like a fair trade for an app whose reviews are read by people.

Then the match. I expected weights tuned to human play to do a little worse against an engine. Instead, the human-trained weights beat the engine-trained ones 63% of the time in the base game and 58% with expansions. Human games are full of plans and positions the engine would never steer toward by itself. Learning to judge those made it a better player, not just a better predictor.

More of the Same Stopped Helping

The textbook next step is to repeat the cycle: play 8,000 fresh games with the improved engine, refit, keep the result if it wins, and go again. I asked Claude to automate this, keeping a new set of weights only if it scored over 52.5% against the current ones.

Three rounds: base game scores of 42%, 44.5% and 42.8%; expansion scores of 52%, 58.2% and 54.5%
Three rounds, three rejections.

Every candidate lost clearly in the base game, even as it won or tied in games with expansions. None cleared the bar. Piling on more engine games pulled the fit back toward engine play, and the base game paid for it. The big gains had come from new information, better features and real human games, not from throwing more computer time at the problem.

Looking Twice Before Calling It a Mistake

The new formula fixed cracks 2 and 3. Crack 1, the short look ahead, needed a change to the review itself. Searching every move deeper would take minutes per game, which is too slow for a phone. But most moves aren’t in question. The ones that matter are the ones the review is about to criticize.

So now the review takes two passes. Every move is searched 4 plies deep, as before. Any move graded Inaccuracy or worse gets searched again, 6 plies deep, before its grade sticks. If the deeper look says the move was fine, it gets the better grade.

To check whether this helped, Claude took 6 human games, 339 moves in all, and graded every move three ways: with the old review, with the new formula but only one pass, and with the full new review. Each was compared against a much deeper search standing in for the truth.

Agreement 54%, 60%, 67%. Accuracy gap 11.4, 8.5, 6.7. Mistakes caught 21, 27, 27 of 35. False alarms 5, 5, 1
Each review against a deep reference search, on 339 moves from real games.

Look at the false alarms. That’s my original complaint, measured. The old review called five moves mistakes that the deep search considers perfectly fine. The new one calls just one. And it catches six more of the real mistakes.

Aside: Take these particular numbers with a grain of salt. Six games is a small sample, with only 35 real mistakes in it. The reference search often ran out of time at 6 plies, the same depth as the rechecks, which flatters the new review a little. The direction is clear, but the exact percentages are rough.

Where It Ended Up

Finally, we put the finished engine up against the original one, directly.

Extreme: 78.5% base game, 68.2% all expansions. Hard and Expert: 66.5% base game, 61.3% all expansions
The final engine against the original, 200 games each, equal thinking time.

In the base game with Extreme, it won 149 games, lost 35, and drew 16. That’s a gap of about 225 Elo, roughly the difference at which the stronger player wins four games out of five. The simpler Hard and Expert search, which was a coin flip earlier on, now wins two games in three.

None of this was free. The formula is 1.5 times slower to compute. The bigger cost is the review itself. The old one took about 4 seconds per game; the new one averages close to a minute, and can take over two for a long game with all the expansions. There’s some irony in that, given how much I’ve written about friction. But I’ll happily wait a minute for a grade I can trust over getting an instant one I can’t.

Some Lessons From Grading the Grader

  1. Define what a number means before you tune it. Once a score was defined as a prediction of who wins, we could measure every formula, fit its weights, and calibrate the review all in one move.
  2. Measure against reality, not against yourself. Matches against older versions only tell you you’re better than you were. A million human positions told us whether the review was actually telling the truth.
  3. Information beats compute. New features and human games produced the big gains. Hours of extra self-play produced nothing.
  4. Make every change prove itself. Several of the failed attempts looked perfectly plausible at a glance. Held-back test games and the rule that every change had to win a match caught them before they shipped.
  5. Spend your effort where the doubt is. Searching every move deeper was too slow. Rechecking only the moves about to be criticized fixed the false alarms for a fraction of the cost.

Generators and Discerners

I said I’d come back to how this work was divided. Claude generated almost everything: the code, the experiments, the converter, the fixes, most of the ideas. It could run 8,000 games and fit 39 weights while I was busy doing something else. What I contributed was mostly questions. Is this grade really right? Isn’t learning from yourself biased? Could we find real games? Is 8,000 games enough?

Some of those questions didn’t lead anywhere. But one of the biggest single improvements in the whole project, training on human games, came directly out of a skeptical question I asked without knowing the answer. It’s a small example of something I keep noticing: the machine is extraordinary at generating, and the human in the loop is still useful as a discerner. Even one who isn’t a genius at Hive.

When the review calls one of my moves a Mistake now, I still sometimes disagree. The difference is that these days, more often than not, I’m the one who’s wrong.


A note on the numbers: Elo gaps are estimated from match scores, and the whiskers on the charts are two standard errors. Training and test data were always split by game, so positions from one game never appeared on both sides. The human games come from Boardspace.net’s public archive. I used them only to train and test locally, and I won’t be redistributing them.