The bitter lesson of the Ralph-Wiggum loop
“It is a profoundly erroneous truism, repeated in all copy-books and by eminent people when they are making speeches, that we should cultivate the habit of thinking of what we are doing. The precise opposite is the case. Civilization advances by extending the number of important operations which we can perform without thinking about them. Operations of thought are like cavalry charges in a battle — they are strictly limited in number, they require fresh horses, and must only be made at decisive moments.”
— Alfred North Whitehead, An Introduction to Mathematics (1911)
“You are a senior engineer. Implement an integer-program solver. Make no mistakes.”
- A vibe coder
The Ralph-Wiggum loop is when you put a coding agent in a loop, and ask it to work on a problem until it has solved it. It is much maligned; “whatever happened to thinking?” its naysayers decry.
The bitter lesson notes a pattern in AI of general optimization algorithms (search and learning) making specialized problem solving obsolete. This pattern of optimization taking over the world extends beyond AI; for instance, the success of MILP/SAT solvers as a replacement for specialized heuristics for NP-hard optimization problems.
If you’re optimization pilled, when you have a problem, you reformulate it as an optimization problem, and you throw compute at it. Compute gets cheaper faster than human labor does and optimization heuristics get refined, so this produces wins.
The Ralph-Wiggum loop for software engineering is a logical extension of this: you have a software problem that you want to solve, you formulate a prompt (and perhaps tests) that distinguish the behavior you want and you throw an agent at it. It’s not really necessary to put this in a ralph-wiggum bash loop, since agent scaffolds are increasingly good at just continuing until the prompted task is done.
The constraint formulation and general purpose algorithms look different, but the art remains in how you formulate the constraints. The disconnect now is that prompted constraints are often ambiguous natural language. The question of how to communicate constraints to an LLM is the place to develop opinions. An example of this: my preferred way to debug emacs issues now is to start up a vm with my config in it, give claude a precise description of what the correct behavior should be, and just let it rip.
The Ralph-Wiggum loop is just another face of the bitter lesson.
