The Neural Network That Decides Whether a Number Is Numberwang
Translated by a model; the original is in Russian.
Some projects have practical value that verges on zero, yet an execution that commands respect. Such is Numberwang — a small neural network that sets out to answer a question familiar to fans of the British sketch show That Mitchell and Webb Look: is a given number “Numberwang”?
The game of Numberwang itself is a send-up of TV quiz shows, in which a straight-faced host declares random numbers to be “Numberwang” while the viewer is left to pretend they understand the rules. The project's author has treated this nonsense with the full seriousness of an engineer.
What's inside
The entire model is a 1.8 MB JSON file, and the inference code fits into roughly a hundred lines of pure Python from the standard library: no PyTorch, no NumPy, nothing to install. Just clone the repository and run it. The network holds 80,804 parameters and reads characters directly — no tokenizer, no normalizer, no rulebook of any kind. Everything — digits, operators, the canonical verdicts and eleven languages — is baked into the weights.
There are exactly four verdicts: “That's Numberwang!”, “That's not Numberwang”, “That's not even a number, it can never become Numberwang” and the cryptic “That's Wangernumb! Rotate the board!”. The last one is handed out to anything equal to one or forty-four.
What the network has learned
It accepts a surprising amount: digits and words, negative numbers, fractions, currencies, percentages, times, Roman numerals, ordinals and arithmetic expressions (the verdict is passed on the result). Numbers are recognized in eleven languages and, as the author wittily notes, “Wangness” is a property of the number itself, not of the language: four, vier, quatre and cuatro all receive the same sentence. Made-up numbers like shinty-six, meanwhile, are also counted as numbers by the network — in the finest tradition of the show.
Accuracy is claimed at 88.9% on 486 held-out examples against a ceiling of around 98%. The missing percentage points the author explains with a straight face: about 2% of the training labels are deliberately inverted “in keeping with the long-standing practice of Numberwang adjudication.” The weak spot is arithmetic over unfamiliar operands: the network memorizes more than it computes, so it handles 5*2 with confidence, while 904 * 3 is already an “educated guess.”
The project is distributed under the MIT license. The description states honestly that no warranties are provided as to whether any given number is Numberwang. There's also an online demo on Hugging Face Spaces.
Source: Hacker News
Comments
Sign in, to comment.