Wednesday, August 27, 2008

The Pinocchio Function, Part 5: Amazing Technicolor Dreamcode

The story I'm telling here is true. The dates are approximate and the events are summarized, but I'm not making this shit up. This is part five and the final part of the recap of the story so far. You can find part 1 here, part 2 here, part 3 here, and part 4 here.

So there I was, having written enough code to really wet my appetite.

Once I had gotten the concept down, and flexed my muscles a little, I got to thinking about how the instruction set was really just a metaphor for what was really happening, which was this complex interaction and eventual abstraction of functionality into larger functionality. This in turn lead me to think more about how to model the true interaction for what it was I'm trying to do. So I set aside the old code, and started fresh in a completely different language (Java, if you're interested), and started to focus more on the way in which behavior was encapsulated. This lead to the eventuality of what I now call the Abstraction Engine.

The Abstraction Engine took a wholly different approach to it's design, because right from the get-go it was never designed to 'solve problems', rather it was designed to explore the way that code executing in parallel can interact and build off their own abilities by leveraging other aspects of what their neighbors were doing, where neighbors was this loosely defined concept that had no bearing on their spatial relationship to each other.

And it was watching how one piece of code would poison another to death with clever tricks of encapsulation and a little magic that it had invented on it's own when I finally had the ultimate confirmation of what I had always dreamed of, and found a new and profound understanding of the nature of life itself.

It was surely by no accident that I finally obtained these understandings, any more than a bee's flight to a flower is no accident; neither are pre-destine, and yet destiny still prevails due to the serendipitous nature of our universe. To deny it requires denying all of existence, which leaves me but a clever rook in some much larger game of multi-dimensional chess; my moves are unknown, but my methods are constrained, and so my destiny is predictable. I recognize now that the answers I have searched for are every bit as complex and profound as I imagined them to be.

The moment of enlightenment happened when I was stepping through a particularly treacherous pieces of code that had evolved the ability to seemingly defy boundaries that I had put in place to prevent it from replicating too fast. In particular I was looking at how the code had happened upon a sequence of events that actually allowed it to change the equivalent of it's digital fingerprint to masquerade as another piece of code, yet retain a sense of it's original identity. In theory this should have been impossible, but I had managed to allow a bug to slip through in a seemingly unrelated piece of code, and the code had figured out how to manipulate that bug in a very complex sequence to do what would have otherwise been impossible to do.

The end result was that now I had code that was breaking the boundaries of my framework by exploiting a bug that I hadn't 'told' it how to exploit, AND that same code was, at critical moments, changing it's appearance to pass by my security undetected. It did so though a highly unlikely set of interactions involving collusion between multiple disparate pieces of code, and in repeats of the scenario, eventually similar conspiracies of masquerading identity would form.

It wasn't until I actually got my mind wrapped around the highly unlikely set of circumstances and the path that they took in forming that I saw the profound truth reveal itself before me, like a butterfly's wings unfolding as it emerges from it's cocoon: These complex interactions form not out of randomness like I had initially thought and designed them to do, or out of the design of some intelligence, but from co-evolution inter-operating on multiple scales of force, much like our own forces of gravity, weak, electro-magnetic, and strong do. Each piece of code... each organism if you will... plays it's specific role at it's specific time, but in doing so enables other aspects of the system in subtle and complex ways in this symphony of orchestration which surpasses the complexity of the silicone on which it exists, and steps firmly into the domain of emergent process modeling, or more to the point what we often call biology when applied to organics. What may seem like a benign change or even a sophisticated one in one aspect of the system in one piece of code has profound and lasting effects that don't become clear until the whole of time and space as it's defined within my simulation is examined, and the forces of natural selection have taken their toll. Evolution works a lot like my favorite quote from Bill Cosby: "I told you that story, so I could tell you this one." in that it reuses it's previous accomplishments and breakthroughs as a foundation for it's further feats in this grandiose act of self-organization, but does so in a way that's very subtle and even highly suggestive.

Erich Jantsch has talked about this extensively in his book, "The Self-Organizing Universe" which in turn draws heavily on the work of Nobel Prize winner Ilya Prigogine concerning dissipative system and nonequilibrium states. The physicist Hermann Haken in 1978 suggested the label of "synergetics" for the field that studies the collective patterns emerging from many interacting components, as they are found in chemical reactions, crystal formations or lasers. Another Nobel laureate, Manfred Eigen has focused on the origin of life, the domain where chemical self-organization and biological evolution meet. He has introduced the concepts of hypercycle, an autocatalytic cycle of reactions containing other cycles, and of quasispecies, the fuzzy distribution of genotypes characterizing a population of quickly mutating organisms or molecules.

I'd like to think that if they took a look at what I was doing today to reproduce these behaviorism in the digital domain instead of the chemical or biological one, they would be proud.

