Game
Quantum Battleship
Author: Nara Avila | Published 11 Apr 2025
Game and research experiment

Quantum Battleship

A familiar game becomes a way to investigate randomness. You choose coordinates to find the opponent's fleet; the computer uses measurement-derived choices to attack yours. Finish a battle, inspect its record and compare the distributions behind those choices.

The screenshots below show the English interface. Portuguese and Chinese are also available through the language selector. The gameplay, completed record and charts use a local demonstration with synthetic data, not a live hardware execution.

Why put quantum randomness inside a game?

The project connects quantum computing, a playable interface and empirical data analysis. Instead of looking at isolated bit strings, players see random choices become coordinates, hits and misses. Each completed match supplies observations that can be examined individually or combined with other matches associated with the same hardware.

Measurement outcomes are mapped to positions on a board. The circuit panel makes that connection visible, while an optional classical search component helps the computer follow up on hits. This separates the source of an attack from the strategy used to find a ship.

01

Configure the battle

Select a computer from the hardware carousel, then choose a 4 × 4, 8 × 8 or 16 × 16 board and the number of ships. The fleet options depend on board size. Use PT, EN or ZH in the header to change the interface language.

The AWS Braket price field is an estimate for the selected hardware, not a bill for playing with cached or synthetic data.

Quantum Battleship hardware carousel, board size, fleet and estimated price controls
Select the hardware association and configure the board, fleet and difficulty before starting.
02

Enter your name and confirm participation

Choose Start match (Iniciar partida). Enter your player name in the participation dialog and read the explanation of the experiment. Choose Play (Jogar) to continue. The demonstration described here uses synthetic data, as explained above.

The page moves to the game area while the request is being processed. Follow the status indicator: the game starts only when the backend confirms the session. If the service reports an error or an unavailable configuration, review that message before trying again.

Participation dialog with a demonstration player name and experiment explanation
Enter a player name and confirm participation before the match begins.
03

Attack by coordinates

The player board shows your fleet and the computer's attacks. The opponent board records your attempts, while the fleet panels track ship status. The turn highlight identifies which side is acting.

With hard mode enabled, watch the classical chip panel as well as the quantum circuit: it identifies when the opponent is using the follow-up search. Both kinds of attack count toward the battle result, but classical search attacks are excluded from the quantum-randomness charts so that strategy is not mistaken for random sampling.

When it is your turn, enter a coordinate such as A3 and choose Attack. The letter identifies the row and the number the column. Wait for the result and the opponent's response; the game determines when you may attack again. Continue until one fleet is sunk, or use End match to leave the session.

Demonstration game with circuit, player turn highlight, coordinate input and two boards
Synthetic demonstration: the circuit, turn indicator and boards connect each move to its source and result.
04

Keep the match record

A completed battle opens a Match record with the outcome, player name, hardware association, data source, duration and score. It also presents both sides' move statistics, final boards, the circuit and the available measurement analysis.

Choose Download PNG certificate for a visual record or Download JSON data for the structured result. The certificate documents the match; it is not a certificate of quantum randomness. Use New match to return to play. The header's Leaderboard opens the player ranking.

Demonstration match record with outcome, score, statistics, final boards and download controls
Illustrative completed record with synthetic data; PNG and JSON downloads preserve the match information.
05

Compare the observed distributions

Open Analytics in the game header. Select a Computer and a Board size, or combine all board sizes. The page aggregates archived quantum-source attacks and excludes classical search attacks. Expand the source matches to inspect which records contribute to the sample.

For a single board size, inspect Hamming weight, the frequency of bit 1, entropy per qubit and observed cell frequencies. The combined view uses normalized positions and size-aware baselines so that different board sizes can be compared. The summary reports sample counts and empirical entropy, including empirical min-entropy.

Demonstration analytics with board filters, empirical metrics, four charts and a source match
Illustrative analysis of 319 synthetic samples; these charts are not measurements from a physical processor.

From a move to a reusable observation

The browser sends game actions to an HTTP API backed by AWS Lambda. DynamoDB stores active sessions; S3 stores reusable measurement caches, completed match records and player summaries. The analytics endpoint reads archived observations, while the frontend renders the game, ranking and statistical views.

This structure keeps the educational interaction and the data trail connected: a move belongs to a match, a match identifies its configuration and source, and the resulting observations can be revisited in the analysis.

This page was last updated at 2026-11-03 16:10.