Week 5, imagination engine

This is an edition of Robin Sloan’s video game development diary.

Welcome: to returning readers as well as everyone newly subscribed. If you missed it, week 1 sets up the motivation behind this project. All the previous editions are available over on my blog.

The k in the headine at the top of the page now appears whenever I close my eyes.

Wot I got

This week’s achievement was an implementation, in Ink, of the draft sequence I shared with you in last week’s newsletter. Hey, that’s cool!

In addition, I made a system to aid in the generation of locations beyond this first one. That will be the focus of this week’s edition.

View of a City at night

View of a City at Night, Camille Roqueplan, 1831


The body of this week’s newsletter will be a little shorter than previous editions, both (a) to spare you 😝 and (b) because the “meat” of it is elsewhere, as you’ll see.

As some subscribers know, I have lately been exploring the use of machine learning as a scaffolding for writing.

If that sentence doesn’t make any sense to you, don’t despair; there are explanations ahead.

Last year, as part of a sequence of print zines, I offered readers the following opportunity, which is almost a game, if you squint a little:

The maps, drawn by a lovely open source software package, looked like this:

Sample quest map

The narratives themselves were generated by a machine learning language model trained on a large collection of fantasy novels.

What is a machine learning language model? How does it read novels?? How can it write a story???

Well, I wrote a blog post explaining the project, but the best documentation of the whats, hows, and whys is this talk I gave at a small, sweet conference in San Francisco last year:

I know the transition from “reading a newsletter” to “watching a talk” requires a bit of energy—like bumping an electron up into one of its higher orbitals—but I really do encourage you to muster the required quanta, because (a) the talk is good, if I don’t say so myself, and (b) it presents the case, as eloquently as I can manage, for the strangeness and beauty that these language models can offer to writers and readers.

Also, in this talk, you’ll see my face and hear my voice! I think that’s a healthy thing, every so often: to lend fleshly ballast to the words you read on the screen. (Fleshly… ballast? Whatever, I’m not changing it.)

ALSO, this talk gives you the technical and creative context you’ll need for the thing I am about to ask you to do 😎

Invisible cities

In the first half of this week, I trained a language model (a phrase which you now understand because you watched that talk, right??) on a collection of fantasy books and fairy tales that suit POTO’s style. In the week’s second half, while I worked on implementing the city of Port Fabri in Ink—it’s now called Porto Fabri, by the way—a computer in my office churned away, its three GPUs piping hot, generating tiny descriptions of imaginary cities.

There are now thousands of these descriptions—far too many for me to read and review. Most are boring: dutiful regurgitations of the themes the computer encountered in all those books and tales. But some of them contain gold: scenes and sentences that sparkle with creativity, mystery, even beauty.

For example:

Slolli was a great hub for the buying and selling of iron ore. The city had its own tunneling company, the Moge Vison, a partnership of robbers who lived in the mountains.

I read that and thought: oh, yes, of course there’s a partnership of robbers called the Moge Vison. Is “moge” a general term? Does this particular moge compete against the Moge Trevis, the Moge Viperine? Is the Moge Vison a partnership of reformed robbers, or do they tunnel sideways into other mines and empty their richest veins?

You see how this works! It’s not too different from the process I use for novels, short stories, and everything else, which relies on the collection and recombination of odd, interesting material. Normally, that material is gathered from books, dreams, conversations overheard; the only difference here is that it comes blasting out of this computational imagination engine.

Thousands of cities sit waiting on a disk; more than I could ever read. Most are boring. A few are magical.

I hereby invite you to spend a few minutes helping me sift.

Sound snack

But you’ll need a soundtrack as you explore the vast reaches of the language model’s universe, and this week’s sound snack suits the task.

Earlier this week, Jesse asked me if perhaps he ought to compose a “quest theme” to balance last week’s “contentment theme.” I said: yes, absolutely.

The core mechanic of the game, as it’s developing, is a push and pull between “hunger” and “contentment.” In an email to Jesse, I wrote:

For me, the central feeling really is a kind of HUNGER, but not for power so much as knowledge, and even then, not knowledge FOR power, but knowledge… just to know. Because knowing is fun. Knowing what’s beyond the castle walls, knowing what’s on the other side of the ocean, knowing what’s on the dark side of the moon.

This is related, helpfully, to the central question of all (good) fiction, which is: “what happens next?”

Regarding his interpretation of that feeling, Jesse responded:

In the middle of this theme, there’s a big crescendo of rattling cymbals, dulcimers and horns. Here, I imagined our traveller encountering something powerful and dangerous that would cause most to turn back to safety. But the draw to know more about the world pulls them further into the unknown. They travel onward to see what’s next, what’s across the sea!

Now: onward, across the sea!

Here be dragons

View of Emmerich

View of Emmerich, Jan van Goyen, 1645

This link will set you on your journey. (Note: these city descriptions are no longer online.)

You may proceed until you get bored and/or exhaust yourself. It’s very likely that you will “visit” at least one city that no one else has ever seen! Not even me.

As you’ll see, each description offers you three responses.

For most, you will choose NAH. I’d like you to be quite demanding with these descriptions: any in the range from “that is garbage” all the way up to “it’s fine, I suppose” should be discarded.

For some, you will choose HECK YEAH. Why? Maybe because of a resonant image or an intriguing premise. A cool name; a beautiful phrase. I guess I’m just asking you to listen, inside yourself, for that ~vibration~ that arises whenever you encounter something wonderful in any kind of art.

(Update: several people have now requested a way to highlight and HECK YEAH a specific part of a description. Unfortunately, that’s too much engineering for this super-simple project—but/and I’ll repeat that even a single great phrase might qualify something for HECK YEAH status, and, remember, if you run across a truly delicious scrap of language… you can just email it to me! 😇)

There is a third option, too, which is FLAG. That’s reserved for descriptions that contain something offensive, the determination of which is entirely up to you. Again: trust your feelings. This output is heavily filtered, so my hope is that you will not have to use the FLAG button—but it’s still possible. (For me, the interestingness of sharing this activity with you outweighs the strangeness of publishing text I have not reviewed personally, but only just barely.) (And, for the record, I’ll use your flags to help improve the filtering in future projects.)

Along the way, every so often, you’ll see evidence of the books and stories this language model was trained on; suddenly, a description will mention Camelot or Havnor or Austria. This shouldn’t disqualify a description from GOLD judgment: after all, it’s easy enough to change a name. I actually like the fact that the language model fails to completely disguise its influences.

The goal of this exercise is to identify a subset of these descriptions—dozens? a hundred?—that have something special to offer. Then, as I am building POTO’s map, I can consult them as my sourcebook. Rather than stare at a blank screen, my imagination scrabbling for purchase, I’ll pull up one of the well-received descriptions—or two or three, combining them—and simply take the assignment. Dive in.

If you find any particularly great names or phrases, feel free to email them to me directly. You can always reply to the messages I send.

Will any of this text go directly into the game?

Absolutely not. Under no circumstances. How else can I say it? No way. The point of this isn’t to “make the AI do the writing”; it’s to prod and stoke the images and tropes in my brain, to help me invent a more interesting world.

The point is also that it’s weird and fun.

On Twitter, a subscriber to this newsletter wrote, “I’m expecting to eventually realize I’ve been playing the Perils of the Overworld this whole time.” I thought of his joke as I was formatting these city pages for review. It might not be… entirely… wrong?

View of Naples through a Window

View of Naples through a Window, Franz Ludwig Catel, 1824

From Oakland,


This has been an edition of my video game development diary, sent by email every few weeks. You can subscribe: