Get the latest tech news

Solving a Childhood Mystery: How BASIC Games Learned to Win


As a teenager, I discovered incomprehensible code in a book called BASIC Computer Games. Lines 900 through 970 filled with cryptic numbers - it was the secret of how HEXAPAWN’s AI learned. 50 years ago, an AI that could improve itself was created with just 19 game states and simple rules. Following the history of machine learning that started with matchboxes and beads, I finally solve a mystery from my childhood.

The second inner FOR loop checks if all values of the current game state S and the board B being traversed are the same.<> is the not-equal operator, which can still be found in Excel, VBA, and SQL today. These early experiments played an important role in introducing the concept of “learning machines” to the general public and can be seen as laying the philosophical foundation for modern AI. While adding comments and explanations to the code, I briefly thought, “If someone had taught me this back then, couldn’t I have done more things faster?” Anyway, thank you for following me on this long journey, and I’ll continue to strive to write good articles.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of basic games

basic games

Photo of childhood mystery

childhood mystery