← Curiosity Land · Story Wall
The Program That Ate Itself

The Program That Ate Itself

In 1936, before any computer existed, a pencil found a wall no machine will ever get past.

The arcade had been dead for years, but the maze game was still glowing.

"That's not possible," Soren said. "Somebody would have unplugged it."

"Somebody forgot." Maya crouched in front of the screen. A little pixel mouse ran through a maze, hunting for cheese. Every time it found the cheese, the maze rebuilt itself, bigger. "How long do you think it's been solving these?"

"The mall closed six years ago."

They watched. The mouse never stopped. The maze never repeated.

"Okay," Maya said. "Here's the thing that's bugging me. This is a demo. Demos are supposed to loop. Play a little, reset, play again. So somebody could see it and put in a coin."

"Right."

"So why hasn't it reset? Where's the loop?"

Soren pressed his face close to the cabinet. There was a sticker on the side, half peeled. HALL OF FAME MAZE. And under it, in tiny letters someone had written by hand: WINS EVERY MAZE. GUARANTEED.

"Guaranteed," he read out loud. "Somebody was really proud of that."

"A program that wins every maze." Maya sat back on her heels. "That's actually kind of amazing. It means somebody wrote a solver. A thing that can look at any maze and find the way out."

"Any maze," Soren repeated. He liked the word any. It was a big word. "That's a huge promise."

"Watch it, though." Maya pointed. The mouse had stopped in a dead end, whiskers twitching. Then it backed up, tried another turn. "It's not magic. It's just trying everything. Left, left, dead end, back up, try right."

"Brute force."

"Yeah. But it always finds the cheese eventually. Because a real maze always has a way out." She frowned. "If it has one."

Soren stood very still. Then he took his notebook out of his jacket and opened it against his knee. His pen moved across the page in quick short strokes, sketching a box with a maze inside it.

"What if it doesn't," he said.

"Doesn't what?"

"Have a way out. What does the mouse do then?"

Maya looked at him. "It runs forever. It never finds cheese that isn't there. It just keeps trying turns until the power goes out."

"So the guarantee is a lie." Soren tapped the sticker. "It doesn't win every maze. It wins every maze that has an exit. If you give it a maze with no exit, it runs forever and never admits it's stuck."

"Okay, but that's a bad maze. Nobody builds a maze with no exit."

"Somebody could. To break the machine."

Maya grinned at him. "You want to break the machine."

"I want to know if you can."

They found a marker in the coin return of a dead crane game and started drawing on the back of an old flyer. Maya sketched a wall of little boxes.

"So imagine a smarter machine," she said. "Not the dumb mouse. A machine that's actually clever. You show it any maze, and instead of running it, the clever machine just looks and tells you: this one has an exit, or this one traps you forever. Yes or no. Fast."

"A checker," Soren said. "It checks whether the mouse would ever finish."

"Right. If that machine existed, the guarantee would be real. You run the checker first. If it says forever-trap, you don't even bother."

Soren wrote CHECKER in his notebook and drew an arrow. Then he stopped, pen in the air.

"Wait," he said slowly. "What happens if the checker checks itself?"

Maya's eyes went wide. "Say that again."

"The checker is a program. The mouse-mazes are programs, kind of. So the checker should be able to check any program. Including a program made out of the checker."

"Build one." Maya was already pulling the flyer closer. "Build a mean one. On purpose."

They built it in marker, arguing over every box.

"Make a program," Soren said, "that first asks the checker: hey, will I finish? Will I stop?"

"And then it does the opposite of whatever the checker says," Maya finished. She was talking fast now. "If the checker says you'll stop, the program keeps going forever. Just to be a jerk."

"And if the checker says you'll run forever, the program stops right away."

They both stared at the boxes on the flyer.

"Wait," Maya said. "Wait, wait. Run it. The checker looks at the jerk program. It has to answer. So say it answers stops."

"Then the jerk program runs forever," said Soren. "Because that's what it does when it hears stops. So the checker was wrong."

"Okay, so the checker answers runs forever instead."

"Then the jerk program stops. Immediately. So the checker was wrong again."

Maya sat down flat on the sticky arcade floor. "It's wrong both ways."

"Every way." Soren's voice had gone quiet. "There's no answer it can give that's right. If the checker existed, we could always build the jerk program, and the jerk program breaks it."

"So the checker can't exist." Maya looked up at him. "Not because nobody's smart enough to build it. Because it can't exist. The maze itself won't let it."

They sat with that. Behind them the mouse kept running, left, dead end, back up, right, finding cheese, building a bigger maze, running again.

"So there's no shortcut," Soren said. "For some programs, the only way to find out if they ever stop is to run them and wait."

"And if they don't stop," Maya said, "you wait forever. And you never get to know. Not because you're not paying attention. Because knowing is impossible."

Soren wrote one line under his boxes: SOME QUESTIONS HAVE NO CHECKER. He looked at it like it might get up and walk away.

"A guy proved this," Maya said suddenly. "Had to have. This is too clean. Somebody figured this out."

"Before computers, even." Soren wasn't sure how he knew, but it felt true. "You wouldn't need a real computer. You just need the argument. The jerk program. You could do the whole thing with marker on a flyer."

"Somebody did do the whole thing with a pencil." Maya laughed, a little shaky. "Before there was a single machine to run it on. He just sat there and thought his way to a wall that's built into everything. A thing no machine will ever get past, forever, no matter how good they get."

"That's the part," Soren said. "No matter how good they get."

Maya reached out and put her hand near the mouse on the screen, not touching, just following it.

The maze rebuilt itself, bigger than before, and the little mouse turned into the first corridor and began, once again, to look for the way out.

Read the interactive version and earn a gold star →

A science-verified short story for curious kids · Curiosity Land