PUZZLTHINK

DEV NOTE

Heavy 13Flip OmokNine Men's MorrisMonorailLaser Janggi

Tuning AI difficulty from play data

The target: human win rates of 80, 50 and 25%. The records told a different story each time.

Making an AI strong is the comparatively easy part; making it *just right* is hard. On 20 and 26 November PUZZLTHINK retuned the AI levels of almost every game from real play records. This note describes the method and the failures that repeated across games.

Each game with a detailed AI story has its own note (Wallgo, 12 Janggi, Russian Janggi, Blind Gomoku, Black & White…). This one gathers the cases from other games and the lessons they share.

Play now

Published · 2026-11-26

Method: compare the same people

The target first appears in the 20 November commit: human win rates of 80% on Easy, 50% on Normal and 25% on Hard, measured from signed-in players’ games against the AI, game by game and level by level.

A plain comparison has a trap: strong players pick Hard, so a high win rate on Hard may mean Hard is easy — or that good players chose it. So, as the commit says, the comparison was made among the same players who had played both levels. If the same people beat Hard more often than Normal, Hard really is easier.

AIs were also pitted against each other: after each change, AI-vs-AI simulations checked that Easy < Normal < Hard still held (the 20 November commit records this for 12 Janggi and Russian Janggi).

Failure 1: too strong

The most common one. A first AI usually does its best, which is far too much for people.

GameRecordChange
12 Janggi, Hard5% human wins (11/20)7-ply → 5-ply search
Blind GomokuNormal 22%, Hard 8% (11/20)Memory 5 / 15 / all → 3 / 8 / 24 moves
Flip Omok, Normal15%, 4% on a first try (11/26)The two-move reader became Hard; a new Normal looks at its own move only
Flip Omok, Hard1.7% of 120 games (11/26)The alpha-beta AI was withdrawn and kept as a future Very Hard engine
Color Link2.7% of 590 games (11/26)Promoted to Very Hard as it was; new Normal and Hard added

Flip Omok’s new Normal looks only at its own move. It always makes five and always blocks a five, avoids handing over an immediate win 90% of the time, but its judgement carries wide noise (a ±350-point range), so an open three or a line-flipping move can get past it.

Failure 2: two levels became the same

Tuning "Normal is a bit less than Hard" with several numbers can quietly make both equally strong.

Heavy 13

In Heavy 13 seven players secretly submit a number card and a colour chip to stack cubes on three porter stands; a stand that reaches 13 collapses. Its AI changed a lot the morning after launch. The first one assumed everyone else played at random and picked its best answer — so every AI found the same "safe" stand and they all piled onto it. Now it thinks one step further: it forecasts what each player is likely to play (spreading their good answers against random play with a softmax), then picks the best answer to that forecast. It passes only when that saves penalty.

Normal skips this calculation some of the time and plays any card. On 20 November that was set to 30%; on 26 November people took first place 19% of the time against Normal and 25% against Hard, with average ranks of 3.48 and 3.41 — Normal was no easier at all. It now skips on half its turns.

Russian Janggi, Black & White

After the first retune Russian Janggi’s Normal and Hard both read two moves, and for the same players the difference vanished (34% vs 33%). In Black & White, Hard was even easier than Normal. Both stories are told in those games’ own notes.

Failure 3: always the same move, so it got memorised

The most interesting one. A deterministic AI, however strong, loses again to a winning line that is simply replayed.

Nine Men’s Morris

Hard answered a position the same way every time. The records showed several people with 13–16 wins out of 13–16 games against it — they were replaying a winning line. Each level now has a margin below its best move that it may still pick (with a piece worth 1000: Easy 700, Normal 60, Hard 18), mixing near-equal moves. Hard also went from 5 to 6 half-moves, with the node budget split evenly so the last candidates are not judged on a shallower search, and a sign bug that made it prefer losing *sooner* was fixed.

Monorail

