PUZZLTHINK

DEV NOTE

Black & WhiteBlack & White II

Black & White AI dev notes

The more precisely it calculated, the more people won.

In Black & White two players each play a tile from 0–8 and the higher number wins the round. Even tiles are black, odd ones white, and the opponent sees only the colour. Over nine rounds the numbers are never revealed — only colours and results pile up.

This AI’s story runs opposite to the others. Usually deeper calculation makes an AI stronger; here, after checking the records twice, the AI was made to calculate more roughly. The numbers left in the code tell why.

Play now

Published · 2026-11-26 · Last updated · 2026-11-27

What it sees, what it computes

Black & White launched on the evening of 17 November. The AI sees exactly what a player sees: its own tiles, the colours of yours, and each round’s result. From that it computes:

  1. STEP 01

    List every possible past

    Every sequence of tiles you could have played so far, matching each round’s colour and, compared with its own tile, the actual result. Up to 6,000 of them.

  2. STEP 02

    Sample your hand

    Pick one of those pasts at random to decide which tiles you still hold. If you led this round, pick a tile of the colour you laid as your move.

  3. STEP 03

    Play it out

    For each tile it could play, settle this round, then play the rest with a simple policy (lead mostly middle and low tiles; when following, weigh the chance to win against the cost of spending a big tile). Win 1, draw 0.5.

  4. STEP 04

    Repeat, then mix

    Repeat that (the sample count) to get each tile’s win rate, then choose with a softmax rather than always the best: better tiles more often, but not always the same one.

The lower the softmax "temperature", the more it sticks to the top tile; the higher, the more it mixes. Sample count and temperature were the whole difficulty.

First surprise: Hard was easier than Normal

The first settings were the obvious ones: Hard ran 360 simulations at temperature 0.035 (nearly always the top tile), Normal 90 at 0.09. On 20 November, comparing players who had played both, people beat Hard 66% of the time and Normal 51%. The more precise, more decisive AI lost more.

The diagnosis in the code comment: "a near-fixed choice gets learned and exploited." Black & White is a mind game. If the AI always plays the same tile in the same situation, a few games are enough to read it. Hard went to 700 simulations for a sharper estimate but temperature 0.08 to mix more; Normal went rougher, 60 simulations at 0.11.

Second surprise: more precise, more losses

On 26 November the same thing showed up again — this time in the sample count, not the temperature.

700 simulations (Hard)60 simulations (Normal)
Human win rate47%41%
Draws24%20%
Players who played both51%46%

The code comment sums it up: a precise estimate repeats itself and gets read; a rough one mixes its tiles. With 700 runs the same situation yields the same conclusion, and even with a temperature the gap between first and second is clear, so similar tiles come out. With 60 runs the estimate itself wobbles and a different tile comes out on top from game to game.

So now every level uses 60 simulations at temperature 0.11. The only difference between Normal and Hard: Normal plays one tile in four "by feel" (a simple colour-aware choice). Easy always plays by feel, half the time completely at random.

Black & White II: splitting 99 points

Black & White II arrived about 40 minutes later the same day. Both players secretly split 99 points over nine rounds; a one-digit bid shows as black, a two-digit bid as white, and the points left are always public on a five-band gauge (20 points a band).

The AI has the same shape: from public information (your colours, results, gauge, and when it follows, the colour and new gauge of your bid) it narrows down how many points you have left, samples a figure from that range and plays each candidate bid out to the end. If you led, it uses only bids that fit the colour and the gauge change. Hard runs 500 simulations at temperature 0.025, Normal 120 at 0.06, Easy plays by feel. The records have not shown the "more precise, easier" effect here yet, so these settings stay.

Real win rates

Signed-in players’ games against the AI as of 2026-11-26, 14:00 KST. For Black & White, most predate the 26 November retune.

Game · levelHuman win rateDrawsGames
B&W · Normal40.6%21.8%298
B&W · Hard47.0%23.5%562
B&W II · Normal44.2%1.9%154
B&W II · Hard38.4%2.3%341

