Interactive visualization of transformer attention patterns highlighting word relationships in neural networks
gamesMay 7, 20265 min read
By

How machines learned to finish your sentences

Every day you interact with systems that predict your next word. But how does math become meaning? One game reveals the hidden architecture.

Your phone knows what you're about to type before you do. ChatGPT writes essays that sound human. Google Translate turns gibberish into sense across 100 languages. Behind all of this sits the same mathematical trick: predicting the next word. It sounds simple. It's not. The Word Machine is an interactive game that lets you build this prediction engine from scratch, one component at a time. No equations, no jargon. Just pure mechanics. By the time you finish its 15 levels, you'll understand why a simple word-guessing game became the foundation for artificial intelligence.

The Vocabulary Problem

Everything starts with a deceptively basic question: how do you teach a computer what a word is? The first levels of The Word Machine drop you into the tokenization challenge. You're splitting 'caterpillar' and 'doormat' into pieces, but not arbitrarily. The machine needs efficiency. If it already knows 'cat' and 'mat' as separate tokens, reusing them saves space. This isn't just academic. GPT models use roughly 50,000 tokens to represent all human language. Every decision about word boundaries ripples through billions of parameters. The game makes this tangible. You're not reading about subword tokenization. You're doing it, feeling the tradeoffs between vocabulary size and representation power.

Experience it yourselfPlay The Word Machine

Geography of Meaning

Words become coordinates. This is where The Word Machine gets spatial. You drag words around a high-dimensional space, watching synonyms cluster together. 'Happy' and 'joyful' gravitate toward each other. 'Dog' and 'cat' form their own neighborhood. But this isn't just visual metaphor. These embeddings are real numbers that the model manipulates. When GPT writes about love, it's performing vector arithmetic on points in space. The game lets you feel this geometry. You position words, see relationships emerge, understand why similar meanings end up in similar places. It's like watching a map of concepts draw itself.

The Attention Revolution

Then comes the breakthrough that changed everything: attention. In earlier neural networks, words flowed through layers in isolation. Attention lets every word 'look at' every other word and decide what's relevant. The Word Machine turns this into a painting exercise. You highlight which words need to focus on which other words. In the sentence 'The cat that I saw yesterday was gray,' how does the model know that 'was' refers to 'cat' and not 'yesterday'? Through attention patterns you paint yourself. Multiple attention heads work simultaneously, each specialized for different relationships. One might track subjects and verbs. Another might connect pronouns to their references. The game makes this multiplicity concrete.

The Emergence Mystery

Here's what's strange about transformer language models: nobody programmed them to understand grammar, facts, or reasoning. They learned these capabilities as side effects of word prediction. Feed a model enough text, give it enough parameters, and complex behaviors emerge from simple mathematics. The Word Machine captures this emergence in miniature. You're not coding intelligence directly. You're building a prediction machine that develops understanding as a byproduct. This is why language models are both powerful and mysterious. We can explain their mechanisms but not always their capabilities. They surprise even their creators.

Why This Matters Now

Understanding transformers isn't just academic curiosity anymore. These systems are rewriting industries, changing how we work, and raising questions about the nature of intelligence itself. The Word Machine offers something rare: genuine comprehension of the underlying mechanics. When you've built attention patterns by hand, you understand both the power and limitations of these systems. You see why they excel at language but struggle with certain types of reasoning. You understand why they sometimes hallucinate facts or exhibit biases. Most importantly, you gain intuition for a technology that's reshaping the world one predicted word at a time.

ShareXLinkedInHacker NewsEmail

Get the next one

An occasional note when something genuinely new ships here — essays, free tools, projects. No schedule, no filler, easy out.

Need something like this built?

I design and ship AI tools, full-stack apps, and data pipelines — end to end, to production. Tell me the problem in a sentence; I'll give you an honest read on fit within a day.

Work with me →