The Tower of Hanoi: A Simple Toy That Traumatizes Programmers and Breaks AI
Description
This is a four-panel meme that illustrates the different perceptions of the Tower of Hanoi puzzle. The first panel, labeled 'Everyone:', shows a simple wooden ring-stacking toy with the caption 'it's a game for kids'. The second panel, labeled 'Programmers:', shows the 'PTSD Dog' meme, a dog with a thousand-yard stare and superimposed images of helicopters, symbolizing the traumatic experience of learning recursion and algorithmic complexity through this problem in computer science. The third panel, labeled 'AI:', contains a block of text explaining that leading generative AI models (LLMs) fail spectacularly at solving the puzzle, even with a small number of discs or when given the solution algorithm, because their process is not 'logical and intelligent'. The final panel is a grotesque, melting red skull Wojak meme, visually representing the AI's internal state of catastrophic failure while attempting to reason through the stateful, recursive logic required to solve the puzzle
Comments
19Comment deleted
An LLM attempting the Tower of Hanoi is like a senior architect being asked to write a FizzBuzz implementation: it will confidently generate a 500-word essay on the philosophical implications of prime numbers, but the code will somehow still fail
Apparently 70 B parameters still can’t learn the two-line recursive solution we all brute-forced in CS101 - maybe the real context window limit is eight discs
After 20 years of optimizing recursive algorithms and teaching juniors about stack frames, watching a trillion-parameter model fail at Tower of Hanoi is like watching a Formula 1 car lose to a tricycle on a straight road - turns out all that compute can't buy you a proper base case
Turns out the real Tower of Hanoi problem wasn't moving the discs - it was explaining to stakeholders why our $10M LLM investment can't solve a puzzle that every CS101 student implements recursively in 15 lines. Even when you literally give the model the solution algorithm, it still hallucinates invalid moves. At least when our legacy COBOL systems fail, they fail deterministically
LLMs turning toys into NeurIPS rejects: more tokens, zero signal
Ten lines of recursion move 64 disks; give an LLM eight and chain-of-thought, and it still puts a 7 on a 3 - autocomplete isn't planning
Tower of Hanoi is that ‘kids’ toy where seniors reach for stacks and invariants while LLMs reach for next-token probabilities - then confidently place a larger disk on a smaller and call it generalization
I mean, in the regular usage, they're supposed to come out with proper propgram implementing the deterministic algoritm for chosen problem. Not "solve it" on ther own. And the difference between just outputting the code for user or executing it via a tool call during the reasoning process (nice thing in o3 and similar models, btw) and summarizing the results is just an implementation detail. Comment deleted
I guess, the point is that LLMs are still just very complex statistical models without the capacity to predict something that stretches too far from their training set. Like, there's a ton of examples of code for solving Hanoi throughout the net. But not enough actual solutions for 7+ discs (cause why would there be?), therefore LLMs are failing. Comment deleted
Given the fact that algorithms are almost exactly identical, whatever the disc count, it really shows that there there is no real intelligence there. Comment deleted
Btw, solution required 2^n - 1 moves, so, 8 disks require 255 moves, and thats maybe just attention issue, that see to much already performed steps and confuse itself Comment deleted
idk if you really need memory of your last move to solve hanoi Comment deleted
And i think nobody here cant just solve it for 8 disks only in brain memory, without paper and pen, exactly because of context issue, so it kinda same Comment deleted
CURSE OF RA 𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀐 𓀑 𓀒 𓀓 𓀔 𓀕 𓀖 𓀗 𓀘 𓀙 𓀚 𓀛 𓀜 𓀝 𓀞 𓀟 𓀠 𓀡 𓀢 𓀣 𓀤 𓀥 𓀦 𓀧 𓀨 𓀩 𓀪 𓀫 𓀬 𓀭 𓀮 𓀯 𓀰 𓀱 𓀲 𓀳 𓀴 𓀵 𓀶 𓀷 𓀸 𓀹 𓀺 𓀻 𓀼 𓀽 𓀾 𓀿 𓁀 𓁁 𓁂 𓁃 𓁄 𓁅 𓁆 𓁇 𓁈 𓁉 𓁊 𓁋 𓁌 𓁍 𓁎 𓁏 𓁐 𓁑 𓀄 𓀅 𓀆 Comment deleted
Just LLMs? u just think. Comment deleted
LLMs and humans are good at very different things Comment deleted
LLMs have just the ability to pay attention and scale with data. Human brain can do so much more with so much less energy it's not even funny Comment deleted
Human scientist works for 4000€/month consuming snikers bars. AI scientist works for 30000€/month consuming gigawatts of electricity Comment deleted
Is either snikers bars, or energy drinks/coffee and junk food Comment deleted