73 points · by greentec · 1y ago · 26 comments
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.
Unfortunately I do not know of an online source for the Korean edition that so inspired the original poster.
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.
The vibe coding of its day! :D
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...
People bought the book to not only play, but also learn from simple games. There's nothing quite like it nowadays.
So far I've been really impressed with the materials, then tutors and the games they've made.
For what he has learnt, and the support they also provide outside of the lessons, £50 a month feels pretty cheap.
The blog post explained that the game derived from Martin Gardner's popularization of Donald Michie's work on the algorithm.
The output of the program also outlines the algorithm, using a series of PRINT statements.
Finally, the explanatory text in the book also explains the algorithm, in somewhat more depth.
Like many of the games in the book, it had a didactic purpose. It's not about improving playability.
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.