Solving a Childhood Mystery: How BASIC Games Learned to Win (sublevelgames.github.io)
Hello HN!
As a teenager, I had this BASIC Computer Games book with a game called HEXAPAWN. Lines 900-970 were just cryptic numbers that made no sense to me. Finally figured it out decades later.
Turns out it's machine learning from the 1970s! The AI learns by literally deleting bad moves from an array. After losing ~10 games, it becomes unbeatable. Just 19 board states, no neural networks, no fancy algorithms.
Martin Gardner (who wrote about it) also mentioned MENACE - a tic-tac-toe learning machine made with matchboxes and beads. Same principle, physical implementation.
Made a JavaScript version if anyone wants to try. The AI really does get better.
15 comments
[ 2.8 ms ] story [ 47.8 ms ] threadUnfortunately I do not know of an online source for the Korean edition that so inspired the original poster.
The vibe coding of its day! :D
I'm grateful for his bikeshedding, because it made me a network programmer and led to a fine career building Internet service providers, but I'll never forget his frustration .. "the computer is simply not big enough, we need to build a bigger computer" .. I wonder where he is these days. Hopefully retired.
Actually, that line does start with "511 REM". There was no requirement for REM to be followed by a space.
https://people.csail.mit.edu/brooks/idocs/GardnerHexapawn.pd...