An application that tent to let you play Chess against an AI opponent.
The moves are encrypted and then thanks to FHE (full homomorphic encryption), the AI infers on data that it cannot see.
FHE.Chess project answers to Zama.ai‘s bounty and shows how to use Zama’s Concrete-ML open-source library.
Creation of a machine-learning-based version of a Chess player which can be executed in FHE, i.e., where the AI does not see the unencrypted moves.
On the player (client) side, the board would be in clear; then, when it’s the AI’s turn, the app encrypts the board and sends it to the server, which then runs the machine-learning model inference over encrypted data, to predict a new (encrypted) move to apply.
Finally, the app decrypts this move and applies it on the board, and reiterate the process until the game is over.
3 possible modes: “clear”, “simfhe” (aka simulation), “deepfhe” (aka real).
Results: the current model in “deepfhe” mode has an inference time that follows the VGG’s one (18000 sec): see the benchmark made by Zama’s machine learning team >>> Deep NN for Encrypted Inference with TFHE.
Developments made with Python, Concrete-ML from Zama, PyTorch, PyGame, Python-Chess. Computation made on Google Cloud.