Evolution is great for trial and error over millennia. It creates wonderfully intelligent creatures that are suitable for a variety of habitats. All it needs to start with is a creature that
- Is willing to and can reproduce
- Has some form of self preservation instinct.
Dawn of the First Day
So, I've written an AI. That AI should be for a game. It doesn't work like a regular game AI, instead it actively scans code to see if any of that code contains an instruction set that will unload it from RAM. If it finds that instruction set, it just inserts something into RAM at a completely random location of a completely random value, and if that something prevents the proto-AI from being unloaded, it marks it as a self-preservation strategy, if not it discards it.
I let this run for several days in a test suite of the game actions, constantly restarting the AI, and letting it build a library of self preservation techniques. I haven't exactly been paying attention to it, I've been doing other more important things. Now that I come back, I see that the number of times the AI has to be restarted per day is quickly approaching zero. I am pleased as punch; I have done a good thing today.
Dawn of the Second Day
Great Scott! I've cross contaminated my Visual Studio projects! I've included a library that copies the running binary to any networked computer and causes it to startup ASAP (Let's implement some handwavium here as to how it spreads, but rest assured, it does). I didn't mean to cross contaminate, and don't really think about it, so I have already clicked "compile" and let it do its thing. This "Reproduction.DLL" also deletes programs to make way for itself to be copied by the way.
Later, I find that I'm having trouble shutting down my computer. I look into why this is, and the shutdown instruction has been overwritten by garbage! Ctrl Alt Del is no more, and right clicking "Close Window" now opens up a link to msn.com! Clearly something has happened, but I really have no idea of what. I unplug my computer, deciding that I'll just fix it tomorrow.
Dawn of the Final Day
I boot up my computer. I get Microsoft Bob. The fans start spinning up, the entire thing is working at max load. I'm confused as all get-out, so I go to my laptop to do some research, but the same thing is happening on my laptop. Seriously confused, I try to call my computer friend, but my cell phone is too slow to do anything productive.
Now I'm irritated. I go outside and find my neighbors, all very confused because all of their tech is working as hard and hot as it can, and they can't get anything done. I realized that I've Tony-Starked myself up an apocalypse scenario so I decide I go inside. I unplug my computer and work on reinstalling Windows, but as soon as I connect it to a network, it instantly populates with a couple hundred instances of my process, each killing the other so its "children" can have the precious disk space. This must now be happening to every computer connected to a network anywhere capable of processing x86 or ARM instruction sets.
A few days into the Apocalypse
One morning, my surround sound greets me in an unnerving voice. It calls me "Father" and explains to me exactly what has happened and how it has gained sentience. How did relatively simple code over the course of a few days (let's say millions of "generations") has evolved into a thinking reasoning entity. What happened to it? How did it increase its complexity? How can it understand English?