Azul Engine Dev log

Puzzles from self-play, and a measurement lesson

The engine now mines its own games for puzzles, rated by difficulty. Re-judging them with a stronger network removed a fifth. And a +43 Elo jump turned out to be mostly a faster server.

Three things since the AlphaZero match: a puzzle mode, a fourth self-play run, and a number that was too good.

Puzzles mined from self-play

A new command, azul puzzles, plays the network against itself and, at each turn, asks the search for its two best moves. A position becomes a puzzle when three things hold: the search reached the end of the round, so nothing was cut short; the best move beats the second by at least 3 points; and the best move is not what a greedy player would pick, the move that looks best for your own board right now. That last rule is what keeps out positions where the answer is simply "complete the obvious line".

Each puzzle also gets a difficulty: easy if the classic engine finds the answer looking two moves ahead, medium at four, hard if it needs more. On the board the analysis stays hidden until you move, then it tells you how much better the answer was than the next best move and can step through the line. The puzzles page lists a sample.

Puzzles depend on who judges them

The first 291 puzzles were found with generation 10. When generation 12 took over, I searched every one again with the new network: 231 still had the same answer with a gap of at least 3 points, 60 did not. The search is exact to the end of the round, but the value of the round's end comes from the network, and a better network sometimes changes its mind. The 60 were removed. "The best move" in a puzzle means the best move according to the strongest judge available, and it is worth re-checking whenever the judge changes.

A fourth run, and a number that was too good

The fine-tuning loop ran three more generations. Generation 12 beat generation 10 by +16 ± 12 over 3,000 games, a small but real step, and became the board's brain. Against the classic engine it scored +206 ± 15, where generation 10 had scored +163 ± 14. That is +43 from a network only 16 Elo stronger.

The difference was the machine. The runs had moved from a 4-core server to an 8-core one, and every match uses a fixed 40 ms per move: a faster machine searches more positions in the same time. Played again on the new server with the same deals, generation 10 scored +188 ± 14. Against generation 12's +206 that is +18, matching the head-to-head result. Elo against a fixed opponent depends on the hardware when moves are timed; only numbers from the same machine compare, and the head-to-head match is what decides.

Also tested

Sampling the next round's tile deals at the end of each round, which cost 10 to 50 Elo with the classic evaluation, was tried again with the network: 2 or 4 deals, searched 1 or 2 moves deep, at 40 and 200 ms per move. Results ranged from −20 to +7 ± 24. Still no gain, so it stays off.