Core War/Imp

From Wikibooks, open books for an open world
Jump to: navigation, search

The Imp is the simplest program that exists in Core War, consisting of one instruction:

MOV 0,1

The imp places focus on one task: survival. By continuously copying the current instruction to the next cell to be executed, it keeps it self alive simply by never encountering a DAT cell. If left untouched, it will eventually fill the entire core with the same instruction, causing other programs to become imps as well. However, under the rules of Core War, the Imp will never win a match - only draw it.

Since the Imp is a simple program, it can be countered. The basic method is to place either an "Imp gate" or "Alarm" that detects incoming movement. When it tripped, a nearby region is continuously bombed with a data instruction to prevent it from continuing.