# What is a program in self-replicating programs?

I'm trying to understand the workings of artificial life as exemplified by systems like Tierra or Avida. The idea behind these systems is that organisms are modeled as assembly-language programs that replicate themselves in the memory of a computer, possibly a virtual machine. But here there is already something I don't understand (I'm not a programmer by vocation or by nature).

My idea of a computer's memory is that it's basically just a list of instructions. By default control proceeds from a given instruction to the next one in the list, but the instruction itself can send control someplace else. My question is: which sublists of this list of instructions count as programs?

Presumably the memory can be partitioned (in the set-theoretic sense) into a bunch of programs (actually copies of programs, since distinct "organisms" are allowed to have the same "genome"), plus some empty space; how does one do this?

• Imagine launching google chrome. Then launching another instance of it and so on. The programmer doesn't have to worry much about where his program ends, he doesn't have to worry about managing memory at all. That part is done by the Operating System. – Aayush Agrawal Jul 25 '16 at 14:39
• The operating system will eventually make an interrupt during the program's execution ('pausing it'), and resume some other program, and repeat. It shares processing time with itself and all the programs it's managing. – Aayush Agrawal Jul 25 '16 at 14:40

The computer's operating system keeps track of which pieces of memory make up which program. The partition into programs is entirely arbitrary, and the only reason a section of memory counts as program is because there is a specially designated piece of memory that keeps a list of all "programs" and their memory locations.

Adding on Tom van der Zanden's answer, for most existing artificial evolution systems (for sure Tierra) a program is a sequence of instructions subject to strict limitations.

• limitations to preserve the organism (program) structural integrity (cellularity-constraints in Tierra). E.g.

• each organism has exclusive write privilege to its own code;
• an organism can examine and even execute the code of another organism but NOT overwrite it.
• language level limitations. E.g. jmp instructions, when available, are somewhat restricted. For example Tierra uses a template (a sort of biological inspired pattern matching) instead of an absolute / relative address.

Constraints on the instruction set and on the structure of the organism are key elements in systems like Tierra or Avida since they concur to define what an organism is (together with the "list of all programs").

which sublist of this list of instructions count as programs?

"The entire list count as a program": usually a special machine language with a limited instruction set is used. It's studied to be less fragile to mutation and failures than a standard machine language.

Anyway errors that cause instructions to fail make them have no effect.