Worms?

From C64-Wiki
Jump to navigationJump to search
Worms?
Title screen of the game
Title screen of the game
Game No. 557
Voting 6.00 points, 1 votes
Developer David Maynard, Steven Hayes
Company Electronic Arts
Publisher Electronic Arts
HVSC-File -
Release 1983
Platform Atari 400/800, C64
Genre Worm/Snake, Simulation
Gamemode Single player
up to 4 players (simultaneous)
Operation Keyboard
Media Diskette
Language Language:english
Information Released in Europe by CRL in 1987 under the name "IQ"


Description[edit | edit source]

In the game "Worms?" — later re-released under the title "IQ" — up to four colorful worms compete to claim the largest possible portion of a game board (divided into an 18×18 grid of hexagonal tiles) for their own color. The task for each of the up to four players is to prepare their worm as well as possible for this competition through appropriate training. The goal of the training, however, is not endurance or strength, but rather learning the rules that will dictate how the worm navigates the board during the actual competition. Training data for individual worms can be saved to disk and reloaded later in any quantity, allowing particularly successful specimens to compete in tournaments.

A game demo starts automatically on the title screen after a short while
Four worms compete against each other using the demo training routine found on the game disk
With the right training, the worms' movements are a delight to watch



Background[edit | edit source]

The game's backstory can be found in the manual:

When David Mynard wrote his first program back in 1965, computer games were played in climate-controlled warehouses with decks of punch cards. The computer he used required enough power to turn the USS Nimitz into a headwind. It was a few years before David sat down at an Atari 800 to write his first computer game.

What came out was a game with no alien ships to blow up, no dots to eat, and no animated apes to outwit. It's a game that doesn't talk down to the player. Or, for that matter, to the computer.

"When I entered UC Berkeley, I was a physics major, because there was no computer science department. In 1972 I worked on the first office automation project at Stanford Research Institute and wrote programs for the first mouse-based user interface."

Why WORMS?

"In late 1979 I was leafing though an issue of Scientific American when I ran across the Mathematical Games column written by Martin Gardner. In it he recounted the work of scientists at Cambridge and MIT who were investigating the patterns created by an idealized mathematical worm. Gardner was suggesting these worms as a novel way of teaching geometry.'

But it gave me other ideas."

Design[edit | edit source]

During the game, the playing field is visible in the top 20 lines of text on the screen. Initially, it consists merely of a regular grid of white dots marking the centers of hexagonal grid cells; later, more and more trails appear between these centers, each in the color of the worm that traversed that particular path.

The names and status of the up to four worms are displayed at the bottom of the screen. If the game is paused, the function key assignments — used to initiate the next steps — are also visible.

Sound[edit | edit source]

The game features a continuous background melody consisting of a sequence of randomly selected pitches ranging from c (130.8 Hz) to a" (880 Hz), played in rotation across the SID chip's three sound generators. An example of a melody generated in this manner can be found in the "Theme" section. This accompaniment is interrupted only when a worm dies, at which point a short, distinctive three-voice squeak plays (see the figure below).

Sound sequence upon the simultaneous death of two worms (2.655 s),
red: SID tone generator 1, green: tone generator 2, blue: tone generator 3



Hints[edit | edit source]

The goal of the game is to train a virtual worm so that it can subsequently win a competition against other players' worms or prove superior in a contest against one's own worms trained using different methods. A worm wins this competition by navigating the game board according to the rules it learned during training and coloring as many squares as possible in its own color by drawing a sixth — and final — trail through them.

The game is accordingly divided into two phases: In the first phase, the player interactively trains their worm by teaching it rules for movement in various game situations. The knowledge accumulated by each worm can be saved to disk, reloaded later, expanded if necessary, and finally put to use.

In the second phase, between one and four fully trained worms enter the arena and compete — without intervention from their "owners" — to claim the largest possible portion of the playing field. Whenever a worm runs into a dead end (i.e., a grid square with no exit path), it dies and is eliminated from the game. Once all participating worms have been eliminated, the results are displayed and compared.

