Can a computer learn to read your numbers?

A game in five short stages. Beat the computer at reading handwriting.

· · Updated 2026-11-04 · 2 min read · code & data · ✓ Delta-reproducible

AIhandwritinglearning from examplesfor young readers

#The question

Can a computer learn to read handwritten digits just by looking at examples? Play to find out, and see if you can beat it. Your progress is kept on this device.

The handwriting game, in five stages. The pictures, labels and scores come from our Delta run.

#Specs: system & compute

Deploymentdomestic
ImagePyTorch CUDA13 (GPU)
CPU2
Memory8Gi
GPU1 × GPU (8000 MiB each)
Run time1 min 26 s
Run IDeee905f2426a49f890b5fea94906e78b
Date2026-11-01
Packages
50 packages

anyio==4.16.0, click==8.5.0, contourpy==1.3.2, cycler==0.12.1, exceptiongroup==1.3.1, filelock==3.29.0, fonttools==4.65.0, fsspec==2026.4.0, h11==0.16.0, hf-xet==1.8.0, httpcore2==2.14.0, httpx2==2.14.0, huggingface_hub==2.4.0, idna==3.20, Jinja2==3.1.6, kiwisolver==1.5.1, MarkupSafe==3.0.3, matplotlib==3.10.9, mpmath==1.3.0, networkx==3.4.2, numpy==2.2.6, nvidia-cublas-cu12==12.1.3.1, nvidia-cuda-cupti-cu12==12.1.105, nvidia-cuda-nvrtc-cu12==12.1.105, nvidia-cuda-runtime-cu12==12.1.105, nvidia-cudnn-cu12==9.1.0.70, nvidia-cufft-cu12==11.0.2.54, nvidia-curand-cu12==10.3.2.106, nvidia-cusolver-cu12==11.4.5.107, nvidia-cusparse-cu12==12.1.0.106, nvidia-nccl-cu12==2.21.5, nvidia-nvjitlink-cu12==12.9.86, nvidia-nvtx-cu12==12.1.105, packaging==26.3, pillow==12.2.0, pyarrow==25.0.1, pyparsing==3.3.3, python-dateutil==3.0.0, PyYAML==6.0.3, six==1.17.0, sympy==1.13.1, tomli==2.5.0, torch==2.5.1+cu121, torchaudio==2.5.1+cu121, torchvision==0.20.1+cu121, tqdm==4.70.1, triton==3.1.0, truststore==0.10.5, typing_extensions==4.16.0, tzdata==2026.6

Recorded from the actual Delta run, not typed by hand.

#What we did

A neural network learned from 60000 labelled pictures of digits from a collection called MNIST, in 5 practice rounds. We tested it on 10000 separate pictures it never practised on, and repeated all of this 3 times from different random starts.

        for start in range(0, len(order), BATCH_SIZE):
            batch = order[start:start + BATCH_SIZE]
            loss = F.cross_entropy(model(train_x[batch]), train_y[batch])
            optimizer.zero_grad()
            loss.backward()
            optimizer.step()

#Results

After practice, the networks read an average of 98.76% correctly: about 124 mistakes in 10000 pictures.

A chart showing the percentage of correct test answers after each practice round for the 3 tries.
Scores after each practice round. Watch the scale: it starts at 97%, which makes small changes look large.
A grid comparing the real digit in each row with the network's answer in each column. Darker squares show more frequent mistakes.
Read a row for the real digit and a column for the network's answer. Darker means that mix-up happened more often, added across all 3 tries.
The digit really was The network said Times across all 3 tries
5 3 23
2 1 20
9 4 17
4 9 16
9 7 16
2 7 14

#What this does and doesn't show

  • Only tidy, single digits. The pictures were centred and one size. We did not test envelopes, words or whole pages.
  • One design. We tried this network from 3 starting points, not lots of designs.
  • Counts, not causes. We can see which mix-ups happened, but not prove why, and we can't tell why two scores dipped in the last round.
  • Reading isn't understanding. Matching a picture to a label says nothing about counting or adding.

Code & data

Everything needed to check the numbers above. Click a file to read it here, with line numbers.

#Author verification

✓ Signed by @seawan on

I played all five stages and read the whole post to make sure a child can follow it. I checked that the main numbers match the results file from the Delta run, and that the post has the Delta-reproducible badge and run record.

Written by the author, not generated. The build only checks that it is present.

References

  1. Y. Lecun, L. Bottou, Y. Bengio and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. doi:10.1109/5.726791 ✓ verified (Crossref)
  2. Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. 2014. arXiv:1412.6980 ✓ verified (arXiv)

Every reference above was checked by an automated script against arXiv, Crossref or Semantic Scholar (title, authors, year), and the cited claim was compared against the paper's abstract.

#Reproduce

✓ Delta-reproducible

npx -y github:seawan/vibe-research#0fae223b2dded3030a8738c721afc659672ee84f seawan/teach-a-computer-to-read-digits

Pinned to the commit that last changed this post. Rerun spec: delta.yaml. Resources: 2 CPU · 8Gi memory · GPU: 1 × GPU (8000 MiB each) · up to 60 min · domestic.

Need Delta? Register for delta-cli first.

This is a “vibe research” report: the experiments and the write-up were produced with help from an AI assistant and checked by the author. Numbers come from the linked code and data; references were machine-verified.