📜 ⬆️ ⬇️

Quantum Chess

Intro


This post was written under the impression of this excellent post from Habra, in which the author clearly, using two-dimensional models that draws his program, explains how the Special Theory of Relativity works.


I work in IT, and by education I am a theoretical physicist. For a long time I have been interested in the popularization of science, and theoretical physics in particular. I will try to explain similarly to the above post about the special theory of relativity on a specially prepared example how quantum mechanics works.


The model that I am considering is not new at all. More than six months ago, Chris Cantwell posted on YouTube the announcement of a new board game: quantum chess (many may be aware of this from this viral video ).


Recently, the game was released on Steam, it costs 249 rubles. There is another implementation - a free iOS application (I don’t know if it’s on Google Play). However, in the process of playing with friends, I experimentally found out that it is wrong from the point of view of quantum mechanics. Such an implementation can rather be called statistical chess, and not quantum.


Therefore, I decided to write my own implementation, with confusion and superposition. In my implementation, I tried to correct those flaws that in my opinion are present in the version on Steam (for example, my pawns can also walk with quantum moves, like all other pieces). About an application for iOS, everything is clear: any implementation of quantum chess must be truly quantum, i.e. not only to be probabilistic, but to support such effects of quantum mechanics as interference, entanglement, etc.



The alpha version is hosted at http://solenodonus.com/truly-quantum-chess . There you can play with yourself, “playing” for two players in turn; or play a full game with a friend. The gameplay takes place directly in the browser, you do not need to download and install anything.


Disclaimer: I do not pretend to a complete description of the laws of quantum physics. But then in the post there will not be a single formula: only pictures, only hardcore.


Superposition


So after all, what are these quantum chess? Their main difference from ordinary chess is that the game is played on a superposition of chess boards . In simple terms - on several boards at the same time.


It looks like this:


image


The blue pawn is in superposition: it takes the c2 and c4 positions at the same time .
The same is true for the red horse: it is in the superposition of the positions g8 and e3 .


What does this really mean?


I’m forced to disappoint a reader who is waiting for an explanation of what superposition really means: there is no explanation for simple.


Superpositions are simply superpositions. They really exist in nature. We hardly see them in everyday life due to decoherence - interactions with a chaotic environment, as a result of which superpositions are quickly destroyed.


However, nothing fundamentally prevents us from providing conditions in which the superposition will last for a long time. Such a task is, for example, before the engineers working on the creation of a quantum computer.


Probabilities


There is another interpretation of superpositions. It can be said that the blue pawn is not on two cells c2 and c4 at the same time, but on one of these cells. We just do not know which one. Moreover, the probability of being on each of the cells is 50% (which is shown with a horizontal strip dividing each half of the pawn in half).


It turns out that in reality



As long as there is no interaction, both options (the pawn on e2 and on e4 ) exist by themselves. The game is played on a superposition of options. This is a complex process, which naturally mixes both options, forcing them to influence each other. Therefore, it cannot be said that there is only one option.


When the interaction is included, the probabilistic interpretation is correct. The probability of finding the pawn on e2 in this case is 50%. The quantum chess engine, if necessary, resolves such situations by choosing an option using a random number generator.


How do I create a superposition?


One important change is added to the usual chess rules: for each move a player can make either a normal chess move or a so-called. quantum move.



To make a normal move, you need to click on the figure (it will be highlighted in green), and then on the cell you want to go to. To make a quantum move, you need to double-click on the figure (it will be highlighted in purple), then click once on the intermediate cell (it will be highlighted in green), and then on the final one.


It is also allowed by the rules to make single quantum moves, i.e. quantum moves, in which the figure makes not two moves in a row, but one.


An important limitation: according to the rules, an enemy figure cannot be eaten during a quantum move. This feature makes the game too unpredictable. The quantum move can only be done on an empty cell.


Dead and alive


A special case of superposition of particular interest is a superposition in which the figure is both alive and dead. Take for example the quantum chessboard from the example above. After the blue f2: e3 pawn moves, the Reds lose half of their knight ...


image


First, the blue pawn itself was superposed. This is because pawns move and eat differently. On the board on which the red knight was on e3 , the pawn successfully ate it and moved to e3 . On the board, on which the knight was not there, the pawn could not make such a move, since she had nothing to eat. Therefore, it remained on f2 .


The red horse was both alive and dead at the same time. Sometime in the future, when interaction with a measuring device occurs (for more on this, see below in the “collapse” section), this situation will be resolved with the help of a random number generator. Either it turns out that the Reds have a horse, or it turns out that he does not. The probability of outcomes is 50%.


It is noteworthy that while the situation is not resolved and the knight is in superposition, the reds can continue to play half of their knight. However, with a probability of 50%, it will turn out that every move of this half of the knight is simply a loss of a move.


Checkmate


Shahs and mats are extremely difficult to sell, because it is not clear how to be in a situation when the king is in superposition of the shah and not the shah; mat and not mat. Therefore, the rules of ordinary chess were simplified: there are no shahs and mats; in order to win in quantum chess you need to eat the enemy king.


