Educational game · How AI sees images

Lightprint

Mystery samples are piling up in the lab. Identify each one by its light: pick elements whose bright lines add up to the sample's spectrum. Along the way you practice the first thing an image-recognition AI does, scanning a row of numbers for simple features.

Ages 11 and upAbout 10 minutesFree, no accountPhone, tablet or computer
Lightprint

Almost ready

The spectrometer is still warming up

The game is being installed and will appear here shortly. In the meantime, the guide below explains everything the game teaches.

Read the guide ↓
Open in a new tab ↗

Twelve samples in three chapters: City Lights, Fireworks Night and Into Space. Read straight down from the sample to your own lines, then press Check sample. A right answer on the first check earns 3 stars; each extra check or hint costs one. Sound starts off; turn it on with the speaker button and the game remembers your choice. Progress and stars save on your device. Can't use the game? The guide below explains the same ideas, and the cheat sheet prints on one page.

The guide · 4-minute read

A spectrum is a one-row picture

Every element glows at its own set of colors. Heat sodium and you get a bright orange-yellow glow; neon gives a cluster of reds. In Lightprint, a sample's light is spread across a strip from violet to red, and you work out which elements made it by finding bars whose lines land in exactly the right spots.

Look at that strip the way a computer would. It is split into 64 spots, and each spot has a brightness value: dark or lit. That makes a spectrum a picture just one pixel tall. A photo works the same way, only with many rows: every pixel is a number for how bright it is.

In the game

Part of the Laser Tube sample, written as numbers.

Spot  12 13 14 ... 41
Lit?   0  1  0 ...  1

What you did: scanned the row for lit spots and checked where each one sits.

In a real AI

A small color photo that an image-recognition AI might take in.

224 × 224 pixels × 3 colors
= 150,528 numbers

What it does first: scans those numbers for simple features, like lines and edges, and notes where they sit.

To a computer, an image is never a "picture." It is a grid of numbers. Everything an AI concludes about a photo starts from those numbers.

Under the hood

You practiced the first step

Image-recognition AI works in stages. Lightprint models only the first one. Here is where it fits:

1 · Numbers

The image arrives as a grid of brightness values.

2 · Simple features

Lines and edges, and where they are. This is the step you played.

3 · Shapes and parts

Later layers build features into curves, corners and parts of objects.

4 · Likelihoods

A score for each possible answer, like 87% sodium.

What the game doesn't show: steps 3 and 4, and the fact that a real AI learns which features to look for instead of being told. The next section covers all three.

When researchers looked inside trained image networks, they found that the earliest layers had learned to respond to simple patterns such as edges and lines at particular positions and angles, the same kind of feature you hunted for on the spectrum (Zeiler and Fergus, 2014).

Want to see the numbers underneath? How does a picture become numbers? lets you pick any pixel, color channel and picture in a tiny batch.

Side by side

How real AI goes further

The game is a fair model of the first step and nothing more. Real image-recognition AI goes beyond it in three ways. Each one makes a good class discussion question.

1 · It learns what to look for

Lightprint: each element's lines are
listed for you.
Real AI: learns its own features from
thousands or millions of labeled
examples.

Discuss: if nobody tells the AI which lines matter, how could it figure that out from examples? What if the examples were wrong?

2 · It stacks many layers

Lightprint: one step, find the lines.
Real AI: lines → shapes → parts →
objects, each layer built on the
one before.

Discuss: how could simple lines be combined into the shape of a cat's ear, then a whole cat?

3 · It gives likelihoods

Lightprint: right or wrong. All lines
covered and no extras, or no solve.
Real AI: sodium 87% · calcium 9% ·
other 4%

Discuss: why is a likelihood more useful than a yes-or-no answer when the data is messy?

One thing the game is not

In Lightprint every element's bar counts equally, and their lines add up on one strip called Your lines. AI layers are different: they are stacked in order, and each layer works on the output of the layer below it. Adding up bars is a model of adding up evidence, not a model of layers.

Real science

Scientists really do read light with AI

Spectroscopy is how astronomers learn what stars are made of without ever visiting them. The game's final sample is a nod to one of its most famous early wins: in 1868, astronomers studying the Sun's light during an eclipse spotted a yellow line that matched no known element. It turned out to be helium, found in the Sun decades before anyone found it on Earth. Helium's yellow line sits only about 1.5 nm from sodium's, so in the game the two land on the same spot. The spectroscopes of 1868 could tell them apart, and that tiny gap is what gave helium away.

Today, telescopes and lab instruments collect far more spectra than people could ever read by hand, so scientists train AI to help. One example, a method called The Cannon, learned from 542 stars whose properties were already known, then estimated the temperature, surface gravity and metal content of about 56,000 more stars from their spectra (Ness and colleagues, 2015). Unlike the game, it doesn't hunt for exact matches. It learns patterns from examples and reports its best estimates.

Lightprint teaches you to look the way a computer looks: a row of numbers, scanned for features at specific positions. That is only the first step in image recognition.

