Vibe-Coding the End of Math: Busy Beaver

A busy beaver at his computer.
Photo Details

Like a lot of folks, I’ve been using AI to speed up everyday tasks at work and at home, but I’ve been looking for a good excuse to sit down, vibe code, and deploy a full interactive app entirely from scratch.

Recently, I read a fascinating Quanta Magazine article about the Busy Beaver problem—a theoretical computer science puzzle that quickly escalates from simple logic into numbers that literally break the boundaries of modern mathematics. I realized this was the perfect project. I wanted to actually visualize and play this like a game, and AI could help me build the sandbox.

You can try it out right here: Play the Busy Beaver Simulator

It’s a fully functional Turing machine simulator right in your browser. You write the rules, and the little beaver 🦫 runs up and down the tape executing them. Try to leave as many 1s on the board as possible before the program halts, or load up one of the historical champion machines to see how quickly things spiral out of control.

What is the Busy Beaver Problem?
Invented in 1962, the premise is deceptively simple. If you have a Turing machine with a completely blank tape and a strict limit on how many instructions (or “states”) it can remember, what is the maximum number of steps it can run before it finally stops? (If you don’t know what a Turing machine is, think of it like a really simple computer that will follow basic instructions to read and write 0s and 1s on a memory “tape” and then move the tape.)

The scale of this problem is terrifying:

  • A 3-state machine halts after a maximum of 21 steps.
  • A 4-state machine halts after 107 steps.
  • A 5-state machine took until 2024 for a global team of researchers to fully map. The 5-State Champion runs for exactly 47,176,870 steps before halting.
  • A 6-state machine is an active, wild frontier of mathematics. The current leading program takes a number of steps so massive it requires something called “pentation” to even write down: roughly 2 ↑↑↑ 5. That number is so big that it completely dwarfs the total number of atoms in the observable universe. Even if a supercomputer could run a trillion steps every second, it wouldn’t make a microscopic dent in finishing that program before the end of time itself.

How to Play
I wanted the app to be accessible, so I built an intuitive UI that hides the heavy academic notation. Just define your “States” (instructions), tell the beaver what to write and where to move, and hit play. Or step through the instructions one at a time to see what it does and wants to do next.

I included some default beaver “champions” in the preset dropdown at the top. If you want to try some others, just paste a standard string from bbchallenge.org into the importer. Just a warning: if you want to see the 5-state champion finish its 47 million steps before you grow old, make sure you push the speed slider all the way to the right to engage “Warp Speed.” 🚀

About the Build: Vibe-Coding
While I’m now using AI tools all the time for day-to-day tasks, I hadn’t yet found the time to prompt a complete, interactive web app into existence from a blank page all the way to deployment. The Quanta article finally gave me the inspiration I needed.

I treated this as an exercise in AI-assisted product management: I used the Gemini LLM to organize my requirements for the logic, layout, and user experience into working prompts, while Gemini AI Studio acted as my frontend engineering team to generate the code. The result is a fully stateless, client-side application that is 100% vibe-coded. I did the whole thing in roughly one evening.

Go build some Turing machines! 🌳🦫🪵

Leave a Reply

Your email address will not be published. Required fields are marked *