Eighty-five players hold a Black & White Hard-AI clear certificate, second only to Indian Poker; Black & White II has 42. Counting everyone, Black & White had been played 2,996 times (2,236 against the AI) and Black & White II 1,201 times (950).

11/27: ten personalities — same skill, different style

This time the "precise means readable" problem got a different fix. The calculation stays (a little sharper, 160 samples) and each game draws a personality, which only decides which way to lean between tiles the estimate rates about equal: a bonus of about 0.1 (at most ~0.18) on the win-rate estimate, so it never throws away a clearly better tile.

  • The Attacker leads high, the Careful One hoards big tiles, the Fast Starter spends in rounds 1–4, the Closer from round 5: personalities differ in when the big tiles come out.
  • Every game the lean’s strength and a mood (a little bolder or calmer) vary with a seed, and 8% of moves drop the style on purpose.
  • Reading you: it counts, from colours and results only, how often your leads win (do you lead high?) and how often your answers win, and leans its picture of your play that way. It still never sees your numbers.

Against the previous Hard AI each personality scored 46.8–57.3% over 300 games (50% = equal, ±6 points of noise), and the sum of tiles spent in rounds 1–4 ranged from 12.3 (the Closer) to 15.9 (the Fast Starter). Levels stay: easy and normal play the same personality with their usual random or by-feel tiles on top.

11/27: ten personalities in Black & White II

Black & White II uses the same ten. The calculation (narrow down your remaining points, then play each candidate bid out hundreds of times) is unchanged; a personality adds a small bonus of at most about 0.03 to the win-rate estimate and only leans between bids rated close. Hard’s low softmax temperature (0.025) lets a smaller bonus than in Black & White show as a style.

  • The Attacker and the Fast Starter lean above the "fair share" (points left ÷ rounds left); the Careful One and the Closer (early on) below it.
  • The Bluffer likes cheap whites (10–13) and dear blacks (7–9): the amounts whose colour says least about their size.
  • The Trapper leads with blacks (0–9) as bait; the Grinder bids close to the fair share every round.
  • Reading you works as in Black & White: from colours and results only it counts how often your leads and answers win, and leans its picture of your bids that way.

Against the previous hard AI each personality scored 47.8–56.7% over 300 games (50% = equal, ±6 points noise), and points spent in rounds 1–4 ranged from 37.4 (the Trapper) to 43.6 (the Attacker). Easy still bids purely by feel, so there the personality shows only in name and table talk; the style applies on normal and hard.

Gaps a human can use

B&W

You are simple in its simulation

The AI assumes you will lead middle and low tiles and spend big ones only when they are likely to win. Break that assumption — lead a big tile early, for instance — and its win rates are off.

B&W

Normal plays by feel one time in four

Those turns look only at colours and remaining tiles; when following with under a 30% chance to win, it throws away its smallest tile. Lead the weaker colour and it often discards.

B&W II

The gauge moves in 20s

Its only clues to your points are colours and a 20-point gauge. Spend big within one band (so the gauge drops just one step) and its range widens.

B&W II

Hard is decisive

At temperature 0.025 it bets alike in similar situations. As with Black & White, watching its habits over a few games works best.

Where this comes from

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

  • `src/lib/blackWhite.ts` — possibleHistories, holdChances, quickFollow, quickLead, playOut, chooseAiTile (sample and temperature comments)
  • `src/lib/blackWhite2.ts` — rivalBankRange, chooseBw2AiBid
  • Commits d1a5648 (11/17 Black & White), be2fa13 and 992473c (11/17 Black & White II), 1fe2d84 (11/20 Hard 66% vs Normal 51%, 700 runs at 0.08), e227318 (11/26 60 runs for every level)
  • DB aggregates (2026-11-26 14:22 KST): game_results (game = black_white, black_white_2; mode = ai) win and draw rates by level, hard_clears counts, game_plays_daily totals

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 →