A 55‑Year‑Old Bug in the Original Lunar Lander Game: Missing Square‑Root Factor in the Rocket Equation
The article recounts the history of the 1969 text‑based Lunar Lander game, explains how its creator used the rocket equation and Taylor series for physics simulation, and reveals a long‑standing bug—a missing factor in the square‑root denominator—that causes the optimal fuel‑burn strategy to fail, prompting a modern analysis of the error.
In July 1969, when Apollo 11 landed on the Moon, a 17‑year‑old American high‑school student named Jim Storer was inspired to write a lunar‑lander simulation on a PDP‑8 using the FOCAL language, producing a purely textual game with about 50 lines of code.
The game required the player to manually control a lunar module, receiving a status report every 10 seconds that listed altitude, descent speed, and remaining fuel, after which the player entered a fuel‑consumption value (0‑200) for the next interval; a soft landing required a near‑zero impact speed, while crashes or fuel exhaustion ended the game.
Although simple, the text‑based Lunar Lander became the most popular computer game of 1973 and spawned many variants for decades.
Retired software engineer Martin C. Martin recently revisited the game to find an optimal fuel‑saving strategy, only to discover a 55‑year‑old bug: the game’s physics calculations miss a factor of 2 inside the square‑root denominator of the rocket‑equation formula.
Martin, who has a background in robotics (Carnegie Mellon), post‑doctoral work at MIT, and AI leadership at Rockstar Games, noted that the optimal strategy derived from the game (70 seconds of no burn, then 10 seconds at 164.31426784 lb/s, followed by full thrust) still violates the game’s own landing‑speed criteria, indicating a deeper flaw.
Jim Storer’s original implementation used the exact Tsiolkovsky rocket equation with a Taylor‑series expansion for the logarithm, achieving high precision for the limited parameters of the game. However, Martin found that Storer’s formula placed the square‑root in the denominator rather than the numerator, effectively halving the denominator’s value and inflating the error by about 30×.
This missing factor causes the simulation to underestimate the time to reach the lowest point, leading the program to think the lander has not yet touched down when it actually has, and consequently to miscalculate the fuel‑burn schedule.
Correcting the error (adding the missing factor and removing an extra 0.05 s offset) improves the best achievable landing speed from 1.66 mph to just under the 1 mph “perfect landing” threshold, but the game still relies on only the first two terms of the Taylor series, limiting overall accuracy.
Martin concludes that, despite the bug, the Lunar Lander remains an engaging educational game that encourages players to explore numerical methods, physics, and optimal control strategies.
Reference: How I Found a 55‑Year‑Old Bug in the First Lunar Lander Game
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.