Quantomoku is an educational quantum game aimed at children. The game is inspired by the traditional Connect 5 game: two players alternate putting pieces on a board, and the first one to line up 5 pieces wins. However, there is a twist: in addition to the normal Connect 5 moves, players can play two new quantum moves: superpositions and entanglements!
Moreover, the game is truly quantum: as the players play, a quantum circuit is built in the backend. Hence, quantum computers can be used to decide the result of the game.
Javascript dependencies are managed by npm
. To install them, run on the root directory:
cd client && npm install
Python dependencies are managed by pip
. To install them, run on the root directory:
pip3 install -r requirements.txt
By default, the game runs the quantum circuits locally in a simulator. If you wish to run them on the quantum cloud on a real quantum computer, create an environment variable called IBM_Q
set to your IBM Q API Token. Then, run:
python3 setup_ibmq.py
Notice that depending on the queue on the quantum cloud, this might make the game have delays that will affect gameplay.
For the game to work, both the server and the client need to be running on the same time. You may launch both together by running:
python3 server.py & cd client && npm run serve
After executing the command, the game will be now running. You can access it by going into a web browser and visiting https://localhost:8080
.
To discover more about the mechanics of the game, there is an in game tutorial: just click on the Tutorial button on the main page. Quat, the Quantum Cat will explain how the game works for you.