Updating The Single Most Influential Book of the BASIC Era

8 Likes

Very nice! Here’s the repo, with some 90+ games, and the Basic originals tweaked to run in Vintage Basic. (BBC Basic would have been nice… that too is cross platform and with at least three ways to run in-browser too.)

It’s a bit topic-drifty, but a link within led me to a 1972 book, “Games playing with computers” by A G Bell. Notably, while it includes chess, there’s no lunar lander and no Conway’s Life. It’s fairly full-on - it’s not a book of type-ins, although it does contain some Algol code to solve chess mate-in-N problems.

Games Playing with Computers is an unconventional approach to teaching programming techniques, using games rather than the usual hackneyed numerical examples. The book is not theoretical: it deals straightforwardly with the progress of game playing with the aid of machines, from Babbage’s noughts and crosses machine to the most recent electronic machines which have reached county championship level in chess.

When run on an ICL Atlas computer the program can solve two-move mates in an average of about 45 seconds. Because of the table drive it is very easy to translate the program into other languages and run it on a variety of machines. The program was written in Atlas Basic Language which then took only 5 seconds on average; the CDC 6600 dialect of Algol (different card code and I/O statements are the main problem in this case), which took about 50 seconds; and finally in CDC 6600 Basic Language, which held the record at only 2 seconds per two-move mate. As the CDC 7600 is compatible to the 6600, and about four times faster, then the final program should solve problems almost immediately they are presented to the machine.

Elsewhere we see that this isn’t BASIC:

Atlas Basic Language (ABL) is a symbolic input language close to “machine language”. Each ABL instruction corresponds to one machine instruction…

4 Likes

Let us also mention What To Do After You Hit Return.

I started a repo here, but got distracted writing RetroBASIC to run them and haven’t returned. There’s a lot of overlap, as you might imagine, and these are in HP BASIC, but easily converted.

2 Likes

RetroBASIC looks like a fun project! It’s good to see someone still using lex and yacc (or flex and bison, as it were); those are how I learned parsing, although I think “real” compilers were already mostly recursive descent by that time.

Yeah I went with lex/yacc because I knew it was available on practically every platform, and the gnbasic bits were by far the most developed in spite of having zero documentation and a bunch of bugs. It was still easier to update that lex/yacc code than even the best-documented parsers I found in modern languages like Swift. Running is a feature!