View Larger / Illustration of the Apollo lunar lander Eagle over the Moon.

Announced on Friday, a retired systems engineer named Martin C. Martin revealed that he recently uncovered an issue in the original Lunar Lander computer game’s physical code while experimenting with the software. Crafted by a 17-year-old high school student named Jim Storer in 1969, this ancient game presented the action solely through text status updates on a teletype, setting the foundation for future iterations.

PDP-8 minicomputer, Storer created the remarkable game in a programming language known as FOCAL only a few months after Neil Armstrong and Buzz Aldrin completed their historic lunar walks. The renowned game, which permits players to manage the descent of a lunar module onto the Moon’s surface, demands careful fuel consumption management for achieving a smooth landing by making vital decisions every ten seconds to use the correct amount of fuel.

Back in 2009, just before the 40th anniversary of the initial Moon landing, I embarked on a quest to trace down the creator of the primary Lunar Lander game, renowned then mainly as a graphical game due to the visual version from 1974 and a 1979 Atari arcade release. Upon discovering that Storer devised the earliest known version as a teletype game, I conducted an interview with him and composed a historic account of the game. Subsequently, Storer shared the original game’s source code, scripted in FOCAL, on his website.

A scan of printed teletype output from the original <em>Lunar Lander</em> game, provided by Jim Storer.
View Larger / A scan of printed teletype output from the original Lunar Lander game, provided by Jim Storer.

Jim Storer

Fast forward to 2024, when Martin—an AI specialist, game creator, and former postdoctoral fellow at MIT—encountered a flaw in Storer’s high school code while examining what he deemed the most effective technique for landing the module with optimal fuel efficiency—known to Kerbal Space Program enthusiasts as the “suicide burn.” This method involves descending freely to gain speed, then firing up the engines at the last moment to decelerate just adequately to make a safe touchdown. He also experimented with an alternative—a gentler landing.

“Recently, I analyzed the optimal fuel consumption pattern to achieve the gentlest landing with the maximum remaining fuel,” Martin noted on his blog. “To my surprise, the theoretically best strategy failed. The game incorrectly registers that the lander didn’t touch the surface when, in reality, it did. After thorough investigation, I marveled at the complex physics and numerical calculations in the game. Eventually, I pinpointed a flaw: an absent ‘divide by two’ that had seemingly gone unnoticed for nearly 55 years.”

A question of division

Diagram depicting launch escape system on top of the Apollo capsule.
View Larger / Diagram depicting launch escape system on top of the Apollo capsule.


Despite applying what seemed like a standard landing strategy, Martin discovered that the game inconsistently reported that the lander completely missed the Moon’s surface. Fascinated by this peculiarity, Martin delved into the game’s source code and unveiled that the landing algorithm relied on sophisticated physics for its era, including the Tsiolkovsky rocket equation and a Taylor series expansion.

As stated in the aforementioned quote, the core of the issue was a straightforward computational oversight—a missing division by two in the formula that computed the lander’s trajectory. This seemingly minor flaw had significant implications, leading the simulation to underestimate the time until the lander hit its lowest trajectory point and thus miscalculate the landing.

Despite the glitch, Martin was astounded that Storer, a high school senior back then, succeeded in embedding advanced mathematical principles into his game, an achievement that remains remarkable even by contemporary standards. Martin reached out to Storer himself, and the Lunar Lander creator informed Martin that his physicist father aided him in deriving the equations utilized in the game simulation.

Although individuals played and relished Storer’s game for years with the bug present, it demonstrates that realism isn’t always the predominant aspect of an engaging interactive experience. Fortunately, the genuine Apollo lunar landing adventure of Aldrin and Armstrong did not encounter the same issue.

You can delve deeper into Martin’s exhilarating debugging journey on his blog.