#arqiv-page .gx-mars-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:28px 0} #arqiv-page .gx-mars-fig{margin:0;border:1px solid var(--line);border-radius:14px;background:var(--panel);overflow:hidden} #arqiv-page .gx-mars-fig img{display:block;width:100%;height:auto} #arqiv-page .gx-mars-grid .gx-mars-fig img{aspect-ratio:1/1;object-fit:cover} #arqiv-page .gx-mars-fig figcaption{padding:12px 14px 14px;font-size:14px;line-height:1.55;color:var(--muted)} #arqiv-page .gx-mars-fig figcaption b{display:block;color:var(--ink);font-size:15px;margin-bottom:3px} #arqiv-page .gx-mars-fig .gx-credit{display:block;margin-top:8px;font-size:12px;opacity:.75} #arqiv-page .gx-mars-how{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:22px;align-items:start;margin:20px 0 26px} #arqiv-page .gx-mars-how ol{margin:0;padding-left:20px;color:var(--muted);font-size:16px;line-height:1.65} #arqiv-page .gx-mars-how li+li{margin-top:12px} #arqiv-page .gx-mars-how li b{color:var(--ink)} #arqiv-page .gx-mars-wide{margin:26px 0} #arqiv-page .gx-mars-wide img{background:#fff} @media (max-width:640px){#arqiv-page .gx-mars-grid,#arqiv-page .gx-mars-how{grid-template-columns:1fr}}

Real world

On Mars, rovers read light for real

NASA's Curiosity rover (on Mars since 2012) and Perseverance rover (since 2021) each carry a laser at the top of their mast. On Curiosity it is part of an instrument called ChemCam. Perseverance carries an upgraded version called SuperCam. Both can zap a rock up to about 7 meters (23 feet) away and read the light that comes back.

NASA Curiosity rover on Mars, photographed by its own arm camera, with its tall mast and reddish sand around it
CuriositySelf-portrait at Rocknest in Gale Crater, 2012. The box on top of the mast holds ChemCam.Credit: NASA/JPL-Caltech/Malin Space Science Systems (PIA16239)
Top of the Curiosity rover mast in a clean room; the round ChemCam laser and telescope lens sits in a white box above two camera lenses
ChemCamThe round lens in the white box is ChemCam's laser and telescope, photographed before launch.Credit: NASA/JPL-Caltech (PIA13809)
NASA Perseverance rover on Mars taking a selfie, with the small Ingenuity helicopter on the ground nearby
PerseveranceSelfie with the Ingenuity helicopter, 2021. SuperCam sits in the head of the mast.Credit: NASA/JPL-Caltech/MSSS (PIA24542)
The SuperCam instrument head before installation, with a gold electronics box and a round telescope window
SuperCamThe mast unit before it was mounted on Perseverance. It even has a microphone that records the snap of each laser zap.Credit: NASA/JPL-Caltech (PIA24208)

How a laser reads a rock

Composite image of the rock Coronation, with close-up insets showing the tiny spot ChemCam hit with its laser
The first rock zapped on Mars"Coronation" took 30 laser pulses in 10 seconds, August 2012.Credit: NASA/JPL-Caltech/LANL/CNES/IRAP (PIA16075)
  1. Zap. A laser pulse hits a spot less than a millimeter wide. It heats a speck of rock so fast that it turns into a tiny glowing spark called plasma.
  2. Catch the light. A telescope on the mast collects the spark's light.
  3. Spread it out. Spectrometers spread that light into a spectrum, the same kind of strip you read in Lightprint. Every element in the spark adds its own bright lines.

Scientists call this laser-induced breakdown spectroscopy, or LIBS. It is Lightprint's puzzle, solved on another planet. The game's Mars Soil sample is a simplified version of exactly this.

Graph of ChemCam's first laser spectrum from Mars: brightness versus wavelength, with sharp peaks labeled iron, magnesium, calcium, sodium, oxygen and other elements
ChemCam's first spectrum from MarsEach spike is an element's emission line. Brightness runs up the side and wavelength runs along the bottom.Credit: NASA/JPL-Caltech/LANL/CNES/IRAP (PIA16089)

This is the spectrum ChemCam sent back from Coronation. Look for calcium's two violet lines near 393 and 397 nm and sodium's yellow line near 589 nm: the same lines you matched in the game. ChemCam's strip is much longer, though. It runs from ultraviolet into near-infrared and is split into 6,144 spots instead of 64.

Where AI comes in: the lines show which elements are in a rock, but not how much of each. So on Earth, the SuperCam team zapped 334 rocks and minerals whose makeup was already known and trained machine-learning models on those examples. The models now estimate how much silicon, iron, magnesium and other elements each Mars rock holds (Anderson and colleagues, 2022). It is the same learn-from-labeled-examples idea as The Cannon.

Keep this handy

Your light and pixels cheat sheet

Six words that connect the game to how image-recognition AI starts, each with an example from Lightprint.

