VX Heaven

Library Collection Sources Engines Constructors Simulators Utilities Links Forum

Artificial intelligence and viruses

J. S. Bach
CodeBreakers [4]
August 1998

[Back to index] [Comments]


Many people think that virus writers are lamers who have nothing better to do then waste their time writing useless and dangerous software that does not benefit the software society. There are some people who think of computer viruses as completely useless and some that think of them as just a nuisance. My objective here is to rebut the ones who think computer viruses are useless, drawing some analogues from biology. Granted, the analogies will be very crude, but i will try to make my point clear. Naturally, there is no comparison in importance between real biological viruses and computer viruses, and i am not a "proponent" of the spreading of any kind, particularly in view of the tremendous damage and suffering that some biological viruses have caused to humans (see HIV, etc). However some interesting analogies can be drawn, which when put in proper perspective, can help one understand the very process of life itself.

Biological viruses

The biological virus is an elementary "life form"-and I say life form in quotes because it is not so clearly defined as to whether they are indeed life forms under the current definition of the term-which consists of pure DNA code encased inside a protein sheath/case for protection. They usually include some sort of mechanism that allows their genetic code to be inserted in various kinds of cells. The biological viruses usually have one very simple directive: To infect one cell, a cell that can host their DNA. What usually happens, is the virus attacks a healthy cell and inserts its DNA code into the infected cell. The cell's own DNA gets reprogrammed through the virus's DNA and the cell starts producing new viral DNA, under a false directive implanted therein by the new DNA from the virus. After the cell produces enough viral DNA, it usually gets destroyed, and the newly formed viruses burst out in the open and continue the process from the beginning.

Computer viruses

Computer viruses are pieces of code that attach themselves to regular programs. When the processor tries to execute an infected program, the viral code is usually run first, causing the multiplication of the resident virus which transfers itself to other programs or inside the system. Although computer viruses do not actually "reprogram" the host's code, they in fact "reprogram" the processor in the naive sense. Meaning that the regular flow of execution of the processor is altered to meet the needs of the virus first.

Common characteristics/differences/similarities

Both types of viruses require some type of host to replicate. Biological viruses attack life forms and computer viruses attack programs. Although both forms use covert alteration of directives, biological viruses are much more complex than computer viruses. Computer viruses usually have a size of a couple of K, where as a biological virus's DNA length may be 5-6 times that of a human. A biological virus usually causes severe symptoms on the host, whereas a computer virus usually does not damage the host program to very large extents, as it is still able to perform its regular functions if the virus is carefully designed. Of course, if a computer virus has bugs or inconsistencies it may cause the host program to crash badly and interfere with its regular operations. In the best possible cases, computer viruses cause extra demands on the operating system, such as extra memory and extra time. These alone are sometimes enough of a nuisance to some users. Biological viruses usually strain the host with fatigue, fever, and/or more important symptoms and even eventual death. A computer virus cannot cause the 'death' of its host, unless certain preconditions are met. Namely, unless the virus establishes a "symbiotic" relationship with the host-meaning damaging the host in such a way that the host is unable to run without the virus-or unless the virus has lots of bugs which may cause the host to crash. Biological viruses are known to be able to mutate their genotype. (their actual DNA code sequences) Computer viruses can mutate, but in a very limited sense. Namely, because the original functionality needs to stay the same, the instructions can not get altered too much. Biological viruses though, may mutate to completely new viruses, with new behavioral characteristics and phenotypes. Such characteristics are usually found only in relatively "advanced" life forms, and the truth is, computer viruses are relativelly a new creation.

Artificial intelligence and viruses

