How it Works

A deep dive into the Gallery of Babel: how we search infinite noise for natural forms

01

The Concept

The Gallery of Babel is a collaborative experiment exploring the infinite space of random noise images. Inspired by Jorge Luis Borges' "Library of Babel," we search through countless deterministic noise patterns to find those that exhibit "natural" characteristics, as measured by spectral analysis.

Every possible image can be generated from a seed number. Your browser systematically explores this space, generating images and scoring them locally. When you discover something remarkable, only the seed and score are submitted, allowing anyone to reproduce the exact image.

02

Image Generation

Deterministic from Seeds: Each image is generated from a single integer seed using a deterministic pseudorandom number generator. Given the same seed, the exact same image is always produced. This means we never need to store image data, only the seed number.

Grayscale Noise: Images are 128×128 pixel grayscale patterns. Each pixel's value (0-255) is determined by the PRNG sequence. The process is completely deterministic and reproducible.

Vast Seed Space: The generator uses a 53-bit safe integer seed space, which is over 9 quadrillion possible seeds. New searches use seeds in the range 2^32 to 2^53.

03

Naturalness Scoring

All scoring happens entirely in your browser using JavaScript. No server computation is required. The algorithm analyzes the image's frequency spectrum to measure how "natural" it appears.

1. Spectral Analysis

The image is converted to the frequency domain using a 2D Fast Fourier Transform (FFT). This reveals how energy is distributed across different spatial frequencies. Natural images typically follow a 1/fα power law, where α ≈ 2-3.

2. Alpha Estimation

We compute a radial profile of the power spectrum and fit a line to estimate the exponent α. Images closer to our target (α = 3.0) score higher, as they match the statistical properties of natural scenes.

3. Peakiness Penalty

Periodic patterns like checkerboards create sharp peaks in the frequency spectrum. We penalize these "peaky" patterns, as they're too structured to appear natural.

4. Flatness Penalty

White noise has an unusually flat spectrum (all frequencies have equal power). We detect and penalize this flatness, distinguishing noise from structured natural patterns.

5. Spatial Correlation

Natural images have high correlation between neighboring pixels. We measure this correlation and penalize images with low correlation (indicating pure noise).

Final Score: The total score combines all these factors. Higher scores indicate images that better match the statistical properties of natural photographs.

04

Contributing to the Global Search

When your browser discovers an image with a high score, it automatically submits only the seed and score to the global leaderboard. No image data is ever transmitted, keeping bandwidth minimal.

Submission Criteria: Images are submitted when they:

  • Enter your local top 10 discoveries
  • Beat your personal best score
  • Meet or exceed the current global threshold (top 500)

Rate Limiting: Submissions are limited to once every 5 seconds to prevent server overload. The global leaderboard maintains the top 500 seeds, automatically removing lower-scoring entries as better ones are discovered.

05

Why Keep It Running?

The search space is vast. With over 9 quadrillion possible seeds, finding truly exceptional patterns requires exploring many seeds. Each browser contributes to a distributed search effort.

Longer runs increase your chances of:

  • Discovering images that beat the global threshold
  • Finding patterns that push the boundaries of what's possible
  • Contributing meaningfully to the collective exploration

You can safely leave the tab open in the background while doing other work. The Web Worker runs independently, so it won't slow down your browsing. When you return, you might find you've discovered something remarkable.

Ready to Explore?

Start generating and scoring images. Leave it running to contribute to the global search.

Start Exploring