The player does not need to manually switch between the two game phases — training and competition. Instead, the training phase continues as long as the worm encounters unfamiliar situations and requires intervention from its "owner". Once a worm can navigate every situation on its own, however, it is ready to compete against other similarly skilled worms.

Screen Layout[edit | edit source]


Typical scene from the game



Controls[edit | edit source]

A typical training and competition sequence usually begins with a completely untrained worm, which can be assigned the name "NEW". The easiest way to handle competitors during this phase is to deactivate them by assigning them the name "----", effectively putting them to sleep. The following functions are available for this purpose:

  • Pressing the L  key loads the training status of the currently selected worm from disk. The command must first be confirmed by pressing the RETURN  key; pressing any other key cancels the operation. Next, enter the filename (maximum 4 characters) under which the desired training state was saved, and press RETURN  to confirm.
  • Pressing the S  key allows you to save the current training state of the active worm to disk. This command must also be confirmed by pressing RETURN  before entering a filename (up to 4 characters) for the file to be created and confirming it with RETURN .
  • F3  cycles through the four worms. The currently selected worm is indicated by a colored bar beneath its name. Later in the game, the worm waiting for instructions from its trainer is marked in the same way.
  • F5  changes the training state of the currently selected worm. The available options are "NEW" (an untrained worm), "AUTO" (an untrained worm that automatically learns its rules from the computer during gameplay), "WILD" (a worm fully trained with random rules), and "SAME" (the worm used in the previous competition). If the worm in question should not participate in the next competition, it can be deactivated using the "----" setting.
  • F7  starts the training session or the competition.

During a game, the speed of the worms can be set using the keys 1  through 9 , where "1" is the slowest setting and "9" is the fastest. RUN/STOP  pauses the game; pressing the same key again resumes it.

Training[edit | edit source]

The following illustrations demonstrate the typical start of a training session, beginning with a single, completely untrained worm:

  • The white dots filling the game board at the start represent the centers of hexagonal cells. At the start of the game, all participating worms are located in a cell at the center of the screen and begin moving — taking turns — to an adjacent cell (horizontally, or diagonally up or down, to the left or right). As they move, they leave a trail in their own color along the path taken; upon entering a destination cell, they also recolor any existing trails within that cell — those leading to further neighboring cells — to match their own color. If a worm draws a sixth and final trail into a cell, it claims that cell and is awarded a point. Only paths to neighboring cells that do not yet have a trail can be traversed. Consequently, the range of possible moves decreases as the game progresses. If a worm maneuvers itself into a dead end — for instance, by drawing one of the last two possible trails into a cell at the same time as a competitor — it dies and is eliminated from the game.
  • In the first animation of the gallery below, the worm to be trained is on the initially completely empty starting square and does not know how to behave in this situation. By repeatedly pressing the SPACE  key, the player rotates the worm — which is now blinking like a cursor — to face the direction in which the creature should move in such a situation: diagonally up and to the right. Pressing a letter key confirms this choice, and the worm moves one square diagonally up and to the right. It has also learned Rule 1: Starting from a completely empty square, one must move diagonally up and to the right.
  • Now, in the second animation, the worm stands on a square entered by only a single trail (the one it just created itself) coming from the bottom left — and it knows no rule for this situation. Since the player likes the direction proposed by the blinking worm — horizontally to the right — they simply confirm it again by pressing a letter key: The worm moves one square to the right and has learned Rule 2: Starting from a square entered by only a single trail from the bottom left, one must move horizontally to the right.