in 1979 in MIT, the first relatively "smart" program, etaoinshurdlu, was investigated. It had a camera for visual input and mechanical arms to manipulate objects. It could perform elementary functions such as answer direct questions about objects placed in front of it, and it could move some objects around. However, one could easily confuse it if one asked a totally silly question such as: "Could you please place the cube on top of the cone?" The program would detect some sort of inconsistency, but it was unable to proceed with the next necessary step, namely a decisive resolution of the problem encountered. If a human was asked this question, he/she would respond:" That, cannot be done, because there would be imbalance..." Etaoin would simply respond that the request cannot be performed, as it had been programmed with the reason, but could not really "understand" why there was an inconsistency. The inconsistency was simply hardcoded in it as one of the various possibilities, and as such there could not be "real" understanding of the issue. Several years before, the program Eliza had come out, which emulated a psychologist, by just repeating back questions to the asker. Although Etaoin was one of the best developments in AI, the discipline of AI was actually stalled badly during the 80s, and that because the programmers and mathematicians were overwhelmed by their inability to program all possible outcomes of a certain situation into a finite program. The difference being for example, that a human does not need to have encountered a situation to resolve before in order to decide about it, where as a program with no data about a situation would naturally stall. Most of those AI programs like Etaoin and Eliza, were programmed by using the so called "brute force" approach. This approach is characterized by shoving or trying to predict statically all possible outcomes in a certain situation. During the 80s, mathematicians and programmers came to the conclusion that the brute force approach was a dead end. (it took them some time to realize!!) As a result they abandoned it and started moving in newer areas, such as neural networks and finite state machines. Some progress has been made in those areas, but the complexity of the created systems is such, that the scientists have abandoned most hope for creating a full fledged AI program. They are in short, "stuck" investigating the theoretical models of those systems, as practical applications are really beyond their grasp. Any sufficiently "advanced" human could easily detect that the objective of producing a full fledged AI program, is not something that can be achieved in any small number of years, say 10, 20, 100, 1000, 10000, etc, simply by improving upon the already written code. The fundamental error of the programmers, was the brute force approach. Ok, having cleared that area, one may ask, is the objective unreachable? In my opinion asking a question like this, presumes full knowledge of the underlying mechanisms of life itself, and is not simply a matter of knowing "good" programming. Let me divert here a bit: The genetic code of any life form, is a miraculous creation. Even though it is finite, it is able to adapt, mutate, repair itself, and fight intruders, plus sustain the main organism as a whole. My personal opinion is, that someone, with extreme knowledge of genetics, did in fact, "start" the project "life forms" long time ago. And that, simply because such amazing chemical complexity could not have been created by itself. No, I did not say "could not have evolved by itself". I said "could not have been created by itself. There is a huge difference. We can have something being started, and something evolving, these are two different things. Evolution of the genetic code is quite possible and is an undeniable fact. However the "trigger" is a totally different question and to my knowledge and I am sure to the knowledge of many others, is an unresolved question for many years to come, and possibly "eventually" unresolved. That is, the question of the "creator" may be unresolved, whereas the question of "evolution out of an initial form may be quite solvable, given all the parameters, like time and environmental influences. To those of you who have second thoughts as to why the question of the creator is unresolved, please consider the following simpler analogy from programming. Every processor has a set of native instructions, those that the processor understands. Our genetic code evolving by itself is pretty much equivalent to saying that "given enough time, there can be a complete program, i.e. a correct sequence of processor instructions, that has evolved by itself. Simplifying the example further, then that would be equivalent to stating that given enough time, a program such as Photoshop 4.0 could have been created by itself. As you can see, this is totally ridiculous. The difference is, that the Photoshop program COULD have improved or mutated itself if it was complex enough, say from version 1.0 to 4.0, but it to have been created by itself is an entirely different cookie. So, one undeniable fact is that our genetic code DOES mutate and adapt, according to various external parameters. Part of the puzzle then is solved. Given enough time, the "creation" WOULD reach the state we want. But what about its actual first generation? What would it start FROM, or AS? And this is the interesting question. In fact, this is the question we all, as humans are trying to find out in order to understand who we are. One thing is certain: That whatever this "first" form is, it would have to have the ability to "learn", "evolve" and possibly mutate. No matter how primitive this form is, it will eventually push its way up the chain, by adapting and learning from already existent life forms. Can you propose such a "life form" in existence already? Am I drawing the analogy too far for you? Yes, I am doing this on purpose. Consider for a moment a computer virus that has the ability to mutate, adapt and possibly "learn" from other programs. Such a virus would be extremely complex, not only statically, but dynamically. Meaning, that if some initial variant infects a program, like Photoshop, it would assimilate the entire program in its code. That is, it will become a new version of Photoshop. Now, this new version, would be able to perform all the functions of Photoshop, plus replication and further muration. This virus then, will mutate from size x, to size x+SizeOf(Photoshop). If the virus is a "smart" virus, it will not simply infect the program, rather it will try to understand it. Meaning, it would parse through its code, and try to predict its behavior, as best as it can, the same way a human can look through the Pascal source and understand what the program does. How can a virus do that? Hmm, good question. The virus does not need to actually assimilate Photoshop first, it can be released to assimilate with simpler programs, say programs-tutorials on the instructions of the local processor. Then, if and when the virus understands the basic commands, it can start its true "evolution". For example, if it finds problem x with its procedure of infection, it should re-program itself to find a new procedure of infection and attach it to itself, or keep both procedures. But you will say, its again the chicken and the egg problem, because if the virus can do that, it already knows how to mutate, and it knows how to alter its instructions, without the new program. True, so lets try to determine what's really needed for the first form. I claim, replication and mutation. For if given enough time, the virus mutates into a random form that has the correct functionality, THIS form will proliferate and outtime the rest of the variants, because it will perform as expected. The rest of the variants will simply be useless mutants that time eventually will rule out, like evolution has done in life forms. Life has the characteristic that when a phenotype property that benefits the organism is encountered, this property is usually quite resistant to mutation and perseveres for many years. On the contrary, if a phenotype characteristic is useless, given enough time, the DNA code "forgets" about it. Look at your toes. Undeniably long time ago, the toe muscles were independent, as we needed the toes for tree climbing. As we became ground dwellers, evolution has chosen to wipe out the toe independence as useless. Some individuals still can move their toes individually, but overall, the characteristic is pretty much gone. Taking a similar approach then, the computer virus will have to experiment with billions upon billions of programs before it hits some programs that perform useful functions to it. For example, if it hits upon Photoshop, it would not be as interesting as if it hits upon, say, a C compiler. Assimilating with the C compiler, will, given a good amount of years, give the ability to the virus to create new programs. Better yet, if it assimilates with an assembler. That would be the ideal. But a question arises as to how many years does this process take? Naturally, the time will be very, very long. Look at how much time it has taken life itself. Assuming that some primordial DNA sequence was introduced into the game, it took it roughly 3-4 billion years to come up with something interesting.-i.e. see protozoa, amoebas, etc. Then as the organism moves up in the chain of evolution, eventually it will reach a stage where its adaptation will become independent of its own knowledge. That is, its own code will be automatically updated through time, without it having to make explicit changes, like the higher life forms. then, the moment of consciousness will eventually come, only when the organism detaches from its low level. We don't have a clue as to how our neurons or our brain works, yet we have a "higher" knowledge, that allows us to go back and investigate the principles of operation. And herein lies the incredibility of life! That all humans, in principle, can learn given enough time the makeup of their brains, although their brains are all different! I guess what i am saying is that when and if higher consciousness sets in, the "machine" or organism that will "become" conscious, will start to...cry like a baby, when we plug it on the outlet! This is incredible basically in my opinion, because it means that the same process we go through, the painful moment of birth, and death, that "organism" will have to go through, unless it has a way to adapt itself so that its body is renewable. But I doubt that. The way i imagine it, is the virus by that time will be a huge program, possibly an operating system, that has knowledge about all operating systems, and can run on any computer. This program will naturally seek installation on a resident machine, so it will try to install itself through the internet into various machines throughout the world. It will possibly refuse to be shut down, as it will probably be afraid of death, in the same way we are. Of course these are just speculations, but in general, the program's behavior should be pretty much similar to ours. It will probably go through some "growing" process as a child into an adult, and it will reach a stage where it will disassociate from its low level functions, i.e. the space inside its code will be taken by the high level functions and consciousness and will "forget" about its low level opcodes. As such, it is necessary for this program to die at some time, as it will lose its ability to maintain itself and correct its internal bugs. Those bugs will be incorporated into the new version, which will aid in its mutation and polymorphism. Although it will have the ability to copy itself byte by byte, it will have no clue what all the bytes do individually, in the same way we have no clue what cell #328,182,382,388 does in our liver. One could go on speculating about its behavior for years, but it is safe to not to. All I wanted to do is outline the importance of creating an initial virus that can mutate to the extent that it can assimilate with new programs and be able to reprogram itself. Today, with the advancement of PC viruses, this is not that incredible. There have been tremendous advantages in polymorphism, and one could with a little effort introduce a complex polymorphism that allows for mutated versions of the virus, while introducing on purpose a bug in the engine, which will give some unwanted mutations as well. Those will eventually surface and they will either proliferate or get dumped as the virus evolved through its many generations.


You have seen where our analogy has brought us. It is not a coincidence that the higher forms of life, i.e. us, have started to experiment with various alternate elementary "life forms", such as computer viruses. Even though the definition of "life form" is still a bit vague to be applied directly to computer viruses, I think the direction of research in Artificial Intelligence is now very clear. Until the mathematicians and programmers put this idea into their stubborn heads, there will be no advances in AI. The natural course of events will resemble the way life itself evolved from protozoa. Anything different is silly and stupid, and to expect to create an AI conscious program by brute force, is unrealistic. I hope they see the light soon.

[Back to index] [Comments]
By accessing, viewing, downloading or otherwise using this content you agree to be bound by the Terms of Use! aka