Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

An ecosystem project.

Philip Linden
Founder, Linden Lab
Join date: 18 Nov 2002
Posts: 428
12-01-2003 20:41
This is a great project...

In it's alpha days, SL (then called Lindenworld) had a birds/rocks ecosystem very similar to the ones being discussed. Little rocks would randomly grow in the landscape, and 'birds' which hopped and flew around would look for the rocks and eat them. The ecosystem was limited by fixed rate of creation of rocks per simulator, but the behavior was still very emergent, with large groups of birds often showing up in particular sims, sometimes at inopportune moments/demos.

Very fun stuff.
Xylor Baysklef
Scripting Addict
Join date: 4 May 2003
Posts: 109
12-01-2003 21:29
I would suggest looking into using Genetic Algorithm for this project. I used to use these for some applications at a government contracting company, and they could be quite useful in the domain of your project.

Here is the basic idea: Each 'lifeform' would have behavior based on different 'chromosomes'. You could map from a list of integers or something to start, and have the lifeform act differenty based on this list. Then, in classical Genetic Algorithms, you define a 'fitness' function, which basically tells how 'good' the chromosome is.

Based on these fitness values, a new generation is created. There are various ways the new generation is made, but the simplest way is to just fill it with 'children' chromosomes, each based off of two chromosomes of the parent generation. The chromosomes in the parent generation are picked randomly, with higher fitness valued ones getting picked more often. (Someones the top n% is just kept alive as-is in the next generation, to be sure that fitness values don't degrade).

Given that each 'lifeform' will be a seperate script, and that these scripts will not necessary be in 'mating' range with all others, some modifications would need to be put in place. Emulating sexual behavior of nature might be a good alternative, such as waiting until a lifeform reaches a certain sexual maturity, and then evaluating its fitness value at that time. Then other lifeforms of the same class could ask for its fitness value, and decide whether or not to mate with it based on that value. In order to keep a stable population size, limits on reproduction would need to be put in place (like having the lifeform stop reproducing after 2 matings), and a set life-span would need to be implemented (a basic timer function might suffice). This is just a basic possibility, with much more room for behavior.

I have thought about implementing this before, but I always keep getting busy with other projects. I have other suggestions if you feel that this might be an option worth looking into. In-game AI is an exciting subject, and I wish you all luck on getting it off the ground!

Xylor
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
12-04-2003 02:27
From: someone
Originally posted by Philip Linden
This is a great project...

In it's alpha days, SL (then called Lindenworld) had a birds/rocks ecosystem very similar to the ones being discussed. Little rocks would randomly grow in the landscape, and 'birds' which hopped and flew around would look for the rocks and eat them. The ecosystem was limited by fixed rate of creation of rocks per simulator, but the behavior was still very emergent, with large groups of birds often showing up in particular sims, sometimes at inopportune moments/demos.

Very fun stuff.

You forgot about the snakes phil :)
And the way you could shoot trees and watch them catch fire and set neighboring trees on fire. I would kill for some screenshots of this...
Guess I need to start visiting steller again :)
Aizndor Kothari
Junior Member
Join date: 21 Nov 2003
Posts: 8
12-09-2003 22:28
Thanks for the info, Xylor.

I'll keep it in mind.

I've been wanting to look up a bit on a-life, but most of the places I found's info starts with Core Wars and ends with the Game of Life. Not very useful.
Mark Michelson
Particle Man
Join date: 22 Jul 2003
Posts: 93
12-10-2003 09:23
Oooh, I wanna play.

I've actually been out of SL for about a month, I just lost interest. But that crazy 1.2 email sucked me right back in and now this has me intrigued. I'll have to contact someone IW and get on board :)
1 2