Rule 1: From the empty starting square, the worm should move diagonally up and to the right.
Rule 2: From a square entered by only a single trail from the bottom left, the worm should move horizontally to the right.


  • Only a single trail leading horizontally from the left enters the square where the worm is now located: a situation unknown to the worm, in which it waits for an instruction from its "trainer". Here, too, the player agrees with the proposed movement horizontally to the right and confirms it by pressing a letter key. Once again, the worm moves horizontally to the right, having also memorized Rule 3: Starting from a square entered by only a single horizontal path from the left, one must move horizontally to the right.
    Since this rule also applies to the next square and 14 subsequent ones, the worm — relying on the knowledge gained during training — continues moving autonomously until it encounters a situation it does not recognize.
  • The worm has stopped on a square entered by a total of three paths: two horizontal paths (from the left and right) and one path coming from the bottom left. Here, too, the player agrees with the direction suggested by the flashing cursor and, by pressing a letter key, defines Rule 4: Starting from a square with two horizontal paths (left and right) and an additional path from the bottom left, one must move towards the top right.
    The worm then finds itself on a square entered by only a single path coming from the bottom left. The previously learned Rule 2 applies to this situation; the worm follows it and moves horizontally to the right onto the next square.
    Because only a single horizontal path from the left enters this square, Rule 3 applies — and the worm follows it 16 times in succession.
    Next, Rule 4 applies to the square reached, followed by Rule 2, and then Rule 3 several times — the worm is unstoppable until it has traversed the entire screen and finally stands, baffled, on a square entered by two paths: one horizontal from the left and another from the top right. Only the trainer can help here!


Rule 3: From a cell entered by only a single path horizontally from the left, the worm should move horizontally to the right again.
Rule 4: From a cell entered by three paths (two horizontally from the left and right, and another from the bottom left), the worm should move diagonally up and to the right.
If the player had assigned "horizontally to the right" for Rules 1 and 4, and "diagonally up and to the right" for Rules 2 and 3, the result would look like this:


As soon as the worm returns to the starting point during such an individual training run and gets stuck in a dead end, the training progress achieved so far is saved, and training continues with multiple worms that generate additional, previously unknown situations.

Wettkampf[edit | edit source]

The following two animations show examples of the results of individual training runs for two worms, "One" and "Two". Both return to the starting cell after some time and end up in a dead end; worm "One" covers 72 cells beforehand, making it twice as successful as worm "Two", which has to settle for 36 cells.

Result of an individual training run for worm "One"
Result of an individual training run for worm "Two"


Training the worms is based on the individual instructions listed below; for the sake of conciseness, these are presented using icons representing joystick movements (three dots indicate phases during which the worm moves autonomously):

  • Wurm "One": Joystick right forwards Joystick left forwards Joystick left Joystick right forwards ... Joystick left forwards ... Joystick left forwards ... Joystick right backwards Joystick right forwards Joystick left forwards Joystick left Joystick right forwards ... Joystick right backwards Joystick right backwards Joystick right forwards ... Joystick left backwards ... Joystick right Joystick right backwards ...
  • Wurm "Two": Joystick right forwards Joystick left forwards Joystick left backwards Joystick left forwards ... Joystick left Joystick right backwards Joystick left backwards ... Joystick right Joystick right forwards ...

The following two animations show a competition between these two worms (after they had learned to handle additional situations that arose only during competition, not during individual training). It becomes evident that the resulting patterns depend heavily on which worm moves first. In the animation on the left, one can clearly see the two worms applying their previously acquired knowledge, whereas in the animation on the right, they disrupt each other's strategies. Interestingly, in both cases, "Two"—the worm that performed less well in individual training—proves to be more successful.

Competition between worms "One" and "Two"; worm "One" moves first
Competition between worms "One" and "Two"; worm "Two" moves first



Tips[edit | edit source]

  • Since rules established during training cannot be changed later, it is advisable to save your progress periodically; this prevents you from having to restart the training with a completely clueless worm after making a wrong decision. To do this, briefly pause the game by pressing F7  while the worm is moving on its own. Alternatively, instead of pressing a letter key to set a new rule, press F7 ; you can then save your training progress.
  • The outcome of a competition between several worms depends heavily on the starting order—that is, on the color of each worm. In a fair "tournament" designed to compensate for this effect, the same set of worms therefore competes against one another multiple times from different starting positions.

