Metafor Make a game

MIT Media Lab · 2005

Programming by telling a story.

In 2005, a program called Metafor read a story typed in plain English and wrote the Python for it, live, as you typed. Twenty years before anyone called it "vibe coding," the idea was already here: say what you mean, and the computer builds it.

"Every program tells a story."Liu and Lieberman, IUI 2005

The paperMetafor: Visualizing Stories as Code

Hugo Liu and Henry Lieberman presented Metafor at the 10th International Conference on Intelligent User Interfaces (IUI '05) in San Diego, January 10 to 13, 2005. Lieberman had been at the MIT Media Lab since 1987, where he directed the Software Agents group.

The trick was to notice that stories and programs are built from the same parts. In the paper's words: "Roughly speaking, noun phrases can be interpreted as program objects; verbs can be functions, adjectives can be properties."

Nounsbecome objects
class Saw
Verbsbecome functions
def cut()
Adjectivesbecome properties
self.red = True
"When"sets the scope
if ...:

It went further. "Possessives like 'menu's drinks' act just like dot notation." And "'Drinks' is recognized as a list because it is determined by 'some'." Metafor parsed each sentence with MontyLingua and used ConceptNet, a common-sense knowledge base, to fill in what people leave unsaid.

A forest grows a log every 2 seconds. A saw cuts each log into 4 planks. When the box has 8 planks, you win.
class Saw(Machine):
    def cut(self, log):
        return [Plank() for _ in range(4)]

while True:  # every 2 seconds
    log = forest.grow()
    planks = saw.cut(log)

if box.count(Plank) >= 8:
    win()

This is Metafor today, in the spirit of the original: the story on top, the code it means underneath.

The wish"The window could contain a real-time simulation"

The 2005 paper ends with a dream. "Ideally we would like to integrate a graphical visualization of the code model, or better yet, for a domain such as a MOO, the window could contain a real-time simulation." And a hope: "We hope interfaces like Metafor can put some of the fun back into programming."

This Metafor is that window. A kid speaks, the story glows, the Python grows beside it, and the world comes alive and plays. Loops light up and count as they run, so the hardest idea in programming is something you can see.

What happened nextThe idea travelled

In a small study in the paper, 13 people estimated how long it would take to program a simple Pacman game. Non-programmers said Metafor cut the work by 22%, and intermediate programmers by 11%.

Within weeks, Slashdot ran it as an "English To Code Converter" (March 25, 2005), and Dr. Dobb's Journal covered it in its June 2005 News & Views. The team followed it with more papers on programming in natural language, at CHI 2005, IEEE VL/HCC 2004, CICLing 2006 and in Springer's End User Development (2006).

102citations on Semantic Scholar
89citations on OpenAlex
1,882citations for ConceptNet, the common-sense base it used

Counts as of November 2026. Crossref lists 50.

Work that cites Metafor includes:

Twenty years laterThen the world caught up

January 2005Metafor turns stories into Python at IUI in San Diego.
March to June 2005Slashdot and Dr. Dobb's Journal spread the word.
February 2, 2025Andrej Karpathy posts: "There's a new kind of coding I call 'vibe coding'..."
2025Collins names "vibe coding" its Word of the Year.
2026Metafor is reborn as a game studio for kids, with today's AI.

20 years and 3 weeks.

That's the distance from Metafor's debut to the post that gave "vibe coding" its name. Metafor was a research prototype, and today's AI models do things it never could. But the core idea, that you can program by saying what you mean in your own words and watch the code take shape, was right there in 2005.

Read it yourselfThe original paper

Read the paper (PDF) ACM Digital Library MIT Media Lab project page

Hugo Liu and Henry Lieberman. 2005. Metafor: visualizing stories as code. In Proceedings of the 10th International Conference on Intelligent User Interfaces (IUI '05). ACM, 305 to 307. DOI 10.1145/1040830.1040908.

Sources: Slashdot, March 25, 2005 · Karpathy on X, February 2, 2025 · Henry Lieberman's biography

Make a game with Metafor