Let's imagine a class of students in college studying computer science and learning programming, each student having his or her own computer. In the middle of the semester, the professor assigns them a new project: to develop a computer program, the sole purpose of which is self-replication. The following class period, the students arrive with their versions of the program. After reviewing the assignments, the professor asks them to alter their programs so they would launch the cloned program after replication.
The following lecture period consists of the same complaint from every student. With the altered program, the copies multiply too quickly, resulting in the loss of resources from their laptops and stalling because too many programs are proliferating too swiftly and consuming the hard drive, processor, and memory resources. To this complaint, the professor responds accordingly: alter your programs so that they stop executing after a fixed period of time, which should release some computer resources.
Once again, during the next class period, the students return with complaints. While it takes a bit longer, their computers are still running out of resources and the only way for them to get control back is to disconnect power. After some discussion, the professor tells students to alter their programs again. This time, instead of a simple replication, the programs must either insert or remove a random piece of code, a byte or two here or there, so the child program is no longer an exact copy of the original. The students must also write a second program that would delete programs that are no longer running from the hard drive. Though this is a bit more difficult of a task, the students are moving along in their studies, so they should be able to achieve this goal.
When next the class meets, a very different picture is seen. The programs of some students started and stopped almost immediately, and now they are afraid that professor is going to fail them because their programs failed. Some of students even tried to restart their programs; however they still failed after a period of time. Other students still managed to run out of resources on their computers and grew more frustrated, tired of removing batteries from their laptops. Then, there were the few students who got lucky and their laptops were still running along with their self-balancing ecosystem of self-altering and self-terminating programs.
Calming his students, the professor admits that he isn’t going to fail anyone in the class. He then collects samples of programs still running and puts them onto a specially designated server for the project with a high level of disk space, memory, and processor resources. He creates several virtual machines on the server and then launches those samples in each of the virtual machines he creates. Following this, he asks the students to split into working pairs and exchange programs. The project has grown more complex. The students are now to go home and alter their own programs, so that instead of pieces of code being removed at random, they would remove a number of bytes from themselves and then take just as many from a peer’s program. The professor asks his students not to get frustrated and that if the program fails on the first launch, try again and again until the program runs continuously.
The following lecture, the situation is much like it was during the previous one. Some programs failed no matter how many time they we restarted, others ate all the resources from the computer, but a few were running more or less steadily without dying off or consuming all of the host resources. Once again the professor collects sample program populations from the students whose programs were still running and puts them on newly created virtual machines on the server. As the class goes on, the students study the virtual machines from the previous lecture. Some of the systems collapsed due to resource consumption issue. Others sit idle because the programs stopped working. The programs that are still running though, those fascinate the students. The programs there appear and disappear within moments; there are many variations and none of them seem to appear to be the programs that were initially installed on the server. Some of the programs appear to be large in size while others are small. Some create new programs quickly; others sit there long enough for students to admire them before producing offspring programs and self-terminating.
It seems as though some programs do not terminate, while others die before producing child programs. The students discuss what they see and come to the conclusion that the systems that still run will die off soon because it appears that many of the variations of the programs are no longer self-terminating while still producing child programs. They come to conclusion that another alteration that needs to be incorporated into their initial programs is to prevent a chaotic code modification algorithm from altering the part of the code that is responsible for self-termination. Some students also suggest that since they are now pretty far into their studies, they may alter their programs to have a subroutine that would allow their program to terminate other currently running programs if there is not sufficient memory, disk space, or processor resources available. Some suggest that they will apply the same protection algorithm to preserve this functionality from being altered or deleted along with the self-termination logic. The professor gives the green light to his students to do any alterations to the original programs they want.