Skip to contentCyber landscapeAssets0Shielded0%Compromised0%
Blue agents shield assets and repair compromised ones; red agents try to compromise them.
Blue agents
Red agents
Asset
Shielded
Compromised
Blue agent
Red agent
Joël Abrahams
Security Engineer at Stedin
Hi, I'm Joël. When I'm not at the keyboard you'll find me at the piano, over a chessboard, or halfway up a boulder wall. By day I contribute to the cyber resilience of Stedin, a grid operator in the Netherlands.
Usually up for a game, not that I'm particularly skilled.
Bouldering & gym
A fun way to challenge myself.
Chess | Quantum edition
How it works
The game
Ordinary chess, with no castling for now.
The engine sees the real board. Every piece has a real state, and "superposition" only means it is hidden from you.
A piece in superposition is drawn as everything it could be, all at once. The settings can make it cycle through them instead, or add a small red bar of odds under each.
Strictly speaking, this is not superposition. A piece has a real state, and measuring it only reveals what it was all along. What it models is ignorance, a statistical mixture, which is not a superposition. We still say superposition because that word is far better known. It is also a nod to my years of studying quantum information theory and working at a quantum tech startup. And quantum just sounds cool.
We are aware that the engine is not a quantum computer. But even a quantum computer would not make this superposition: real superposition has amplitudes that can interfere, and nothing here does. So this is only an analogy for superposition.
Measuring
A possibility is a kind of piece on a square, such as a knight on c6.
Attacking a piece reveals it: the possibilities "collapse" to what it was all along.
Receiving a check is a partial measurement: it narrows down what a piece may be, though it may still remain in superposition.
Measuring one piece can tell you about the others, because the back rank ties them together. That is ordinary correlation, not entanglement: nothing here could violate a Bell inequality.
A piece also "collapses" when only one possibility is left for it: it is then known by deduction, without being measured.
Possibilities
You are not shown a move of a piece in superposition. It spreads to every square it could have reached without being measured. One possibility is real, the rest are phantoms.
You measure a piece when you attack it, and partly when it gives check, takes something, or changes your own legal moves. A possibility that would have been measured is gone.
A new game asks how far pieces spread. With a cap, possibilities are drawn at random, the real one included. What is not drawn counts as ruled out.
Hyper mode hides which piece moved. After a move that is not measured, every opponent piece spreads, pawns and found pieces too. It has no cap and is significantly harder.
Playing
Point at a piece to see what it could be. The first column adds up to 100%, with the chance of a phantom, which is the chance that nothing is there. The second assumes the piece is real. These are estimates; see Part I of The odds and the bits.
A move made illegal by a hidden piece is refused. That possibility of what could have made that move collapses.
Undo takes back your last move and the reply. What it measured is hidden again, but you still remember it. That makes it a way to cheat.
Above the board: the pieces you took on the left, the ones you lost on the right. The number is the material lead, in the usual values: pawn 1, knight and bishop 3, rook 5, queen 9.
Under Game, the uncertainty counts how many opponent pieces are still hidden. It also gives how much you do not know about them in bits, as an upper bound; see Part II of The odds and the bits.
Chess 960
Chess 960 shuffles the back rank, with the bishops on opposite colours and the king between the rooks. The pawns stay where they are. That gives 960 possible starting positions, and both sides get the same one.
Double Chess 960
Each side gets its own shuffled back rank, so most games start unbalanced.
Your opponent's back rank starts hidden: it is drawn at random with the odds you set, which are the prior. Before the game you can change the odds of where their pieces go. If you pin a piece, it will not start in superposition.
The odds and the bits
Part I: The odds
The odds are ordinary probabilities, not quantum ones, from a simple model of the opponent. It takes any legal move as likely as any other, which is the least informative assumption. A line with a hidden piece on it counts for the chance that the way is clear, and pins and check count once the king is known. The odds never look at the real board, so they cannot give away what the engine knows.
Stockfish prefers strong moves, so these are estimates, and they can be well off when it has one obvious move. So in principle, yes, Stockfish could have hung its queen. However, the odds make that very unlikely, though never impossible. A later version may weigh each move by how good the engine thinks it is.
Every possibility starts with a chance of its own: all alike, or the odds you set in Double Chess 960. Ruling something out rescales what is left to 100%. A piece that moved unnoticed was more likely a kind with many quiet moves than one with few. What you learn about one piece says something about the others, because they share one back rank.
Some shortcuts are taken. In hyper mode each piece is weighed against an average picture of the others, not every combination of them. Two hidden pieces cannot share a square: the chances are worked out by trying many possible worlds (Monte Carlo sampling), so they can be off by a percentage point or so.
Part II: The bits
Entropy counts how unsure you are, in bits. It depends on the model of the opponent, so it measures your uncertainty and is not a property of the position. One bit is one fair coin flip you could not call.
Shannon's formula weighs each possibility by how surprising it would be: A possibility with chance has a surprise, also called its self-information, of bits, and is the average surprise.
An example: at the start of Double Chess 960, with the odds unchanged, the piece on a8 is a queen with 12.5%, a rook with 37.5%, a bishop with 25% or a knight with 25%.
Of the 8 files, 1 holds the queen, 2 hold the bishops and 2 hold the knights. The other 3 hold rook, king, rook.
The queen is 1 in 8, which is 12.5% or 0.125.
A bishop and a knight are each 2 in 8, which is 25% or 0.25.
The a-file is the leftmost, so of rook, king, rook it can only be the left rook: 3 in 8, which is 37.5% or 0.375. It can never be the king.
Each chance is multiplied by its surprise in bits: 1 in 8 is 3 bits, 1 in 4 is 2 bits, and 3 in 8 is 1.415 bits.
The terms are, in order, the queen, the rook, the bishop and the knight:
The game adds this up over every hidden piece: about 17.4 bits at the start. The pieces share one back rank, so they depend on each other, and the whole is at most the sum of its parts: So the number shown is an upper bound. With 960 equally likely back ranks, what you really do not know is only
Entropy measures ignorance, which here is a statistical mixture. A true superposition is a pure state, and has none.
Measuring a piece takes its entropy to 0, and on average lowers that of the others, because they are correlated. A piece that moves unseen raises it again.
Settings
Animation
This works on a phone, but a computer is much better. The board and the odds get more room, and a mouse gives finer control of the odds.
You play chess against Stockfish. Your opponent's pieces can go into superposition: all you see is everything they could be. You measure a piece by attacking it. Chess 960, also called Fischer random chess after Bobby Fischer, has 960 possible shuffled back ranks. Both sides get the same one. In Double Chess 960 each side gets its own, usually resulting in very unbalanced games.
Strictly speaking, nothing in this game is quantum. It is a game of hidden information: every piece has a real state, and you only learn about it. When you "measure" a piece, you change what you know but not the state. A real collapse would need the board to be described by amplitudes, whose squares give the odds of each outcome. That is a different game, and Stockfish could not play it, so here we are reasoning over hidden states instead.
|
Castling is not supported yet.
It could be
Are you sure you want to start a new game? This one is not finished yet.
Which colour would you like to play?
Strength of the engine
Extra possibilities per move
One extra possibility a move at most.Two extra possibilities a move at most.Three extra possibilities a move at most.Four extra possibilities a move at most.Five extra possibilities a move at most.Every possibility there is.
You are not told which piece moved.You are told which piece moved.
If a piece you found moves unseen, you may lose track of it.A piece you found stays found.
Loading the pieces and the engine…Your move. The piece from moved to . Your move. A piece moved, and you cannot tell which. Your move. Check. Your move. The engine is thinking… That square is covered. It is still your move. That would expose your king. It is still your move. That pawn is blocked. It is still your move. Checkmate. You won. Checkmate. The engine won. The game is a draw.The chess engine could not be loaded.
The engine is Stockfish 19 (licence), small build, thinking for under half a second a move. The Elo is Stockfish's own scale for its limited-strength mode, so it is only a rough guide to how you would fare against a human of that rating, and a rougher one in the unbalanced games of Double Chess 960. The rules come from chess.js (licence). The pieces were drawn by Colin M.L. Burnett.
Your attacks . That measures the piece from : it is a .
Your attacks and finds nothing. The piece from is now on .
Another piece now stands on . The piece from is now on .
The piece from gives check from , so you know where it is. From there only a gives check.
For the piece from , a was already ruled out.
The piece from moved to . A had no move from where it stood, so it is not one.
The piece from moved to without you measuring it. A would have been measured, so it is not one.
A piece moved without being measured, and hyper mode does not say which. Every hidden piece spreads: it stayed, or went anywhere it could.
The piece from moved to . Possibilities are capped, so a is ruled out: none of its moves was drawn.
The piece from took your piece on . A could not have got there, so it is not one.
No check was given. As a the piece from would be giving one, so it is not one.
No check was given. From the piece from would be giving one. It is now on .
No check was given. On the piece from is not a : that would be check.
A piece on would shield your from the piece on . Your moves show that nothing does. The piece from is now on .
A piece on would keep the piece on from covering , next to your king. Your moves show that nothing does. The piece from is now on .
The piece from shields your from the piece on . Your moves show that, so you know where it is: . It could still be a .
The piece from keeps the piece on from covering , next to your king. Your moves show that, so you know where it is: . It could still be a .
The piece from moved, so the piece from did not. It is now on .
The piece from went from to over , so nothing stood there. The piece from is now on .
A piece on would stand between your and your king, and free it from the piece on . Your moves show that it is not free. The piece from is now on .
The piece from stands between your and your king, and frees it from the piece on . Your moves show that, so you know where it is: . It could still be a .
By elimination: the piece from can no longer be what could reach . It is now on .
The piece from is no longer a : none of its moves is left.
One thing is left for the piece from : it is a on .
Your king cannot step to : a on covers it. Trying gave it away, so you now know it.
That move would expose your king to a on . Trying gave it away, so you now know it.
Your pawn cannot advance: there really is a on . Trying gave it away, so you now know it.
My own statically typed programming language. The (reference) compiler is in Rust. Mostly a testbed for some of my weirder ideas related to programming languages.