SSpectrumLight spread out by color, from violet to red.The rainbow strip at the top of each puzzle.
EEmission lineA bright color an element gives off. Each element has its own set.Sodium's bright orange-yellow line at spot 41.
PPixelOne spot in an image, stored as a number for its brightness (color images use three: red, green and blue).One of the strip's 64 spots: dark or lit.
FFeatureA simple pattern an AI detects first, like a line or an edge."There's a lit line at spot 41."
LLayerOne stage of an AI. Each layer builds on the one below it.Not in the game: it only models the first, feature-finding stage.
%LikelihoodHow confident an AI is in each possible answer, given as a probability.A real AI might say "87% sodium" instead of a yes-or-no match.

For teachers

Using the game in class (about 40 minutes)

This game models the first step of how image-recognition AI works. Computers see images as grids of numbers, and the earliest layers of a vision AI detect simple features like lines and edges at specific positions, similar to how players scan the spectrum for lines. Real AI goes further in three ways: it learns which features to look for from thousands or millions of examples instead of being told; it passes those features through many more layers that build them into shapes and, eventually, objects; and it produces a likelihood ("87% sodium") rather than a yes-or-no match. Scientists do use AI to analyze real spectra from lab instruments, telescopes and even Mars rovers.

  1. Play in pairs (10 min). One student changes the elements. The other reads straight down from the sample and says whether the lines match, before anyone presses Check sample. A right answer on the first check earns 3 stars, and each extra check or hint costs one, so guessing shows. Switch at each chapter. The first solve in each chapter shows a short note linking the puzzle to AI; have students read it aloud.
  2. Be the computer (10 min). Draw a row of 16 boxes on the board and shade a few. Students write the row as 0s and 1s, then describe its "features" only by position, for example "lit at 3 and 9." Ask: is that all the computer knows?
  3. Three ways real AI goes further (15 min). Use the three discussion questions in How real AI goes further: learning features from examples, stacking layers, and giving likelihoods.
  4. Wrap up (5 min). Ask: the game says "right" or "wrong." Why would a real AI say "87% sodium" instead, and when would that matter?

Careful wording

  • Say "the first step of how image AI works," not "this is how AI works." The game covers one stage only.
  • Don't compare overlaying the bars to AI layers. In the puzzle, the bars sit in rows that all count equally, and their lines add up. AI layers are stacked in a hierarchy, each working on the one below. This is the misconception to steer around.
  • Say "the AI scores how likely each answer is," not "the AI matches the picture to the answer." Real AI doesn't check for an exact match.

What the game simplifies

Line positions are real visible-light wavelengths placed on a 64-spot strip from 380 to 700 nm (about 5 nm per spot), so a line can sit a few nanometers from its true position. Each element shows only a few of its strongest lines (iron has thousands). Lines closer together than one spot merge: sodium's famous pair of yellow lines (589.0 and 589.6 nm) shows as a single bar at spot 41, and sodium's other bar is a weaker yellow-green line near 568 nm. Helium and neon also have a line on spot 41. Firework colors mostly come from molecules that form in the flame, such as strontium and copper compounds, not from single atoms. That is why strontium's bars in the game are violet and blue even though strontium makes fireworks red. "Faint" lines are a game mechanic, not real brightness. Each line is drawn in roughly the color of its wavelength; a screen can only come close. Stars and the Sun really show dark absorption lines, and the game draws every line bright. The meteorite and Mars soil samples list a few key elements, not their full makeup.

The cheat sheet above prints on one page. For more classroom resources, visit ARQIV for teachers.

Credits

Game by ARQIV. Puzzle idea inspired by lab minigames in video games; original design. Sounds are generated in your browser. Mars rover photos and the ChemCam spectrum are courtesy NASA/JPL-Caltech and partners; full credits are in each caption. Built with open-source software: third-party notices and licenses.

Sources

  1. Zeiler, M. D. and Fergus, R., "Visualizing and Understanding Convolutional Networks," ECCV (2014). arxiv.org/abs/1311.2901
  2. Ness, M., Hogg, D. W., Rix, H.-W., Ho, A. Y. Q. and Zasowski, G., "The Cannon: A data-driven approach to stellar label determination," The Astrophysical Journal (2015). arxiv.org/abs/1501.07604
  3. Science Museum, "150 years since the discovery of helium." blog.sciencemuseum.org.uk
  4. NIST, Atomic Spectra Database (element line wavelengths). nist.gov
  5. Wiens, R. C. and colleagues, "The ChemCam Instrument Suite on the Mars Science Laboratory (MSL) Rover: Body Unit and Combined System Tests," Space Science Reviews (2012). doi.org/10.1007/s11214-012-9902-4
  6. Maurice, S. and colleagues, "The SuperCam Instrument Suite on the Mars 2020 Rover: Science Objectives and Mast-Unit Description," Space Science Reviews (2021). doi.org/10.1007/s11214-021-00807-w
  7. Anderson, R. B. and colleagues, "Post-landing major element quantification using SuperCam laser induced breakdown spectroscopy," Spectrochimica Acta Part B (2022). doi.org/10.1016/j.sab.2021.106347
  8. NASA/JPL-Caltech, Photojournal images PIA13809, PIA16075, PIA16089, PIA16239, PIA24208 and PIA24542. science.nasa.gov/photojournal