The random sample of routes the AI judged by was fixed, so the same position always got the same answer and a winning line could be replayed. The sample now changes with every decision. Hard picks at random among plans it cannot tell apart; Normal (people won 29%) plays any route-safe move about one turn in three.

Black & White

Hard’s near-fixed choices were read, making it easier than Normal. In the end every level was made to use a deliberately rough estimate.

Because of these, every Very Hard AI built afterwards picks at random among moves almost as good as the best: within 0.12 of a man in 12 Janggi, within 8 points in Russian Janggi, among the top three in Blind Gomoku.

When it was a bug, not a level

Laser Janggi’s Hard sometimes picked a move whose laser hit its own king. The code that played any move with a decided result did not tell a win from a loss. Immediate wins are already taken earlier, so a decided result at that point can only be a loss; such a move is now never played while another exists.

Russian Roulette’s AI got "trust what you know" the same day. Exactly two chambers are loaded and chamber c fires at seat muzzle + c. If the AI has seen the chamber aimed at its seat it trusts that (and if loaded, turns the muzzle to the safest chamber it can afford); if not, it estimates the risk from the share of unseen bullets and goes to look first.

Showing the numbers instead of forcing them

In luck-heavy games no amount of tuning reached the target. Indian Poker’s AI was designed to win 50% and 75%, and actually won 41% and 55%. For such games, from 26 November the level buttons show the recorded win rates instead (Indian Poker, Two-Sided Poker). For the same reason, Russian Roulette and Indian Poker wins stopped counting toward the piece race from 20 November.

With the 26 November retune every game’s entry screen also got an "Updates" section and a full history popup, so players can see when an AI changes.

Where the numbers stand

Signed-in players’ games against the AI as of 2026-11-26, 14:00 KST. Few games have been played since the 26 November retune, so most of these predate it.

Game · levelHuman resultGames
Heavy 13 · Normal1st 20.6%, average place 3.40749
Heavy 13 · Hard1st 24.7%, average place 3.40486
Flip Omok · Normal14.8% wins283
Flip Omok · Hard1.7% wins121
Nine Men’s Morris · Normal47.9% wins71
Nine Men’s Morris · Hard63.8% wins94
Monorail · Normal26.8% wins231
Monorail · Hard54.3% wins385

Hard beating Normal in Morris and Monorail reflects the period when replaying a winning line worked. The next retune will wait until enough games have been played since 26 November.

Where this comes from

This note is written only from the code, the commit history and the aggregate numbers below.

  • `src/lib/heavy13.ts` — planSubmissions (forecast, then answer), NORMAL_SLIP, LEVELS
  • `src/lib/flipOmok.ts` — casualMove, readerMove, searchMove comments
  • `src/lib/morris.ts` — DEPTH and MARGIN comments
  • `src/lib/monorail.ts` — routeSalt, Normal/Hard choice comments
  • `src/lib/laserJanggi.ts`, `src/lib/russianRoulette.ts` (informedRRAction), `src/lib/indianPoker.ts` (POKER_AI_TARGET)
  • Commits 58b4daf (11/17 Heavy 13 forecast AI), 1fe2d84 (11/20 first retune, 80/50/25% targets), e227318 (11/26 second retune, Updates section)
  • DB aggregates (2026-11-26 14:22 KST): game_results (mode = ai) — Heavy 13 first-place share and average place by level; Flip Omok, Nine Men’s Morris and Monorail win rates by level

Read next

  • How the Wallgo AI plays

    From a reach-first territory estimate to alpha-beta with a transposition table: what each Wallgo AI level computes, and where it is weak.

  • 12 Janggi AI dev notes

    Why a 7-ply Hard was almost unbeatable and went down to 5, the no-third-repetition ban, and a Very Hard that reads 13–19 plies.

  • Russian Janggi AI dev notes

    Even the Very Hard engine that reads to the end must lose to a first-move large cup in the centre — and how that shaped the AI and its win rate.

All dev notes →