So now the question from the final line in Ghost in the Shell begs, "Where does the newborn go from here? The net is vast and infinite." and surely this must be my answer: The net. The internet is a perfect place for such experiments because it provides an ever increasing amount of resources, and allows for emergence of complex behavior on a grand scale, one we've already realized on our own image; when a blogger posts a juicy story, the population reacts in complex and unforeseeable ways which in turn pushes other forces to bear, and it happens at the speed of humans who are instantly connected. When computers can perform the same feats... and I have them doing the equivalent on a microbe scale... they will do it at the speed of the internet minus the humans.

What will happen when the equivalent of wild bacteria are released into the otherwise sterile and static cleanroom that is our world of the digital domain, provided with an unlimited supply of food, and left to grow? I can't know for sure, but I have my guesses: It will likely follow our own planetary evolution, which is to say that the first thing that will happen is a layer of the digital equivalent of pond scum will form and cover everything that it can reach, and be wholly uninteresting. And that's where it's likely to stay for a while, happy and content to exist and reproduce, until the conditions are right for it to make the leap from the equivalent of a single-celled-single-minded organism to something more complex. That is, at the very least, what it would do if I just stuck it up there right now. However, I think I can improve upon that situtation, by stacking the metaphorical deck if you will.

You see the trick here isn't in creating the ultimate code which gives rise to life, rather it's in creating a framework which allows for increasingly complex interaction in multiple fields like our universe does with the different forces which hold our existence in a relatively stable yet ever changing way. From a 10,000 foot looking down view the forces of gravity, weak, electro-magnetic, and strong combined with sufficient mass/energy provide enough complex interaction to account for some really interesting behaviors. The theory is to abstract that same complex interaction into something entirely different, and you should be able to produce some of the same results, and the code I'm working on demonstrates it can be done.

Digital intelligence is still outside of our abilities, but life as a science has officially reached a new plateau as it's forced to expand and cope with reaching new domains to exist within. What I have done is simply the proof of concept that demonstrates when sufficient pressures exist within the domain to enable the right changes, profound results can be accomplished, just like in biology and chemistry. This is in no way new, as many people have proven the same thing many many times before me. I've just demonstrated it in a potentially exciting way, and when I'm confident enough that it's sufficiently proven as a system, I hope to use it to enable all kinds of things.

Labels: , , , , , , , ,

Saturday, April 12, 2008

The Pinocchio Function, Part 4: Two Steps Forward, Two Parts Chaos

The story I'm telling here is true. The dates are approximate and the events are summarized, but I'm not making this shit up. This is part four of the recap of the story so far. You can find part 1 here, part 2 here, and part 3 here.

The path before me was clear. I needed to restep down this lonely path of code and reshape my vision to conform to their reality if I was ever going to get their reality to conform to my vision.

So I did. I spent several late nights coding an evolutionary computational engine, which the specific details of the architecture will not be disclosed here for numerous reasons. Sufficient to say that the first night I got it going and solving problems was nothing short of elating, despite the fact that the problems it was solving were trivial. It really didn't matter: I had succeeded in harnessing nature's wisdom of tapping evolution as a process by which order comes out of chaos, and I'd done it by standing on the shoulders of giants who came before me.

And like the aforementioned giants must have at some point, I ran into glass ceilings; a point after which you can see there's further onward to go, but cannot escape your present confines to advance. For me these ceilings presented themselves in what can basically be described as a lack of biodiversity, because even as my understanding and the resulting complexity of the code base grew, I kept running into the same problem: The code would evolve to the point it's fitness function agreed it should evolve to, and then stop. This is analogous to a goldfish growing to the size of it's bowl, and what I realized was that I needed to stop treating the thing like a goldfish.

If life really were to evolve from with a digital landscape, it would be the resulting emergent behavior that happens when you have lots and lots of biodiversity co-evolving on a shared landscape, not one goldfish growing to the size of it's bowl. In fact the landscape would need to support an ever increasing amounts of biodiversity AND increasing population sizes.

The other thing that I realized is that intelligence and life itself provides it's own fitness function, because that which is more capable of applying intelligence to it's existence is by definition better at surviving, and that this is especially true when we're talking about organisms co-evolving on a competitive landscape. This is a gross oversimplification of the real process, but the underlying logic is sound in that emergent behaviors provide their own set of challenges to be overcome by individuals in a population. What this means is that simply by subjecting an evolving process to evolutionary competition with another evolving process you end up with co-evolving processes which should impose new evolutionary challenges as a result of being in competition with each other.

In other words if you create a landscape which is increasingly expansive and find a way to populate it with organisms which are capable of evolution and put them in competition with each other for survival, evolution will do it's task of enforcing that only changes which are beneficial to survival continue.

