Animal, The First AI?
Beat that, ChatGPT!
A popular BASIC game from the early 1970s was something called Animal. In it, the computer tried to guess the animal you were thinking of.
It started off by not knowing just one animal. It then asked you a question and made a guess. When it guessed wrong it asked you for a yes/no question that will help it differentiate your pick with its guess.
It then uses these questions to guess better next time.
It’s IF statements all the way down!
Here’s an example. Let’s say I’m thinking of a dog.
Computer: Does it swim?
You: No.
Computer: Is it a bird?
You: No.
Computer: What animal were you thinking of?
You: dog.
Computer: Please type in a question that would tell me the difference between a bird and a dog.
You: Does it bark?
Computer: For a dog the answer would be?
You: Yes.
Computer: Let’s play again. Think of an animal.
Computer: Does it swim?
You: No.
Computer: Does it bark?
You: Yes.
Computer: Is it a dog?
You: Yes.
Computer: I got it!!!!
And so on. You get the idea. Each time it guesses wrong it adds a Yes/No question that it can then ask to help it identify the animal. I jokingly call this an AI because in some ways that is how today’s AI systems that get all the buzz work. Sure, they are way more complex than this, but they essentially don’t really know what they have not been trained on.
By playing Animal you are training it about animals. Eventually it will guess one correctly if you happen to think about an animal that it already knows something about.
Anyway, with all this pre-amble I wanted to share a version of Animal that I wrote back in 1986 for the Atari 8-bit in BASIC XE. I didn’t create this version from scratch, I ported it from the book 101 BASIC Computer Games by David H. Ahl.
Looking back at the original, it seems I modified it as my version can save/load the data, but I don’t recall if I added that or this was based off yet another version.
It was always a trick to port standard BASIC programs to the Atari because it didn’t use the “Microsoft” standard and had many different commands. In particular, Strings and String arrays were completely different.
I chose to port it using BASIC XE because it was the best I had and it did do some things to help with the String differences.
Here’s a scan of the printout:
Notice the printout is using a rather odd font, which makes it a bit hard to read. Sorry about that. I believe this was printed using the “G:” driver, from ANALOG Magazine Issue 35, which let you use custom fonts and printed in graphic mode (and much more slowly) than using straight text. This did allow it to account for all the special Atari characters and inverse video.
This BASIC program is included in the perks available to paid subscribers.
Related posts: