Gallery of Babel · the math
What are the odds of finding a real picture in the Gallery of Babel?
Practically zero. The gallery holds about 7.9 × 107,224,719 different 1000 × 1000 images. If you looked at a billion random ones every second since the Big Bang, the share of the gallery you'd have seen would start with more than 7.2 million zeros after the decimal point. A randomly chosen picture there will look like TV static.
How many images are in the Gallery of Babel?
The Gallery of Babel is a 3D walk through a gallery that, by its premise, holds every possible image on a 1000 × 1000 pixel canvas. Its developer, Terra Incognita Games, says it's inspired by the Library of Babel, the idea of a library that contains every possible book.
The count is simple arithmetic:
- A 1000 × 1000 image has 1,000,000 pixels.
- With ordinary 24-bit color, each pixel has 256 levels of red, green and blue: 16,777,216 possible colors.
- So the number of different images is 16,777,216 multiplied by itself a million times: 2^24,000,000.
That works out to about 7.9 × 10^7,224,719 — a number with 7,224,720 digits. It's the same figure the developer gives on the game's itch.io page, which tells us the gallery is counting standard 24-bit color.
For scale, the number of atoms in the observable universe is usually estimated at around 10^80, a number with 81 digits. Even a tiny 10 × 10 thumbnail already has about 10^722 possible versions.
The odds of one specific picture
If every image is equally likely, the chance of landing on one particular picture — a photo of your cat, the Mona Lisa, a frame from your favorite film, all shrunk to 1000 × 1000 — is:
1 in about 7.9 × 10^7,224,719
The odds of finding anything coherent
Maybe you don't need one exact picture. Anything recognizable would do: a face, a word, a landscape. So let's be extremely generous and say there are 10^100 recognizable images, a hundred quintillion times more than there are atoms in the universe.
The chance that a random image is one of them is still at most:
1 in 10^7,224,619
Taking 100 digits off a number that's more than 7 million digits long barely changes it. The pool of meaningful pictures, however big you make it, is a speck next to the gallery.
What if "close enough" counts?
A real photo would still look the same if every pixel were a few shades off. So let's accept any image where each pixel is within 10 shades of the target on red, green and blue. That allows 21 × 21 × 21 = 9,261 versions of every pixel, and about 10^3,966,658 near-copies of the picture.
That sounds like a lot until you divide by the size of the gallery:
| What counts as a find | Chance per random image |
|---|---|
| One exact picture | 1 in 7.9 × 10^7,224,719 |
| Any of 10^100 recognizable pictures | 1 in 10^7,224,619 |
| A near-copy within 10 shades per pixel | 1 in 10^3,258,062 |
| One solid-color canvas (any of 16.8 million colors) | 1 in 10^7,224,712 |
Loosening the rules cuts millions of zeros, and millions are still left.
Why the images look like static
In a random image, every pixel is picked on its own. The chance that a pixel lands within 10 shades of its neighbor on all three colors is (21 ÷ 256)³, about 1 in 1,800. A smooth patch of sky, the edge of an object or the curve of a face needs thousands of neighboring pixels to agree at once. Random pixels almost never do, so what you get is noise: a fine, colorful grain with no shapes in it.
How long would it take to find one?
Imagine a machine that checks a billion images per second and has been running since the Big Bang, about 13.8 billion years ago. That's roughly 4.4 × 10^26 images checked.
As a share of the gallery, that's about 10^-7,224,693 — a decimal point followed by more than 7.2 million zeros before the first non-zero digit. Run a billion of those machines and you only shave off nine more zeros.
What about the "finds" people share?
The developer says it plainly on the game's page: the chance of finding anything recognizable is vanishingly small, and you might wander the halls for years before glimpsing even one. The numbers above back that up. A random frame that clearly shows something is not impossible, but it is so unlikely that it shouldn't be what you expect from a walk.
Why walk the gallery anyway?
The point of the Gallery of Babel was never to find a picture. There's no winning or losing; the developer describes it as a quiet stroll and a way to think about infinity. Knowing the odds is what gives the walk its strange feeling: the frames on the walls come from a space so large that no one could ever see more than a sliver of it.
Every one of those images hangs somewhere in the halls. Take a walk and see what you find.
Walk the Gallery of BabelQuestions
How many images are in the Gallery of Babel?
About 7.9 × 10^7,224,719. That's 16,777,216 possible colors for each of the 1,000,000 pixels in a 1000 × 1000 image, or 2^24,000,000. Written out, the number has 7,224,720 digits. The developer gives the same figure on the game's itch.io page.
Is a photo of me in the Gallery of Babel?
By the gallery's premise, yes: every possible 1000 × 1000 image is in it, so any photo of you shrunk to that size is somewhere in the halls. The catch is finding it. Picking images at random, the chance of landing on it is 1 in about 7.9 × 10^7,224,719.
What are the odds of finding anything coherent?
Even if you generously count 10^100 different images as recognizable — far more than the roughly 10^80 atoms usually estimated for the observable universe — the chance that a random image is one of them is at most 1 in 10^7,224,619.
Why does every image look like noise?
In a random image every pixel is independent. Two neighboring pixels land within 10 shades of each other on red, green and blue only about once in 1,800 tries, while a smooth sky, an edge or a face needs thousands of neighbors to agree.