Monday, August 18, 2008

No news...

...is, well, no news.

VatLife is on hold for now. I've gotten busy with work, remodeling the houseboat and family visits. However, my wife is going to a five day conference in early September, and I'm planning to spend some time cranking on it while she's gone.

Sunday, August 3, 2008

It don't mean a thing if it ain't got that swing

Would jazz make any sense if you'd never walked through a city, heard a train whistle, knew speech patterns? Would blues make any sense if you never felt blue? Actually, would music make any sense at all if you'd never heard (or possessed) a heartbeat?

This, oddly, is an inspiration for VatLife.

Let's say the fitness function in a evolving environment is that a-lifes are rewarded if they can predict the next number in a sequence. So, let's say the sequence is 1, 2, 3, 4. It world not be difficult for most evolvable machines to predict the next number. 1, 2, 4, 8 would also be a fairly easy sequence to predict.

Now, let's say the sequence is 3, 1, 4, 1, 5, 9. Clearly, these are the base 10 digits of pi, but since it's not a smooth problem space to go from the first two sequences to that one, I don't think there's any way for a-lifes to make that evolutionary jump. Not without some outside experience. And even then, it seems necessary for the a-life to learn the digits of pi, rather than to figure that sequence out. It seems pretty safe to say that there's never been a human being born on this planet who could predict the digits of pi without some kind of mathematical training.

Could an a-life evolve in a different environment and gain the knowledge to be able to solve that problem? It's hard for me to picture that happening with that specific problem. But just as life experience in extra-musical domains is necessary to truly understand music, a-life experience from many different simulated environments may be necessary to solve the problem at hand.

Incidentally, this may sound like AI training, but I'm talking specifically about breeding ALs that are capable problem solvers. Although...this does argue for individual VatLife creatures with life experience crossing from one environment to another, not just their genotypes and controller IDs. And perhaps a VM that is designed with the goal of allowing VatLife's to pass knowledge between individuals.

Friday, August 1, 2008

Better (artificial) living through chemistry?

Just got caught up with my Biota podcasts and GT presentations. I particularly enjoyed Bruce's presentation at Greythumb London.

I believe it was in the London GT meeting that Bruce quoted a simulation author who said that there's always an IOU you have to write. In other words, there's always going to be a part of the simulation where you wave your hands a bit. This makes some sense...if you are trying to simulate the spread of a virus in a human population, it makes sense to simulate the mobility of the population, but why waste the effort simulating the internal combustion engines that are getting people from point A to point B?

Actually, that's not such a great example, because no one would expect you to repay that IOU. We all know in abstract terms how cars allow people to move from here to there, and so it would be unreasonable to expect your poor CDC epidemiologist to have to model reality beyond the minimum needed to solve the problem.

So, do we write an IOU that we have to repay when we create simulated organisms that use genetic information to control their form and behavior without actually modeling the underlying chemistry?

I think it all depends on your perspective. If you're a biologist, or if you want to evolve something in your simulation that might exist in the real world, then you'll need a high adherence to reality in your simulation. But since all simulations fall short of reality, I think requiring accuracy is something of a losing game.

Case in point: the three body problem. If you just have three objects that interact with each other - for example, a planet, moon and sun - there's no way of exactly determining what effect each body has on the others. You can only approach a solution. So what if you have a billion bodies in interaction? And how far down do we take this...do we model subatomic particles, and then do we store their location OR their velocity?

But let's say that we model atoms and molecules, and we have good approximations of their interactions. We ignore relativity and just use Newtonian physics. How large a world can we model? As fast as computers get, and even writing our IOUs, I'm skeptical that we could model a very large volume of space in real-time. Since it took something like two billion years for multi-cellular life to evolve in the vast oceans of Earth, I don't hold out too much hope we'd see this in a computer simulation.

But if we did, what of it? Creationists would say that the simulation was flawed and created by proponents of evolution, and both charges would be true. It might be confirming evidence of evolution, but do we need more confirmation?

So while I see this as a very interesting enterprise, I'm skeptical of this approach as yielding useful results. Interesting perhaps, but I'm not sure about useful.

My personal preference at this point is to say: hey, evolution works, and it's given us these great design patterns - such as DNA and a central nervous system. What can else can we do with those design patterns? And then, like the CDC epidemiologist, we can make a simplified simulation that yields useful results without worrying about the tire pressure of the virus' host's car.

All JMO.

Thursday, July 31, 2008

Open-sourcing VatLife

I just set up an SourceForge location for VatLife.