It is noteworthy that the king, like any other figure, can be in superposition. If you eat half the king, then the winnings are secured with a 50% probability. However, the game continues in this case! If, say, your king was eaten after that, it does not mean that you lost. After all, your king was eaten only on those superposition boards where you have not won yet! Those. a random number will be generated and you lose / win with a 50% probability.


This is one example of the manifestation of the very "interaction with the measuring device," which destroys the superposition on a quantum chessboard.


The Capitulate button is also not nearly as simple as it seems. The capitulation takes place only on those boards from the superposition on which the game is still running. Those. if you are in a superposition in which you have already won with a probability of 75% (i.e, the enemy has 25% of the king) and you press the Capitulate , then you lose with a probability of 25%. And with a probability of 3/4 you win with surrender! More on this in the following section:


Quantum immortality and protection against it


The Capitulate button can be useful to protect against a strategy game based on a so-called. quantum immortality . Let us dwell on this in more detail.


Consider this chess position:


image


In ordinary chess, this is a classic mate with two rooks. But in quantum chess there are no mats, instead you need to eat the king.


It would seem that here the king has nowhere to retreat: the next move will definitely eat him. However, there is a strategy that uses quantum immortality: the reds can break up their king every move, and he will never be completely eaten. For example, here is a sequence of moves:


image


image


image


image


image


image


image


With each move, the probability of winning the blue increases, but it never reaches one. It turns out that the game will go on forever, and the blue ones will not get a well-deserved victory?


In such a situation, oddly enough, surrender is helpful. If the probability of winning the blue is equal, say, 65535/65536, then you can safely click on the surrender. As written above, surrender will occur only on those boards from the superposition on which the game is still going. Those. Blue wins with a probability of 65535/65536, simply surrendering!


Well, if 1/65536 works ... It must be terribly unpleasant :)


Collapse: the very "interaction with the measuring device"


In quantum chess, arbitrary superpositions of figures are allowed. Moreover, creating superpositions is not just fun: being a novice in ordinary chess and playing against a grandmaster, you can greatly smooth out his advantage in front of you by introducing the board into complex superpositions!


However, there are superpositions that are considered too crazy. Such superpositions cannot exist; as soon as they appear, the quantum chess engine starts the mechanism of destruction of such superpositions, or the very "interaction with the measuring device".


The criterion is simple: there cannot be superpositions in which the same cell is occupied by two or more figures at the same time. Agree, it would be too confusing and difficult, if you could have a knight and an enemy rook on the same cage at the same time?


Superposition of figures vs superposition of boards


Special attention should be paid to the process of destruction of superpositions. We are any superposition (for the sake of them the game was created), so during the collapse we want to keep as many superpositions as possible. For example, consider the following situation:


image


What happens when the blue pawn takes the red knight e4: f5 ?


One of the common logical errors that can be made in quantum mechanics is not a sufficiently general understanding of superpositions. If, for example, to argue from the point of view of individual pieces - they say, this is a pawn, it is in superposition - then it is very easy to lead yourself into a dead end.


To prevent this from happening, the surest way is to remember that in the superpositions there is always the whole system , i.e. in our case - a chessboard. It is not surprising that the quantum chess engine works by this principle. Consider the situation above in the engine view:


image


It is seen that the engine is a superposition in the above form: as a set of boards. In this case, the 4 boards shown above are possible, since the red knight and the blue pawn could either make a move or not. The quantum chessboard is in a superposition of four ordinary boards.


This representation is more accurate, and provides the user with complete information about the quantum state of the chessboard. Unlike the presentation in the interface, which shows only the probabilities of all the figures. As planned, the player must himself keep in mind the quantum state on the basis of previous moves. The ability to think in terms of quantum mechanics in this way is a powerful trump card in the hands of a player in quantum chess.


Min collapse


On the superposition of the boards it is clearly seen that after the move e4: f5 :


  1. On the first board: a pawn will not be able to descend diagonally, since she has nothing to eat. Nothing will change, on cell f5 is empty.
  2. On the second board: a pawn will be able to eat a knight. There is a pawn on cage f5 .
  3. On the third board: the pawns are simply not on e4 . The move does not pass, the cell f5 is empty.
  4. On the fourth board: the pawn is not on e4 again. The move does not pass, the knight remains on the f5 cage.

After applying the move, there is a conflict between the knight and the pawn per cell f5 . On the second board there is now a pawn, and on the fourth - the knight.


As we have already discussed, we want to resolve this conflict, while destroying as few superpositions as possible. Therefore:



The first option: the horse survived


The second board is discarded, and the game continues on the superposition of boards with numbers 1, 3, 4:


image


Note that the posterior probability of a pawn has been redistributed! Now with a 2/3 probability, the pawn is on e2 (boards 3 and 4), and with a probability of 1/3 - on e4 (board 1).


It is right! A priori, the pawn was on e2 with a probability of 50%, but this probability changed after the generation of a random number . A posteriori probability became 66.7%.