The idea actually came to me when watching videos of other evolutionary computational engines running with the fitness function removed. These runs would often display the most extraordinary examples of what can only be described as evolutionary epochs as these little programs first discovered ways to dominate the landscape and then began competing with each other, each successive generation displaying increasingly aggressive behavior as swarms of similarly colonies of code swept across the landscape, in turn displaying increasingly complex behavior to enhance it's survival prospects.

It would start simply, with just whatever was fastest at propagating, and soon one variation of code would dominate the landscape. But eventually something that didn't replicate over code that was like itself mutated into existence, and this proved to be better because it was able to replicate with greater consistency than it's inferior parents and it would soon dominate. And then something which attacked code which checked it's neighbor took over because once again it was better at survival. And this process kept repeating and repeating until a few very virulent strains were all that survived, forever locked in this war of constantly overwriting each other as fast as their virtual CPU's would allow them.

But from looking at the resulting code when I did this on my own, I didn't get this right away. Because each simulation consists of a very large number of CPU's executing in parallel all networked together it was the interaction between them that gave rise to what was most interesting. I kept on looking at things from the perspective of what a CPU is doing, and what code it was executing, like we do now with computers. But what I realized was that this was not really a useful way to envision what was happening at all, and instead I needed to follow the code as it replicated from CPU to CPU.

And this turned out to be an interesting problem indeed! Little did I know the life and death of a piece of evolving code would hold the key to my understanding of the Pinocchio Function.

Coming up in part 5: Amazing Technicolor Dreamcode

Labels: , , , , , , , ,

Wednesday, March 26, 2008

The Pinocchio Function, Part 1: Puppetery for Deities

Finally I've engaged with someone who has thought enough about the subject of ethics of creating artificial lifeforms to address my concerns regarding the nature of my research to allow me to continue. Finally I am satisfied that what I am doing isn't reckless and irresponsible, but actually exciting and cutting edge. And so the story can finally be told.

The story I'm about to tell you over the next few blog posts is true. The dates are approximate and the events are summarized, but I'm not making this shit up.

About 9 years ago I read a book for the first time called, "Ender's Game" about a boy who played games, and the blurred line between fiction and reality that existed for him. The story was compelling if purely science-fiction, and the impact of the surprise ending stayed with me long after I had finished reading it. It is of course this book after which I named my blog.

But this isn't the story of me reading that book, rather it's the story of me reading it's less beloved sequel, "Xenocide", or rather it's the story of the impact that book had on me.

You see it's not a particularly good book (the first one was much better) but I read them all quite facinated with some of the concepts.

In Xenocide the human race has colonized much of the universe, a feat made possible by relativistic travel, and a Faster Than Light communication network who's lag was not proportionate to distance: Electronic communication was truly instant. The proposed technology behind these modes of travel and this communication network were great fodder for my overactive imagination and my future career goals (time traveler comes to mind), but what REALLY fascinated me was what happened with this communications network.

As a result of the highly complex and lag-free nature of this network, somehow an emergent behavior arose. This emergent behavior was honed over time by the forces of evolution and natural selection until at one point after millions of years of operation this emergent behavior developed self-motivation, intelligence, and eventually self-awareness: The network became alive. Now the way this was presented in the book it was an undeniable conclusion, but it got me to thinking about why it wouldn't work in the real world. And in fact I was able to come up with a lot of good reasons why it wouldn't, namely that machines and networks don't naturally exhibit processes of natural selection and evolution, and someone would have to go really out of their way to make them do so.

In fact the very way we architect our machines and networks is completely antithetic to the very processes that would need to occur for such conditions to come about; the moment our machines and networks fail to perform in exactly the way we have specified, we declare them broken and tend to do things like shut them down. The entire process of engineering basically precludes the unknown and unspecified from creeping into the design, or at least all the engineers I know would tend to agree. This leaves no room for experimentation and trial an error, let alone an evolutionary process.

The major exception is of course evolutionary computation engines and fuzzy machine learning systems like neural networks. But even these appear to have limited utility as they are ostensibly and irrevocably tied to their fitness functions, and therefore only as complex as their engineered design. I suppose you could in theory apply a genetic optimization algorithm to the configuration of a neural network interspersed with training to arrive at the optimal configuration for a given fitness function, but you haven't fundamentally broken away from that fitness function.

And so the problem becomes one of defining the ultimate fitness function... The Pinocchio Function: That which would evolve in complexity as the system evolved, thus eventually leading to it becoming a real evolving life form, indistinguishable from any other like it except in chemistry and biology. Such an system has a lot of very attractive properties, the least of which is the eventuality that something intelligent and self-aware should at least in theory eventually emerge from it if left to run long enough.

Thus my journey down the path to creating Artificial Life began, over 9 years ago.

...

Coming in part 2: The Program Understanding Program.

Labels: , , , , , ,