A couple of years ago I helped make a variant on Wordle (same rules, copyright-free vocabulary) for the Nintendo Gameboy (you can play it online here), and I would play the official version. Since December, my hobby project has been reverse-engineering the computer built into my early 1990s HP 1653B logic analyzer/oscilloscope, and creating an SDK for programming it. Yesterday, I ported Davison's EhBASIC to it, and was trying out various games in Ahl's BASIC games book from the 1970s (1974 DEC version here), based on the EhBASIC ports here.
One of the games I tried last night was Word, credited in the 1974 version of Ahl's book to Charles Reid of Lexington High School. It turns out to have rules very similar to Wordle. It hides a 5-letter puzzle word (there are only 12 in its puzzle vocabulary) and asks you to guess a 5-letter word. Then it shows you which of your letters are correct and in the right position and gives you a list of all the letters that match regardless of position. Basically the same as Wordle. There is no limit on the number of guesses. Here it is running on my oscilloscope. The keyboard is a Mac Quadra keyboard connected via a home-made adapter to the scope's serial port.
Interestingly Word leaks information that Wordle does not. It generates the list of position-independent matches in the array P by the following nested loop where S is the correct solution and L is the user's input word.
The outer loop goes over the letters in the solution S, in order from left-to-right, and adds the position-independent matches to P. Because P is then later printed as is, this means that you know the order in which the position-independent matches appear in the solution, which leaks information (e.g., if you were to put all the right letters in but in a different order, it would actually print the solution).
Furthermore, if the solution has n repeats of a letter and your guess has m repeats of the same letter, then it will print that letter nm times, and you thus know exactly how many times the letter appears in the solution. Whether this is a bug or just an interesting mechanic depends presumably on what Mr. Charles Reid was thinking half a century ago. (Moreover, if nm>7, the program will crash, because only 7 slots were allocated in the S array. But I think there is no combination of words in game's 12-word vocabulary and English five-letter word that will result in more than 7 slots being occupied.)
UPDATE: I've been scooped. And you can play the original game in your browser.
No comments:
Post a Comment