The same is true for the knight (the reader can count the boards and make sure that the probability of finding the knight on f5 has changed from 50% to 33.3%).


This is how the result looks in the interface:


image


Second option: ate horse


The fourth board is discarded, and the game continues on the superposition of boards with numbers 1, 2, 3:


image


In this case, the horse is now in a superposition of the living and the dead, like Schrödinger's cat. A pawn with a probability of 33.3% is spread over the positions e2 , e4 , f5 . This is how the result looks in the interface:


image


Quantum confusion


One of the most famous and exciting phenomena in the quantum world is quantum entanglement. It was first considered by Einstein in a thought experiment called the EPR paradox :


Consider a particle-antiparticle pair formed during the decay of a heavier stationary (ie, resting) particle, for example, a meson. Einstein argued that, according to the law of conservation of momentum, the momenta of a particle and an antiparticle are related by the law of conservation of momentum; therefore, by measuring the coordinate of the particle and the momentum of the antiparticle, it is possible to calculate the particle impulse using this law, which means to measure simultaneously the particle impulses and the antiparticle, i.e. violate the principle of uncertainty Heisenberg. Does this mean that "a quantum-mechanical description of reality is not complete" ©?


Bohr proposed the resolution of this paradox: after measuring the particle impulse, the antiparticle impulse instantly changes its value , which means its coordinate is undefined. Similarly, after measuring the coordinates of the antiparticle, the coordinate of the particle instantaneously changes its value , which means that the momentum is undefined.


What is the nature of this "nightmarish long-range action"?


It is now reliably known that Bohr's explanation is correct. It turns out to be much more logical and understandable if we translate it into the correct language: we must make statements about the superposition of the particle + antiparticle system , and not about the superposition of its individual components.


Consider this situation with a much more illustrative example: a quantum chessboard.


Entanglement in quantum chess


Quantum chessboard allows you to experience the concept of chess intricacy. In order to translate the board into a state of chess entanglement, you need ... to pass one piece through another. Consider an example:


image


The blue go the queen (queen) d1: f3 . This is a normal, non-quantum move! But it is not possible on all boards of superposition. Let's see how the situation looks in the representation of the quantum chess engine:


image


The move is possible on boards 1 and 3, i.e. on two boards of four. Therefore, in this case, the usual nonquantum move will introduce the blue queen into a superposition:


image


However, there is something not immediately noticeable. Refer to the engine view:


image


Confirmation: the queen is spread over d1 and f3 positions with 50% probabilities; the pawn is spread over the e2 and e4 positions with a 50% probability, but a very important property is fulfilled: if the pawn is on e2 , then the queen is on d1 ; if the pawn is on e4 , then the queen is on f3 .


That is, the positions of the queen and the pawn are interconnected, similar to the particle and antiparticle impulses in the EPR paradox. The pawn and the queen are quantum entangled!


What does this mean and how can it be used in the game


Suppose the reds are played with the f6: e4 knight. After resolving the conflict for cell e4, we assume that the horse has won. In this case, the engine exhaust looks like this:


image


An interesting observation is that the redistribution of probabilities of the pawn (66.7% at e2 and 33.3% eaten) instantly influenced the probability of the queen.


This is how it looks in the interface after the move:


image


We finally realized the nature of that same “nightmarish long-range action” from the EPR paradox. There is no long-range action; simply the system itself (in our case, the chessboard) is in such a superposition, in which only variants with a certain correlation of two pieces are allowed. It is wrong to say that the measurement of the position of the pawn affects the position of the queen. It is more correct to say that in the superposition there are only such variants (chess boards), on which the coordinates of the queen and the pawn are related by this relation.


It turns out that quantum entanglement is a quite ordinary effect, which is explained by ordinary superposition; but only if we do not forget that we are talking about the superposition of the entire system as a whole , i.e. in our case, a chessboard, not a regular piece.


For the strategy of the game, this means that you should follow the moves and watch when the pieces are in a state of entanglement. From the interface it is not obvious that the figures are confused. In order to understand this, you need to know the history of moves. Such information is very important, since allows you to soberly assess probabilities when reasoning over subsequent moves.


For example, the probability that a pawn on e4 and a queen on f3 will be able to participate together in an offensive is not 25%, as it may seem, but 50%, because the pawn is tangled with the queen.


Conclusion


Well that's all. I hope I managed to visually describe the principles of quantum mechanics and show them on such a successful example as a quantum chessboard.


The success of the example is due to two properties:


  1. Chess board - a subject familiar to almost everyone since childhood
  2. Surprisingly, most quantum-mechanical phenomena exist on a quantum board.

Lastly, I want to say that the engine has been thoroughly tested; and even though there are possible bugs in it, where it’s more likely that he calculated everything correctly. If it seems that the engine is wrong, then it is always possible to write on a piece of paper the quantum superposition of the boards in the engine's representation and recalculate the probabilities after the conflict has been resolved per cell.


Waiting for your comments!


')

Source: https://habr.com/ru/post/402355/


All Articles