A tiny guessing game that appears to learn

Animal asks yes/no questions, guesses your animal, and adds a new question whenever it is wrong. This site recreates the classic line-based console experience rather than any one exact ZX81, magazine or BASIC listing.

Interactive console

Play the Animal guessing game

Answer with Y or N. Type HELP for commands.

ANIMAL.BAS 0 nodes
>

How the browser version remembers

Local memory, not server memory

When this version learns a new animal, it stores the updated decision tree in this browser using localStorage. That means the learned brain belongs to this browser profile on this device. It is not uploaded anywhere and it will not automatically follow the user to another browser, phone or computer.

The Export JSON and Import JSON buttons are included so a user can keep or move their learned brain manually. This is also a useful nod to the old home-computer habit of saving your current program state.

What it is not

Not a ZX81 emulator

This is deliberately much lighter than a machine emulator. There is no Z80 CPU, no ROM, no tape loading, no exact Sinclair keyword-entry system and no machine-specific BASIC implementation. The aim is to emulate the experience of the Animal guessing game, not the complete hardware or software environment around it.

Historical context

From BASIC listings to tiny learning games

The best-known BASIC tradition around Animal credits the original idea to Arthur Luehrmann at Dartmouth, with later shortening and modification by Nathan Teichholtz at DEC and Steve North at Creative Computing. David H. Ahl's BASIC Computer Games helped spread the listing culture that made programs like this portable across very different machines.

Later versions and adaptations appeared for home computers and magazine audiences. A Sinclair/Timex ZX81 adaptation of Guess That Animal by Ralph Kennedy appeared in Compute!, May 1983, and is especially interesting because it used the ZX81's save/reload behaviour to preserve learned data.

Site creator note

Remembering Animal through a ZX81 emulator on the Atari ST

Although our family owned a ZX81, I don't remember trying Animal on it. Much later, though, I came across it on a ZX81 emulator for the Atari ST, from the cover disk of Atari ST User Issue 63, May 1991. You can see the whole magazine here, courtesy of Atari Mania.

That is part of the charm of this project idea: Animal is not just a single program. It is a travelling idea from early BASIC culture, remembered through books, magazines, type-ins, cassette saves, cover disks and emulators.