== Solution ==The game has no single solution; rather, the journey is the goal: the pleasure of traversing the playing field more successfully than one's competitors by using appropriate rules, or the fun of having one's worm—or worms—trace particularly beautiful patterns. And when competing against rival worms to find the most successful strategy, there is likely no clear ranking; instead, for any currently successful approach, one can devise a tailored set of rules under which that very worm performs particularly poorly.

The following animations show the shortest possible game, and—in the case of a single worm—the longest possible game, consisting of 972 moves.

Shortest possible game for a single worm:
9 moves, 1 point...
... and with three worms involved, it goes even faster, of course.
Longest possible game for a single worm:
972 moves, 324 points


The animation on the right in the gallery above is based on the following training: Joystick right Joystick right backwards Joystick right ... Joystick left backwards Joystick right ... Joystick left Joystick right backwards ... Joystick left backwards Joystick right ... Joystick right ... Joystick right ... Joystick right backwards ... Joystick right ... Joystick left ... Joystick right forwards ...

Cheats[edit | edit source]

A cheat makes little sense for the game "Worms?", as it is not a battle against computer-generated challenges, but rather a competition to devise the cleverest strategy.

Internal Data Structures[edit | edit source]

Even though it makes little sense to manipulate the game "Worms?"—for instance, to develop a trainer—analyzing the program's internal workings can be instructive. Of particular interest, of course, is the way the individual worms keep track of their "training status".

The program stores each worm's strategy — both internally and on disk — as a table containing 64 entries, with one byte per entry. It assigns a number between 0 and 5 to each of the six possible directions of movement, starting with "horizontal to the right" and proceeding clockwise. Thus, if a worm needs to memorize the rule "move horizontally to the right" for a specific situation, the number 0 is stored at the corresponding table location; a 1 represents "move diagonally down-right," a 2 represents "move diagonally down-left," a 3 represents "move horizontally to the left," a 4 represents "move diagonally up-left," and a 5 represents "move diagonally up-right." Every decision made by the trainer overwrites the initial default value of 241 (hexadecimal $F1, indicating "worm does not recognize this situation") with the specified direction.

To determine which of the 64 table entries stores this specified movement direction, the situation encountered by the worm must be converted into a table index. To achieve this, each existing trail in direction n within the current cell is assigned a byte in which only bit n is set and all other bits are cleared. Mathematically, a trail in direction n therefore has the value 2n (see diagram on the right). The specific table entry corresponding to a given cell situation is ultimately calculated by summing the values ​​of all existing trails. For instance, if the worm is to learn to move horizontally to the left upon reaching a square that already contains trails leading up-right and down-right, the up-right trail corresponds to direction 5 (value 2⁵ = 32) and the down-right trail to direction 1 (value 2¹ = 2). The worm's newly acquired knowledge is thus stored in the table at position 32 + 2 = 34; since the desired action — moving horizontally to the left — corresponds to direction 3, the number 3 is saved at offset 34.

An untrained worm begins with a table filled with the value 241 (representing "no direction learned"). Only those table entries corresponding to situations with a total of five trails (and thus only one exit, leaving no choice) are initialized with the single possible direction of movement from the start. Consequently, at the very beginning of the game, offset 31 (corresponding to the situation where the only untraversed path leads up-right) holds rule 5 (the instruction to move up-right); similarly, offsets 47, 55, 59, 61, and 62 are initialized with directions 4, 3, 2, 1, and 0, respectively. The final table entry at offset 63 (corresponding to the situation where no exit is available) encodes this state with the value 243 (hexadecimal $F3).

Votes[edit | edit source]

