XanaduAI / QHack2021

Official repo for QHack—the quantum machine learning hackathon
https://qhack.ai
121 stars 94 forks source link

[ENTRY] Quantum Chess Engine #47

Open letbitbe opened 3 years ago

letbitbe commented 3 years ago

Team Name:

let bit be

Project Description:

The main goals of this project are the visualization of the main principles of the quantum computer as well as to demonstrate its performance. To show this, we apply our quantum algorithms to one of the most famous board games of all time, namely chess. We construct a variational algorithm to classify the best possible moves in a game of Microchess.

Microchess features a 5x4 board on which 5 of the 6 different chess pieces are placed (there are still trillions of possible constellations). Thus, it makes it perfectly suitable for a quantum computer as it can be implemented using only 21 qubits (20 + 1 ancillary qubit). The piece of each square is encoded into a single qubit showing its remarkable capability of representing much more than the classical bit could do. We then construct a variational quantum algorithm (VQA) to operate on these qubits to classify the board's score. The score is determined by the mobility (how many moves are possible) and material (how many pieces are there) of each player. The output of the circuit is received through a single measurement collapsing all the information of the circuit into a single classical bit. Repeating this measurement gives a good estimate of the board's value. To learn how to quantify the given board, we train the VQA using a special combination of gradient descent and reinforcement learning.

Presentation:

Medium article: Asking a Quantum Computer To Learn Chess

Source code:

QuantumChessEngine

co9olguy commented 3 years ago

Thanks for the submission! We hope you have enjoyed participating in QHack :smiley:

We will be assessing the entries and contacting the winners separately. Winners will be publicly announced sometime in the next month.

We will also be freezing the GitHub repo as we sort through the submitted projects, so you will not be able to update this submission.