Engineering Memory

Thoughts on learning to memorize the first one hundred digits of pi.

About three years ago, I memorized the first one hundred digits of pi. I did it on a lark, after reading Joshua Foer’s Moonwalking with Einstein. The book’s central claim is that nearly anyone can achieve seemingly super-human feats of memory with proper technique and deliberate practice. Intrigued, I put the some of the techniques to the test and found that they worked surprisingly well. But they did not just work. They converted the hard and shapeless problem of how to remember into a problem of discipline and methodology. Remembering became engineering.

The central insight behind most memory techniques is an observation: the human brain is not bad at memorization per se; it is only bad at memorizing specific kinds of information. For example, you can probably only hold 5-9 objects in short-term memory, but you can visualize your childhood home with relative clarity. And most adults have well-developed memories for certain topics, such as a car mechanic for car engines. In absolute bits of information, we can hold a lot in our minds, but we struggle when that information lacks meaning or context.

Memorization techniques harness this observation with a method called elaborative encoding. The basic idea is to associate hard-to-remember objects with easy-to-remember objects. Perhaps the most famous example of this technique is called the method of loci. In this technique, you place objects you want to remember in a visually familiar place called a memory palace. And then recall is just the act of “walking” through a memory palace in your mind and visualizing each object.

To memorize digits of pi, I used a more modern and advanced technique designed specifically for memorizing numbers, called a person-action-object (PAO) system. In a PAO, one associates each digit in the set {00,01,02,...,99}\{00, 01, 02, ..., 99\} to a person doing an action to an object. Then any six-digit number one wishes to memorize is encoded as the person from the first two digits doing the action from the second two digits to the object in the third two digits. I’ll call this combined image representing six digits a “glpyh”. For example, in my memory palace for pi, I have the glpyh: Albert Einstein twirling a leotard. What number does this represent? Well, in my PAO, I have the following mappings:

So in my PAO, Albert Einstein twirling a leotard is the number 502884502884. PAO systems are powerful because they automate the process of coming up with elaborative encodings. And since you have one hundred persons, actions, and objects, you have one million unique and ideally memorable glyphs.

That’s basically it. Conditional on already having a PAO system memorized, memorizing one hundred digits of pi is pretty easy. I think I did this in roughly an hour. I may be underestimating, but it was shockingly fast. I definitely did it in a single sitting. This is because one hundred digits is only seventeen glpyhs. These fit into a relatively small memory palace—in my case, in the apartment of an old friend.

Obviously, the harder task was memorizing my PAO, since that requires memorizing one hundred “base” glpyhs! In fact, probably the single most time-consuming task of memorizing pi was not even memorizing my PAO but simply building my PAO in a spreadsheet. This is because each person, action, and object should be memorable and unique. For example, my PAO contains both Keira Knightley (7777) and Natalie Portman (2222). If I were to decode a glpyh with one of them too quickly, I might confuse the two. But I would not confuse them with Darth Vader (1717) or Serena Williams (0606). So each set of persons, actions, and objects should be maximally dispersed. (If I could build my PAO again, I would not include both actresses.) Memorizing my PAO took a bit of time, but I just used Anki cards on my subway commute. I committed to the bit because I figured having a system for memorizing numbers would be useful long term. (It’s moderately useful.)

This all might sound like a lot of work, because it was. But for me, the remarkable thing is that the process converted memorization into engineering. Let me give a few examples of this.

First, I had a clear process with small, manageable challenges the entire time. I never really doubted that I would be able to memorize one hundred digits of pi, but I was surprised at how easy the final encoding was.

Second, when reciting pi, my errors are always “local” in the sense that they are isolated to a single glyph. The most common error is that I decode a glpyh incorrectly. For example, I memorized my PAO by putting it in my childhood home. And I put each decade of my PAO into distinct areas of that home. So when decoding Albert Einstein twirling a leotard, I might accidentally decode “twirling” as 3838 instead of 2828. This is because the PAO glpyhs for the twenties and thirties are in adjacent rooms in my house. I would estimate that nearly all of my errors when recalling pi involve getting a single two-digit number wrong by a decade. Contrast this with other forms of memorization, such as putting pi to music or brute-force memorizing a poem. Here, if you get tripped up, you might struggle to remember where you were or forget entire chunks. In the worst case, you have a “global error” and must repeat from the beginning. This kind of global error has never happened to me with pi.

Third, while recalling pi, I can stop at any point, take a break, and then resume. This is because “pausing” amounts to stopping in my memory palace. Again, contrast this to if I had memorized pi through a song. I suspect I could take a pause on the order of weeks. What I would do is take the next glpyh and store it in a new palace representing the pause point.

Fourth, I can go backwards easily. I simply walk through my memory palace for pi backwards, which is trivial since I’m just visualizing my friend’s apartment. Then for each glyph, I decode it backwards. For example, the last glyph in my one hundred digits is Serena Williams nibbling on a plastic leg. That’s 067982067982. (Technically 8282 is extra if we’re counting “digits of pi” as digits after the decimal point.) And since “plastic leg” is 8282, I simply say “2828” while decoding. So I can go backwards nearly as quickly as going forwards because I only ever need to flip two digits at a time.

And finally, this system scales. Memorizing the first one hundred digits of pi only required seventeen glyphs. Memorizing another seventeen glpyhs doesn’t seem too hard. I don’t feel like my memory has been taxed yet. Using this system, I think I could memorize a thousand digits of pi relatively straightforwardly. Honestly, the hard part would be deciding on the right set of memory palaces and then “jumping” between these palaces in the correct order. I would probably use an organizing system for my palaces, such as ordering the palaces east-to-west in physical space. But again, this wouldn’t be “hard” in the sense of a vague or amorphous challenge. It would just be a lot of work for rapidly dimishing returns.

So that’s it. That’s how I memorized one hundred digits of pi. If you think it sounds like a lot of work, that’s actually my point. My point is that there was no magic here. I came to this process with an average memory, and average memory is all I have. It’s just technique and practice.

Of course, you might ask why I did this. Everyone I’ve told about it certainly has. Of course, the trite answer is: why do anything? Besides eat, sleep, and have sex, humans need to do very little to survive as a species. But my more serious answer is this: nothing has more positvely impacted my own life than my ability to change how I view myself and my relationship to the world. We all limit ourselves in our imaginations. One might think, “I can’t do this because I’m not an X person”, but those beliefs are often grounded in a handful of early experiences which are then rarely interrogated. My claim, echoing Foer’s, is that basically any person with an average memory can memorize large amounts of information with simple, well-established techniques. And at least for me, truly internalizing that belief through experience has changed how I view my own mind.