Voting of the C64-Wiki users (10=the best vote):
6.00 points at 1 vote.
You need to be logged in to cast a vote.
Lemon 64 6,88 June 23, 2026 - 8 votes
Zzap! 64 84% (Presentation 84%, Graphics 61%, Sound 62%, Hookability 80%, Lastability 73%, Value 68%) Issue 27 (July 1987)
Your Commodore Originality 10/10, Graphics 4/10, Playability 6/10, Value 5/10 Issue 34 (July 1987)
Tilt Intérêt 18, Graphisme 3/6, Animation 4/6, Bruitage 6/6, Prix B N° 44 (Octobre 1987)
Electronic Fun with Computers and Games 3/5 Vol. 1 No. 11 (September 1983)
Rombach 8 September 1984 - "Verdict 2"

Critics[edit | edit source]

Stephan64: "Worms? is a simulation that is highly interesting from a computer scientist's perspective and also visually appealing. Those expecting a classic computer game and looking forward to its typical challenges might turn away in disappointment after only a short time; however, for everyone else, it offers surprisingly varied gameplay despite its very simple underlying rules. It is astonishing that Electronic Arts entered the computer game market with, among other things, such an unusual program... 6 points from me."

Rombachs C64-Spieleführer: "A game for aesthetes who enjoy experimenting and pondering." [1]

Miscellaneous[edit | edit source]

Cover[edit | edit source]

The game's cover art can be found in the Wikipedia article about the game as well as on "C64 Games" (see External Links). It depicts a series of glowing worms winding their way through a three-dimensional grid structure. "C64 Games" also features an image of the back of the diskette packaging: it shows a young man sitting comfortably in a wingback chair by the fireplace, reading a magazine — completely unperturbed by the glowing worms approaching him from all sides.

Theme[edit | edit source]

Throughout the game, a three-voice melody plays continuously, varying in a randomized manner. The illustration below shows an example of such a musical sequence in standard musical notation. For creative reuse, the sheet music is also available as a PDF document (File:Worms Theme PDF.pdf) and in ABC music notation (File:Worms Theme.abc.txt).


Sample excerpt from the background melody, reconstructed by logging all write operations to the SID



The frequency parameters written to the SID registers during playback match the values ​​found in the SID datasheet; they are therefore based on a clock frequency of 1.000 MHz. Consequently, the melody sounds slightly lower in pitch than intended on the PAL version of the C64, and slightly too high on the NTSC version.

Video Recording[edit | edit source]


Images of the manual and a brief introduction to the game

Screenshot comparison[edit | edit source]

The "Worms?" and "IQ" versions differ only in the copyright notice on the title screen

Title screen of "Worms?" (1983)
Title screen of "IQ" (1987)



Trivia[edit | edit source]

The game's concept is based on an article by scientists Mike Paterson and John Horton Conway in the field of cellular automata. In it, the authors model the behavior of prehistoric worms grazing on a surface evenly covered with food, while avoiding paths they have already traversed (and thus already grazed).

However, the worms in this research paper move across an infinitely large surface. Furthermore, they make decisions about their next move by considering the state of their current cell relative to their direction of travel, meaning their decision rules take a slightly different form. Specifically, these worms have only 1,296 different strategies to choose from, whereas the worms in "WORMS?" can be trained in more than 11 quadrillion (precisely: 11,501,279,977,342,425,366,528,000,000) different ways.

Technical Details[edit | edit source]

The display runs entirely in single-color text mode (screen memory starting at address $0400, character set at $0800). Sprites are used for the blinking cursor when selecting a direction of movement and for the slow advancement of the worms into neighboring cells.

Highscore[edit | edit source]

A high score serves no purpose in this game.

Links[edit | edit source]

Wikipedia: Worms?
Wikipedia: CRL_Group
Wikipedia: Paterson's_worms
Wikipedia: Cellular_automaton
Magazine

Sources[edit | edit source]

  1. Oswald Reim, Martin Scholer: "Rombachs C64-Spieleführer", Rombach, 1984, page 394