PvZH AI

Nets ⓘ

The AI plays with a search that works through many possible continuations before every move. Two learned nets make it smart: the value net estimates how likely a position is to be won, the policy net says which moves are worth trying first.

Inside the net

How the value net gb4n – an earlier generation that works like today’s nets – looks at a position and turns it into a win chance. Pick an example; the picture shows which inputs and neurons push the estimate up (green) or down (red).

Simplified view: the board shows the main facts, and the picture shows only the strongest connections. The net also gets more, e.g. discard piles, superpowers and its guess of the opponent’s cards.

Turn 5: Neptuna (Zombies) against Citron. The net gives the Zombies 73.0% – this side won the game.

CitronPlants
❤ 6✦ 1🂠 6⛨ 0/8
Heights
42
21
Ground
32
Ground
44
21
Ground
0132
Water
22
35
NeptunaZombies · the side the net evaluates
❤ 14✦ 1🂠 3⛨ 5/8
Hand:

❤ health · ✦ sun/brains left this turn · 🂠 cards in hand · ⛨ super-block meter (blocks at 8) · fighters: strength and health

What drives the estimate

Per input block: by how many percentage points the estimate changes when the net does not see the block.

Lane 5+29
Features+26
Lane 1+24
Health, resources, turn−20
Heroes+5
Lane 4−5
Lane 2−4
Hand stats+4
Facts 3−3
Facts 1−3
Lane 3−2
Hand+2
Facts 2−1
Remaining deck−1

The net at work

Strength ladder

How strong each version of the AI is, from a bot that plays random legal moves (0 Elo) to today.

How these Elo numbers are computed. Every new version of the AI plays thousands of games against the version before it – the same matchups and the same shuffles, with both sides swapped, so luck cancels out. From the share of points p the new version wins, the rating gap is Elo = 400 × log10(p / (1 − p)): 50 % means equally strong (0 Elo), 64 % ≈ +100, 76 % ≈ +200, 91 % ≈ +400. We start at the random bot (0 Elo) and add up the steps. Each step is measured only against its direct predecessor, so the total is chained and approximate. The late steps are small (+5 to +15 Elo) and need thousands of games to be sure. Not comparable to in-game ranks or chess ratings.

±0+200+400+600+800A5 · greedy (best move now)+298B1 · fair greedy+330B4 · planner (plans the turn)+382C3 · search without a net+500E · e11220510_1+645E · e11220510_3+671G1 · e11220510_3+688G3 · e11220510_3 + z1+706G3 + opponent model · e11220510_3 + z1+725G4 · g4v + z2+738I1 · h6v + z5+812I1 · h7v + z6+830I1 · h9z + z7+836I1 · s11 + z9+841I1 · k1s + z9+841gb2 + gbz2+880gb3 + gbz3+896gb4 + gbz4+901gb4n + gbz4+916gb6 + gbz4+924gb7 + gbz4+932gb8 + gbz4+939gb9 + gbz4+947gb9 + gbz8n+956gb9 + gbz9n+960

What do the names mean?

The labels of the strength ladder are the names of the nets each version played with: value net + policy net.