However, I don't plan to upload it just yet. While I just don't have the time, resources or knowledge to develop the "perfect" framework, and my plan was always to release a rough cut that might inspire others or be picked up by better developers than I, for VatLife to get any traction at all I think it will need some documentation and better examples. I'd rather have this make a splash later than a thud now.

Given that this is a side project of mine and I don't have that much spare time to work on it, let's figure it will be at least a few weeks before this goes on-line.

I consider that the GreyThumb SV presentation was a launch of a concept more than a launch of the technology itself - and again, I'd welcome feedback of all sorts. Well, most sorts anyway. ;)

Wednesday, July 30, 2008

In defense of the unreal

I attended GreyThumb earlier tonight and presented VatLfe, and am too buzzed on adrenaline and a can of Coke I guzzled earlier to go to sleep just yet. Having given up sugar for the past few weeks, that single can sent me flying.

Overall, I thought the presentation went reasonably well. It was extremely well attended and a fairly good mix of people. At this moment, I'd be hard pressed to say what the reaction was to my presentation. At times I felt I'd made it too basic, at other times too technical...and then there were the moments where I felt I was transparently making it up on the spot. Zann's talk and mine were different enough that I'm not sure if the combined brainstorming session entirely worked.

On the plus side, I was glad I'd gotten the software to the proof of concept stage, and was REALLY glad Osher got the projectors working. When the projectors cut out on Zann, I was worried I was going to have to talk my way through it, and that would have been ugly. Without the demo, I'm afraid it would have made even less sense.

I believe the reaction to VatLife fell into four camps:
  1. Those who found it incomprehensible or boring (hopefully a small minority).
  2. Those who were interested in its possibilities, and perhaps would even use it.
  3. Those who were at least mildly appalled by how it played fast and loose with biology.
  4. Those who view this as related to Artificial Intelligence and not Artificial Life.
During the brainstorming session, that last view was expressed pretty vocally. I frankly don't really understand it, unless you take the view that an organism has to exist in the real world to be considered life. This seems somewhat prejudicial to me. Why should A-Life's be given less respect simply because they don't exist? I'm considering leading a march to protest this unfair treatment, billions of non-existent A-Life's marching behind me, of course.

Seriously, my feeling is that simulated organisms within an evolutionary simulation are artificial life. It's a different sort of artificial life than a real-world bacteria containing a designed genome, but it's still AL in my opinion - at least if you can get past the fact that the environments are either simplistic representations or may bear little resemblance to our own reality.

To point #3...I am sympathetic to this viewpoint. Frankly, I do feel slightly uncomfortable borrowing rudimentary principles of biology and incorporating them into my simulations, as if I were some New Ager appropriating bits of various religions for my own without fully understanding them. However, in the same way that flight was inspired by birds but airplanes do not flap their wings, I think it's legitimate to learn from nature without being compelled to copy it.

But perhaps both of these last points beg the question: what is it good for? If we're evolving stuff that doesn't teach us about actual biology, and doesn't necessarily translate into the real world, isn't it simply a toy?

First, my hope is that VatLife could support simulations involving real world physics, so objects that evolved could be built in the real world. But putting that aside, why should simulated environments have to resemble our own?

I've used this analogy before - chicken breeders may select for chickens that have meatier breasts. This is not an adaptive trait in the real world, so in a sense, breeding chickens puts them in an artificial environment with an artificial fitness function to achieve a specific goal. In our simulated environments, we can lower gravity, or make representations of inanimate objects breed, or even impose conditions and fitness functions that have no real world analogues at all. Why not breed AL's like chickens to serve our own purposes, whether or not the environments and selection criteria have analogues in "real" biology?

Ultimately, I believe the technology of evolving computer systems will have enormous implications that will touch all of our lives in very real ways. While the Evogrid and perhaps Vatlife may be interesting tools for exploring biological evolution, my personal interest is in what they can teach us about evolvable software. And if that leads to the emergence of Artificial Intelligence, then so be it. ;)

Hate to spoil a perfectly good closing line, but I did want to add that I did get some positive and encouraging interest in this technology. The comparison to MVC architecture made me happy, the use of Java as a foundation platform seemed to make the crowd happy, and OSGA is apparently something I need to learn.

Sunday, June 29, 2008

source code for Micropond v1

Due to the overwhelming demand for Micropond source code (I think I've been asked twice, but I'm easily overwhelmed), I've decided to go ahead and post it.

So here it is. It's written in C++ and MFC, and is poorly documented and is totally unsupported. Caveat emptor!

