Back to the Home Page...

Development Diary (archives)

28th November 2004
Stage1 of my ALife shell has progressed nicely, but I'm entering a period of fairly intense work deadlines so I'll discontinue this dev-diary until some later point when I have time (and energy!) for more home coding projects.

13th November 2004
I just got back from New Zealand this week - what a fantastic country! Friendly people, laid back attitude, good beer, great food, open roads; what more could you want?

I'm still working on my ALife shell, I've defined all the initial top level classes and their interrelationships but I've yet to conceive of a suitably inspiring simulation that will make me start bending it to a particular purpose.
The design philosophy is to develop in stages with predefined goals. Every subsequent stage will start with 'stage1' but may then bend it in horrible ways. Changes to the fundamental classes will be carried over into 'stage1' only after they prove to be useful in multiple further stages.
Obviously I'm currently working on 'stage1' which is just proof of concept, but that's pretty much done now. 'stage1' defines a World (currently a 2d array of Things) and a Population of Individuals (which provides an alternative, more efficient way of accessing each Individual than searching the World). Each Individual has a set of characteristics, including a Program which is in the format of a "genetic program". Each instruction and data item is a (ProgramNode) leaf on a tree hierarchy. Currently an Individual acts on the world when it's Program ultimately returns an 'intention' value, this is then converted into action. I'm not 100% happy with this approach, but I do like the idea that multiple programs could be applied in a hierarchy to provide a subsumption architecture where each level can override or accept the intentions of the level below. This could also be used to provide modularity to the program structure.
All data holding classes in the simulation are derived from a Serialiser/DeSerialiser class so full load/save facilities have been built in from the beginning. I'm using a text based save format at the moment because the benefits to debugging more than make up for the longer load/save times and large file sizes.

1st October 2004
Well it's been a while since I updated this page - I've been busy with a variety of different programming tasks recently and so the vehicle driving thing is on a back-burner for a while. I got it into a state (which you can see below) where 50 cars drive around a 3D world using AI to avoid collisions and obey the road rules. The drivers have a fair variety of configurable parameters which allows me to make a mixture of driver types and personalities. The control (as I've mentioned previously) is currently faked ie. it's not using the physics engine and to overcome that issue will be a fairly lengthy task. What I'm taking away from the project at this point is a very nice looking demo in the event I suddenly find myself looking for a new job!

The focus of my attention right now is building a robust and clean C++ shell for experimenting with ALife and evolution. These have always been hot-topics for me, and I never seem to tire of playing around with simulations, so I figure it's about time I got serious with it and concentrate on building an effective and flexible test-bed in which to play.
I'll post more about this when the project's a little further along and I have a working demo to talk about.

13th September 2004
Vehicle controllers are tricky - I'm trying to avoid solving the feedback equations and what I really want is for the AI to be in an actual driver's position (ie. no stealing data from the simulation that a driver would not have access to). While I'm pondering these issues, I've been modifying the 3D conversion of my old AI_Drivers simulation and I think it's starting to look pretty good. This shot shows a traffic-light controlled junction, the overall world contains fifty AI Drivers. The AI processing currently has virtually no impact on the frame rate due to the efficiency of the code and data structures, but drawing 50 cars is pushing the Ogre graphics engine pretty hard (most of the car models have not been modified for a low polygon count).

30th August 2004
Thirty AIDrivers in the Ogre/ODE environment with a height-map terrain... Time to start work on the vehicle controllers so they can drive themselves to the AI's 'desired position' under the ODE physics constraints. (They currently 'drive' by the AI saying 'you're here, facing that-a-way').

28th August 2004
After a week away in Cornwall, I'm back and hacking again. Using an OGRE/ODE demo put together by 'monster' from the Ogre forums and modified to compile under VC6 by PeterNewman from the same forums (who kindly donated the code to save us all from working our torturous way through the downgrade), I've twisted it a little to produce a 10 car demo with inter-car collisions... next stop - adding AIDrivers.

18th August 2004
I've just discovered the wonderful OGRE graphics library. Which looks like it will greatly simplify the creation of my 3D simulations, being both fast and relatively simple to learn! It really has to be an improvement over the rather crude OpenGL work I've been doing so far...

I'm going to start by trying to take some code I wrote to drive cars around a 2D network of roads and see how hard it is to fit that AI Driver into a physically modelled 3D car and make it drive around a 3D city.
The 2D demo is here (executeable only, at this time).
The ReadMe file is here (contains warnings and descriptions).

And it looks like this... (ugly!)


10th August 2004
My ALife focus is on creating an environment of sufficient complexity that agents inhabiting it can experience open-ended evolution. The idea is that only in a highly complex environment is it possible to see the continual evolution that has benefitted species on Earth and resulted in ourselves.
In parallel to that development, I'm also working on better data representations for the agents in order that they will benefit more rapidly from evolutionary alterations and yet still be capable of complex reasoning and tasks when (and if!) that becomes a survival trait.
Finally, my third area of experimentation is to try to achieve the above two goals in a computationally efficient manner. The latter task is perhaps the hardest of the three as a naive approach to the others is to simulate the world itself. A simulation that can run a million generations per night has a much higher chance of reaching the ultimate end goal of achieving intelligent agents than one which takes a night per generation (within my lifetime anyway).


100 'bugs' try to learn how to stand up in a world using the ODE dynamics package to simulate physics. In this picture I'm using a Genetic Algorithm (GA) to evolve them with the simple fitness criterion - "stand up straight".
Once I've tweaked the GA to evolve the bug's controllers (brains) efficiently, I intend to make them walk, then deal with obsticals. Eventually the idea is to ditch the GA and let them evolve by inter-breeding.
In order to maintain the advances learned from these early trials, I intend to use a subsumption architecture however I'm not keen on FSMs for evolution so I'll experiment with a variety of alternate controllers.

Back to the Home Page...