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.
michalpleban•6mo ago
glimshe•6mo ago
People bought the book to not only play, but also learn from simple games. There's nothing quite like it nowadays.
michalpleban•6mo ago
kragen•6mo ago
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.
zahlman•6mo ago
I remember reading this, but for the life of me I can't recall what the title of the book was. ISTR it also had a chapter exploring multi-dimensional spaces, in particular the problem of packing hyperspheres into hypercubes.
kragen•6mo ago
ljf•6mo ago
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.
glimshe•6mo ago
ljf•6mo ago
But getting the early simple lessons to explain how changing variables affects the game, and how to run things in sequence, has been really powerful for him.
glimshe•6mo ago
You could code a ton of fairly decent games, utilities and even full applications in BASIC. While that's theoretically possible in Scratch, it's a lot more cumbersome. Scratch feels more like a puzzle game than a real programming language. BASIC, especially the later, better dialects, could do it all. With 2 very understandable lines:
10 PRINT "glimshe rulez!"
20 GOTO 10
You could teach that the computer is under your command and you can ask it to do work for you nonstop. It teaches a bit of I/O, program sequence and loops. No stupid "main" functions, indentation nonsense, cryptic library includes or cumbersome drag-and-drop. The simplicity of the code above is one of the treasures of computing history. 90% or more of humanity can quickly understand these two lines and I super disagree with Dijkstra about BASIC.
It was at the same time a teaching tool and a professional programming language (although, arguably, not amazing at that).
ryoshu•6mo ago
DonHopkins•6mo ago
https://snap.berkeley.edu
Snap! 5 is here (snap.berkeley.edu):
https://news.ycombinator.com/item?id=20309162
>One of the coolest ways to learn programming I've ever seen is the Snap! visual programming language, which is written in JavaScript and runs in the browser. https://snap.berkeley.edu
>It's the culmination of years of work by Brian Harvey and Jens Mönig and other Smalltalk and education experts. It benefits from their experience and expert understanding about constructionist education, Smalltalk, Scratch, E-Toys, Lisp, Logo, Star Logo, and many other excellent systems.
>Snap! takes the best ideas, then freshly and coherently synthesizes them into a visual programming language that kids can use, but is also satisfying to professional programmers, with all the power of Scheme (lexical closures, special forms, macros, continuations, user defined functions and control structures), but deeply integrating and leveraging the web browser and the internet (JavaScript primitives, everything is a first class object, dynamically loaded extensions, etc).
https://news.ycombinator.com/item?id=18497883
>Alan Kay wrote some interesting stuff about some of the inspirations for "Tile-" and "Block-Based Programming", like "Thinkin' Things", in a discussion about the Snap! visual programming language! https://snap.berkeley.edu
>From: Alan Kay Date: Thu, 3 May 2018 07:49:16 +0000 (UTC) Subject: Re: Blocky + Micropolis = Blockropolis! ;)
>Yes, all of these "blocks" editors sprouted from the original one I designed for Etoys* more than 20 years ago now -- most of the followup was by way of Jens Moenig -- who did SNAP. You can see Etoys demoed on the OLPC in my 2007 TED talk.
>I'd advise coming up with a special kid's oriented language for your SimCity/Metropolis system and then render it in "blocks".
>Cheers
>Alan
https://news.ycombinator.com/item?id=38016554
>I'm also a huge fan of Snap!, which has all the advantages of Logo (Lisp without parenthesis) and Scratch / eToys / Squeak / App Inventor family of block based visual programming languages, but all the power of Scheme.
>If you know Scheme, then it's easy to think about Snap!: it's just Scheme with a visual block syntax, but with some functions renamed to make them easier to learn, plus all the stage and turtle graphics stuff from Scratch, running in a web browser!
>I didn't realize until watching in amazement as Jens Mönig used his own creation, that it also has full keyboard support, so you can create and edit programs without using the mouse!
>It's much easier to teach Scheme to kids by teaching them Snap!, because the user interface is so much better than a text editor.
hakfoo•6mo ago
firesteelrain•6mo 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.