Tic-tac-toe against CSS

You are X. O is a 18→64→9 neural network (1,801 integer weights) computed by your browser's style engine with @property, calc() and :has(). 0 bytes of JavaScript. It never loses.

You always start.
Your moveYour turnCSS winsYou win?!Draw
Tap any square to play X. The network answers instantly. The tint and percentages show how much the network liked each square before it moved. The network was trained on every position of the game, so the best you can get is a draw. Press New game to try again.

Inside the network

Its last decision. The same network is written out four times in the stylesheet, once for each of its moves.

Board18 inputs: X, O
Hidden layer64 ReLU units
Scoressoftmax, softened for display
O
Moveargmax with clamp()