Darwin (programming game)

from Wikipedia, the free encyclopedia
IBM 7090

Darwin was developed in August 1961 by Victor A. Vyssotsky , Robert Morris Sr. , and M. Douglas McIlroy at Bell Labs on an IBM 7090 mainframe computer and is considered the first programming game . It was played only a few weeks before Morris came up with an "ultimate" program that couldn't be defeated. The original version of Darwin is no longer preserved. Variants for IBM / 360 systems appeared later . From the 80s there is only one new implementation of GA Edgar for Zilog Z80 CP / M systems, also as a compilation for the Mac. Core War picks up on Darwin's game idea and implements it with a virtual machine.

description

The game consisted of an umpire program and the arena, an area of ​​main memory into which two or more small programs written by the players were loaded. The programs were written in 7090 assembler and could use three library functions of the referee program:

  1. probe: probing a memory cell in the arena to determine whether and, if so, which program is loaded there.
  2. claim: Reserve a storage area in preparation for replication.
  3. kill: killing an (opposing) program.

The game ended after a predetermined playing time or when only copies of a program were left. The winner was the player with the most copies.

Up to twenty memory cells of a program could be marked as protected. If any of these memory cells were probed by another program, control flow immediately passed to the probed program. This program then continued to run until it probed a protected memory cell again, and so on.

The programs were responsible for their replication themselves, but were not allowed to change any memory cells outside of the reserved memory area without the permission of the referee program. The programs were not executed in a virtual environment, but directly on the computer, so rule violations could not be technically prevented. In order to ensure fair play and to learn from each other, the players instead made the source code of their programs mutually available.

The smallest program that could replicate, find and kill opponents consisted of about thirty commands. A shorter program by McIlroy was practically immortal because its source code fit completely into the protected area of ​​20 memory cells. It could find and kill opponents but could not reproduce.

The ultimate killer program developed by Morris consisted of 44 commands and used an adaptive strategy. After successfully locating a free memory area, it probed a cell with an offset just in front of it with the aim of killing the program there. If successful, it would remember the offset and use it for subsequent discoveries. If instead it hit a protected cell, it used a different offset the next time it was called. Replications were initialized with the successful offset. In this way, Morris's program could mutate into different variants, each of which was adapted to eliminate a specific opponent.

literature

Individual evidence

  1. Source code of Darwin80 , a variant of Darwin for Zilog Z80 CP / M systems
  2. Darwin 0.3 , April 16, 1987 by GA Edgar; accessed on June 3, 2017