MicroPond v1. source code

Thursday, June 26, 2008

This is your brain. This is your brain in a vat. This is your brain in a vat on the EvoGrid.

You're undoubtedly familiar with some form of the brain in the vat argument, which suggests that your brain might actually not be connected to a nervous system connected ultimately to muscles and sense organs, but instead to a computer that simply receives the outputs of your brain, runs them through a giant virtual reality simulation and simulates inputs. Yeah, Descartes first considered it, and then there was that little film you might have seen called The Matrix. Sigh.

As tired as this concept is, I think it could have a great application towards a generalized artificial life platform, which could play really well on the EvoGrid.

What the model gives us is a layer of abstraction. Let’s say our A-Lifes are simply brains in a vat, hooked up to a computer simulation that processes their inputs and outputs. This model gives us the ability to separate the evolution of the control code from the simulation, so that the control code could theoretically be connected to any simulation. Perhaps the control code is operating a simulated robot, or perhaps it’s responding to musical notes. Maybe it’s in a 2D environment, or maybe a 3D environment. The point is that the “simulation” is a black box from the point of view of the A-Life.

Perhaps this is sounding more like AI than AL, to which case I plead somewhat guilty…although I frankly am more interested in evolution as a creative force than I am in these distinctions. But what about the morphology of these ALifes? In our case, we’re born with more or less the same kinds of bodies with the same kinds of inputs and outputs. But anything is possible in simulations, and so I propose that some simulations might choose to interpret “outputs” as instructions to change the morphology. Perhaps in one simulation, writing “3” to pin #2 would a new limb to be generated, along with new inputs and outputs. In another simulation, every ALife might control the same make of robot.

Here’s my proposal for a new generalized ALife platform, which I’ll call VatLife. The intent is to make the environment as much as a black-box as possible, to separate evolutionary computation from simulations.

The main classes/components are:

VatLifeEnvironment
VatLife
VatLifeGenotype
VatLifePhenotype
VatLifeMind
VatLifeController

Here's the basic design. A VatLifeEnvironment may contain a number of objects, which can include VatLife artificial life forms. It maintains information about those objects (the VatLifePhenotype) and handles all of their interactions, as well as any physics (if applicable). This is meant to be a “base class”, so there may be many different types of VatLifeEnvironment simulations with different properties. Each VatLifeEnvironment should essentially determine the fitness function of the objects within it. This could be as general as determining that one VatLife has eaten another, or as specific as rewarding individual VatLife objects based on their ability to replay a series of inputs.

Each VatLife would contain a VatLifePhenotype, VatGenome, VatMind and a reference to a VatLifeController. The VatLifePhenotype is used by the parent’s VatLifeEnvironment, and will be treated (except perhaps for simple initialization purposes) as a black box by the VatLife.

The VatLifeController would be a program that has two main tasks. The first is to take the VatGenome and produce a VatMind, as well as an initial VatLifePhenotype. The second is to respond to inputs and produce outputs by interpreting the VatMind – but not by referencing the VatLifePhenotype directly. Instead, it might read input pin #2 from the VatLifeEnvironment it’s in, which could get data based on the phenotype. For example, this could return the relative brightness that the left “eye” is receiving, the angle of which is controlled by another pin.

To make this work across different types of VatLifeEnvironment simulations, the VatLifeController might be coded in something like Java bytecode. This way, when one VatLife enters a simulation from another, the new VatLifeEnvironment might note that the new VatLife uses a different controller and automatically download it.

A word on input and output pins – the basic idea here is very simple. A VatLife object might have a set of hierarchical pins, each of which can be read and written to. To use a grossly simplified model of the human body, you could say that we have four top-level pins (our two arms and two legs), with our two arms each containing five child pins controlling to our fingers. Each pin when written to activates a muscle, and when read returns the level of strain.

Each VatLifeController should be given a certain amount of processing time, and can also be called when input pin values change, executing “attached code” (essentially interrupt processing).

While I’m not claiming this should be the design for the EvoGrid, I think it might be a very interesting design for an “island” within it.

One open question I have is how ALife’s will breed. Should there be a standard way of breeding different VatGenome objects (and is there a generic representation?) and leave the interpretation open to the VatLifeControllers, or should the VatLifeControllers be responsible for the breeding? I’m inclined to go the first route, but perhaps the more flexible solution is to give the VatLifeController a crack at it first, and if it doesn’t handle it, fall back to a generic handler.

Any feedback would be much appreciated!