Game State Identification in Chess using Quantum Computing
Blog post: [link]
Play the game: [link]
​
My Contributions:
-
Hard-coded all possible chess moves (Python)
-
Contributed to developing theory for quantum circuit
-
Built, trained, and tested classical ML model (Python)
-
Trained and tested quantum ML model (Python)
-
Built front-facing game interface (Python)
For the annual MIT quantum computing hackathon (iQuHACK), we develop a classical and quantum game-state advantage identification game for users. In this game, a player is presented with a series of randomized chess boards which must be classified as either the black opponent or white opponent having the next-turn advantage. The player competes head-to-head with two trained machine learning algorithms: (1) a classical nearest centroid classifier and (2) a quantum nearest centroid classifier.
Classical ML decision boundary
Quantum ML decision boundary
Centroid classification is a supervised learning method where the Euclidean distances between points in a training data set are computed to map a point roughly in the center of similarly distanced data points of like labels. A decision boundary is computed that best separates these centroids and then training data can be introduced to the model to test the classification accuracy. We reduce the current state of our chessboard to two feature vectors: white win and black win. The quantum nearest centroid algorithm utilizes the IonQ QPU hardware to compute the Euclidean distances rather than computing them classically. Computing the Euclidean distances inner product with a quantum circuit results in compute time speedups from O(n) to O(log(n)). The quantum classification algorithm has an overall test accuracy of 78.0% and the classical classification algorithm has an overall test accuracy of 86.0%.