July 26th, 2024

Hero coder finds bug in Lunar Lander after 55 years

Martin C. Martin discovered a 55-year-old bug in the "Lunar Landing Game," which miscalculated landings due to a missing "divide by two" in the code, showcasing early programming complexities.

Read original articleLink Icon
Hero coder finds bug in Lunar Lander after 55 years

A retired software engineer, Martin C. Martin, discovered a long-standing bug in the "Lunar Landing Game," originally coded by Jim Storer in 1969. The game simulates the landing of a lunar module, requiring players to manage fuel and descent speed. Martin, while exploring the game's code, found that a missing "divide by two" in the calculations led to the game incorrectly registering successful landings. This bug had persisted for 55 years, despite the game's popularity as a programming challenge. Martin noted the game's sophisticated physics, which included the Tsiolkovsky rocket equation and a Taylor series expansion, showcasing Storer's advanced understanding of mathematics for a high school student at the time. The bug's impact was significant; it caused the game to miscalculate landing times, resulting in players being told they could improve their landing even when they had achieved a near-perfect descent. Martin's analysis revealed that the game's logic underestimated the time to the lowest point of descent, leading to discrepancies in landing outcomes. Despite fixing the bug, Martin acknowledged that some optimal landing strategies remain elusive. He praised the game's complexity and the fun it provided, suggesting that many players were content to enjoy the challenge rather than seek out the underlying issues. The discovery highlights the enduring legacy of early computer games and the intricate programming that often went unnoticed.

Link Icon 2 comments
By @dang - 7 months
I found a 55 year old bug in the first Lunar Lander game - https://news.ycombinator.com/item?id=40680218 - June 2024 (114 comments)
By @ctippett - 7 months
While the title matches the article, it's a bit of a hyperbole. They found a bug in a 55-year old Lunar Lander game.