Thursday, 15 May 2008

Report Submission!

Finally submitted the project report. Finished it about Wednesday 7th May 2008 and submitted on the Thursday. Here is the link to the project as submitted. I hope it all scores well; I think it (the project) deserves to, I just hope the report successfully puts across what's been achieved.

Now just the viva to worry about, and then I can get back to developing properly

Friday, 25 April 2008

Pheromone Diffusion

Video recorded for report;




To be of use the pheromone must diffuse in an expanding 3D Gaussian like shape. It must also dissipate in the absence of pheromone being added. The video below show a clean Gaussian shape that grows and then levels off at a constant size.


Pheromone Diffusion. Increments of 10 pheromone updates. Evaporation rate = 0.08 . Diffusion rate = 1.0. Queen phermone added at rate of 100 per Zeit tick.

Sunday, 13 April 2008

Interesting project: Virtual Creatures

This is a project those interested in Colony may also be interested in. Has relatively little in common with the aims of Colony but another interesting example of stigmergy in computer science and uses the same engine as Colony, Ogre3D.

About Virtual Creatures;

This application is an example of evolutionary computing that you can run on your own Windows PC at home (see the download section). It uses a process similar to biological evolution to gradually evolve a population of virtual creatures in a 3D graphical and physical environment. Much of the inspiration for this project came from the wonderful work of Karl Sims.



Monday, 7 April 2008

Video Footage... It lives!


If you just want the highlights see the comments at http://video.google.com/videoplay?docid=535175355828864093&hl=en to jump to the key sections. Also see the link to the gallery at the bottom of this post to get stills if you find the video hard to see.

Another quick update with some eyecandy. The vid shows the current build. The Zeits have very simple intelligence and only one pheromone is used to build a relatively decent mound. Key points to notice;

  • Real-time! It can just about handle real time with just the one pheromone. The program also can be set to auto adjust the rate of pheromone diffusion/zeit update to keep things in check. For the sake of this demo zeit update and pheromone update are allowed to get out of sync.

  • Billboards to show pheromone (that can be switched on and off). THis runs a lot quicker than full particle affects. Also a lot easier to see whats going on

  • Pretty organic looking. I'm pretty proud of how organic the mound looks. I'm hoping thats pretty unique

  • Pretty reliable framerate. Uses three threads and always makes sure the interface is smooth, even if the diffusion/zeit calculations are having trouble

  • Its a little hard to see but the Zeits have to dig before they can deposit (so they have building material. This results in a small trench around the mound

  • They take far to long to build! I need to boost there brains a bit and get them using some more pheromone to get more impressive results



Colony Screenshots

Sunday, 9 March 2008

Quick update! Threads!

From the email to my project supervisor;

"I've been programming like a man possessed on Colony. I've hit a big problem handling the pheromones in such a way to make them fast and accurate without murdering the framerate . So far little success and as I write to you I'm in labs desperately trying to crowbar threading into the code; I figure I can get a pretty massive speed increase if I take advantage of the second core on most modern machines. It's a lot of work though trying to avoid segfaults and race conditions.

Bit worried I'm running out of time though. "

Monday, 18 February 2008

At Last!

Finally fixed that bug... all came down to a typo :-( I was looking in the wrong place for which I blame my dodgy debug code, which I finally managed to get sorted with the help of Seth the Supervisor.

Now I have moving Zeits that stick to the ground and randomly change direction every now and then. They can climb but they do have a nasty habit of committing suicide by throwing themselves of the side of the map into the abyss.

Now working on the code for the bugs to dig and deposit soil. With any luck now I'm out of this rutt I can get some real progress.

Here's hoping

Thursday, 31 January 2008

Stuck in a rutt

Finished exams on Saturday, took a day off Sunday, and Monday got down to some serious work with Colony.... and let me tell you it is being a BITCH!

I've spent nearly a whole week now working on trying to get the Zeits moving around the environment in a sensible way.

The first part of that was to implement a SphereQuery mechanism which allows me to work out what is inside a virtual sphere on the terrain. It's not as simple as just using Ogre's built in methods, as I have to extend them to cope with the voxel engine. It's also a nightmare to test anything with the GUI as it is at the moment. By Tuesday I was sure enough that it was working correctly, and allowed me to do simple collision avoidance with the camera to prevent clipping through objects.

The next part was to get the Zeits using it in some sensible way. To do this I have a method which a Zeit can use to check if a position is valid. It does this buy querying two spheres, one small inside a larger one.
The inner sphere must be empty for the position to be valid, so that the Zeit has room to exist there.
The outer sphere must not be empty for the position to be valid, so that the Zeit is not floating in thin air.

Next tricky bit, and where I've been stuck now for far too long is getting the movement right so that they can move randomly around the terrain. A random direction is picked every few ticks. Every tick the Zeit attempts to move in this direction. To do this is check whether the position towards the direction is valid. If it is it moves there. Otherwise it tries looking just to the left or right of the direction for suitable positions, and if valid goes there instead. It also tries varying the Y height of potential destinations to go up and down slopes.

However at the moment it seems as if the Zeits make the wrong decision all the time and end up wedged in the landscape, and its blowing my tiny little mind working out why. I've got a suspicion that its the original sphereQuery method which is causing the trouble as it seems to give a different result before and after the move, which shouldn't happen as the Zeit should be ignored in the query. Anyway I hope to get that bug caught by the end of the week, or the weekend and have some Zeits moving around in my lovely 3D landscape.... I hope.

Sunday, 13 January 2008

Interim report submitted

As exciting as it sounds, but hey now its out of the way I can get back on with Colony proper. Well I can in a week anyway, just a few lil bits of coursework to get out of the way.
For anyone interested the interim report can be found here;
http://www.beastnet.co.uk/wiki/images/5/52/InterimReport.pdf