Solving a Childhood Mystery: How BASIC Games Learned to Win
73 points| greentec | 7 months ago |sublevelgames.github.io
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.
kragen|7 months ago
Unfortunately I do not know of an online source for the Korean edition that so inspired the original poster.
JLemay|7 months ago
aa-jv|7 months ago
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.
louthy|7 months ago
The vibe coding of its day! :D
lubujackson|7 months ago
ryoshu|7 months ago
Mountain_Skies|7 months ago
diggernet|7 months ago
Actually, that line does start with "511 REM". There was no requirement for REM to be followed by a space.
greentec|7 months ago
jgalt212|7 months ago
https://people.csail.mit.edu/brooks/idocs/GardnerHexapawn.pd...
jerf|7 months ago
michalpleban|7 months ago
glimshe|7 months ago
People bought the book to not only play, but also learn from simple games. There's nothing quite like it nowadays.
firesteelrain|7 months ago
It gives a sense of intelligence the way it’s played now but it’s a simple algorithm.
Eventually the computer runs out of things to remove and it has to give up.
unknown|7 months ago
[deleted]
reverendsteveii|7 months ago
unknown|7 months ago
[deleted]
mlvljr|7 months ago
[deleted]