Evolution game

Started by
16 comments, last by Khaiy 13 years, 6 months ago
I need feedback on a vague notion of a game/simulator that I've had for a long time and never been able to iron out enough details to even try to start a design phase.

Ever since I was a little kid and read Theodore Sturgeon's 'Microcosmic God', I've had a vague notion of what an evolution simulator should be. However I've never been able to really figure out a solid way of implementing it due to several problems.

One principle that I've considered fairly straightforward however, was that the means for instigating evolution would be through control of the environment. Not control of the species or their genes.

No offense to Will Wright, who is a brilliant game designer and a visionary, but Spore completely failed at this. Whether it was a good game is another matter, but as an "evolution game" it (in my opinion) fell flat on its face as more of an "intelligent design game" than anything. In Spore you basically implement macro-evolutionary changes which are then guaranteed to succeed. Not exactly evolution.

My ideal simulator would involve a sophisticated enough genome that lots of complex biology and behavior could arise. Stuff that the simulator's author never imagined. But not so complex that an average computer would need weeks of protein folding to render a sequence.

Naturally the phenotypes would have to be somewhat pre-conceived (limb amounts, lengths, amount of joints, locations on body) as actual genomes long enough to evolve features that high level would be incalculable in anything within even an order of magnitude of real time.

Also on the environmental side, having proper controls that give the manipulator enough free range to hit his "target" seems a daunting if not impossible challenge. For example, simply being able to control scarcity of vegetation, rainfall, geography, sunlight, etc. would hardly provide an intuitive means to increase the speed of a creature over some amount of generations. An example of something which would be simple would be evolving giraffe like creatures by steadily increasing the height of useful vegetation.

It's a given that genetic changes would have to occur far more rapidly (assume a higher background radiation or mutability of genetic mixing), the genome would have to be vastly simplified, and behaviors and biological changes would have to occur in far less a truly genetically procedural fashion than reality for this to even be computable.

So what I'm looking for, if it exists, are any ideas, people, resources, related to this task. It seems like through the right combination of simplifications/preconceptions it would be possible to create at least a rudimentary evolution simulator that could provide fun and unexpected but evolutionarily explainable mutations of a species.
Advertisement

Ref: [ 2010-07-19 ]
Quote:Original post by sooner123
For example, simply being able to control scarcity of vegetation, rainfall, geography, sunlight, etc. would hardly provide an intuitive means to increase the speed of a creature over some amount of generations. An example of something which would be simple would be evolving giraffe like creatures by steadily increasing the height of useful vegetation.


If you think that evolution can be modelled accurately this way, I'd recommend picking up an evolution textbook. Lamarck was disproven a century ago.

I think that you're approaching this from the wrong direction-- perhaps more accurately than Spore, but still from the same mindset.

The idea of evolution isn't that specific changes can be induced from environmental changes (although there are some examples of population biology working this way, with various morphs of the same organisms), but rather that environmental changes provide new opportunities which various mutations may or may not be able to exploit. Focusing on speficic traits to change from the player's perspective will almost certainly require the player to control the relevant species' development.

The first thing that comes to mind when I read your post is that it's going to be a slog to come up with:

1. Enough variables in the environment to be a satisfying representation of evolutionary processes;

2. Imagining enough traits associated with those variables to allow for evolution to occur in any more than a few pre-defined directions. For example, a response to harder-to-reach vegetation would be equally feasible as an animal becoming better at climbing or gaining the ability to fly/glide as another animal getting taller. Given that you'd have to come up with graphics for all of these potential changes, which could be reasonably applied to existing organisms, it'll be hard to strike a balance between freedom/flexibility and complexity of the environment.

If you truly want to design an evolution simulator to contrast Spore's creation simulator, I would recommend:

1. Getting a biology textbook (undergraduate level should be fine), and reading through the evolution chapters. This'll at least give you a good overview.

2. Plan on a huge timespan for your game, rather than radiation/high mutation rates. This also would help simulate environmental changes, which can also take a very long time.

3. Narrow down the environmental features you'd like the player to be able to influence.

4. Come up with as many individual mutations/traits as you can that would affect an animal's ability to manipulate or navigate those environmental features.

5. Refine (as in, improve but narrow the use of) specific mutations/traits for evolutionary changes, and imagine how the animal's access to and effectiveness in different environments might change.

I don't want to discourage you, but this is a big and complicated project (as I'm sure you're aware), and even with heavy simplifications/preconceptions it will be tough to balance openness and evolutionary potential with feasible programming.

-------R.I.P.-------

Selective Quote

~Too Late - Too Soon~

Quote:Original post by Khaiy
If you think that evolution can be modelled accurately this way, I'd recommend picking up an evolution textbook. Lamarck was disproven a century ago.


Maybe you need the textbook [wink]. Lamarckian Evolution posited that the acquisition of traits during the lifetime of the parent were passed to the child. So a blacksmith pounds an anvil and gets a strong arm therefore his kids will have stronger arms than the general population. The giraffe example is not at all Lamarckian as I read it.

I think the example of gradually increasing tree heights is actually a decent example of Darwinian response to environmental pressures, though the mechanism that sooner had in mind might be a tad off. As long as there is variance already in giraffe neck heights that is a heritable trait, then as vegetation grows in height those giraffes which have longer necks will be more fit. If they are better at surviving, and as a result have more offspring, then over time giraffe neck height would trend upwards.

Otherwise your post is spot on. To have a compelling evolution game you need enough variance in enough heritable traits that the species can respond to changes in its environment over time in an interesting way.

I think from a game perspective an evolution game is actually quite hard to pull off since the responses are gradual and your influence over the traits is indirect. You could not, by definition, play the role of any kind of intentional being as the player. i.e. there is no way to have an animal in mind and make it appear. Evolution's responses to environmental pressure is unpredictable. For instance, in your giraffe example it is just as likely that they become smaller better climbers or become bipedal or switch to eating grass than that the neck size increases. The game can be about discovery and surprise, it cannot be about control and design. This, to me, seems like a serious "fun" challenge; can you make indirect control fun?

-me
Re: Khaiy

I think what sooner123 meant by the giraffe example is that if the trees aren't getting taller over the generations, there is no natural selection against those with short necks. Without that selection pressure, having long necks would just be a variation, but would not become a trait of that species.

The variation naturally exists in the population. To evolve the population toward a certain direction, the player could create a selection pressure by controlling the environment, to kill off the individuals with traits on the wrong end of the bell curve.
Quote:Original post by Palidine

Maybe you need the textbook [wink]. Lamarckian Evolution posited that the acquisition of traits during the lifetime of the parent were passed to the child. So a blacksmith pounds an anvil and gets a strong arm therefore his kids will have stronger arms than the general population. The giraffe example is not at all Lamarckian as I read it.


Fair enough, I was overly glib. In a simple system where tree vegetation is the main food source and most tree vegetation becomes farther from the ground, gradual increases in neck-length is certainly a reasonable evolutionary trend, although it's far from a certainty as many other traits could compensate for the same effect (or the species could migrate or die off). A long neck has its own odd consequences, but all of that assumes things in the OP's model that I have no particular reason to include. I shouldn't post things towards the end of my workday :p.

Quote:Original post by Wai
Re: Khaiy

I think what sooner123 meant by the giraffe example is that if the trees aren't getting taller over the generations, there is no natural selection against those with short necks. Without that selection pressure, having long necks would just be a variation, but would not become a trait of that species.

The variation naturally exists in the population. To evolve the population toward a certain direction, the player could create a selection pressure by controlling the environment, to kill off the individuals with traits on the wrong end of the bell curve.


There can still be selection pressures against longer necks, be they sexual selection or increased risk of predation, a higher energy cost associated with the change as compared with the nutrition value of the resources the proto-giraffes gain exclusive access to, etc. If lower vegetation is still available, we'd be more likely to see speciation than occasional extreme morphologies in a population, and more likely still to see migrations and population decline. However, as above, I'm not going to defend myself too vigorously here. I was certainly out of line in tone, if not in content as well, in my earlier post.

But this underscores my earlier point that it will be very difficult to allow the game to generate novel solutions to changing environments, because the possibilities are so numerous. Broad changes, like changes of geographic distribution of species, population numbers, speciation, sexual selection, etc. may be easy enough to model in an abstract sense; that is, a probability metric for success in getting and using energy or reproduction could modify populations mathematically. But the specific implementations of evolutionary changes is harder. A proto-giraffe could indeed grow a longer neck, but it could also grow longer legs, a trunk, a projectile tongue, develop smaller bodies so that they need less food and can make do with just the low-hanging leaves, etc.

It's not a specific design problem for sooner123, as it is a problem I see in this type of game. Without a solution, the player will either need to manually be able to make changes to organisms or endlessly reproduce variations on a few themes which already exist. I do think that lots of fun games can be had in the genre, but as Palidine implied it would require more elements than simply environmental control.

Perhaps there could be a loose goal structure, a la SimEarth? Or limited-term goals to meet for specific species or populations? Like, spread descendants of this species across a continent, to thrive across the environmental variations? Even this would probably require some guided species development though...

-------R.I.P.-------

Selective Quote

~Too Late - Too Soon~

Quote:Original post by Khaiy
Quote:Original post by sooner123
For example, simply being able to control scarcity of vegetation, rainfall, geography, sunlight, etc. would hardly provide an intuitive means to increase the speed of a creature over some amount of generations. An example of something which would be simple would be evolving giraffe like creatures by steadily increasing the height of useful vegetation.


If you think that evolution can be modelled accurately this way, I'd recommend picking up an evolution textbook. Lamarck was disproven a century ago.


No I think my understanding of evolution is good enough. I'm aware of the difficulties here. This isn't about my understanding of evolution but about a way to make a simulator/game based on controlling the environment to attempt to steer evolution.

As I said in the OP, steering evolution towards specific changes would be extremely difficult. I never said this was how evolution worked.
Quote:Original post by Wai
Re: Khaiy

I think what sooner123 meant by the giraffe example is that if the trees aren't getting taller over the generations, there is no natural selection against those with short necks. Without that selection pressure, having long necks would just be a variation, but would not become a trait of that species.

The variation naturally exists in the population. To evolve the population toward a certain direction, the player could create a selection pressure by controlling the environment, to kill off the individuals with traits on the wrong end of the bell curve.


Exactly.
While it is true that Lamarkian evolution is not the way that organisms on earth evolve, it is still a valid solution to the general process of evolution.

For evolution to occur you need just these 3 things:
1) Reproduction
2) Variation
3) Selection

Lamarkian evolution does fulfil them and so is one potential solution to evolution, however actual living organisms follow Mendelian evolution.

This means it would be possible to make a game where the organisms followed Lamarkian evolution (and could be an interesting idea for an alien race's evolution). A species that could directly affect its genetic make up through the events that occur to it could be a Lamarkian species (actualy now that I think of it, in Stargate, the Goa'uld could do this, so they are a lamarkian species).

@sooner123:
What you want is a genetic algorithm. Basically the genetic traits of each entity is represented as a string (1 dimentional array) of values (this is the genotype). Each value represents something to the interpereter. What values you use is pretty much arbitary as they only have meaning to the interpereter and you are designing that anyway.

The interpereter translates the genetic string into a description of the entity for the program (the phenotype in biological terms). The reason you construct a pheotype from the genotype is so that you preserve the genetic string but still allow the organism to expereince specific changes to itself. Teh phenotype is essentially the stats for the entity derived from the genetic string.


With a genetic algorithm, you don't need to simulate genetics all that closely, you don't need to include protein folding or anything like that. Actually, RNA and protein folding in biological organisms is equivelent to the interpereter for the genetic algorithm. However, with the interpereter you essentially need a series of if statements (or just a case statement) that matches each value of your genetic string with a setting for the entity's phenotype.

For example:

If I have a genetic string that has 3 values
1) S is to give a +1 to the Strength stat in the phenotype
2) D is to give a +1 to the Dexterity stat in the phenotype
3) M is to give a +1 to the Mental stat in the phenotype

I might ahve the genetic string:
SSMMDSMDDDMSSSMMDDMS

When this is passed through the interpereter you end up with:
Strength: 7
Dexterity: 6
Mental: 7

Of course you can have more complex code for the interpereter if you want, but this was just an example.

Another way to have the interpereter is to use a Finite State Machine (FSM) where you can have several different interperetations for a certain value depending on what state the machine is in (even including ignoring certain values in certain states). This FSM is a vary powerful way to handle a Genetic Algorithm, but it is also fairly complex (but if you are up to it is can produce some amazing results).

With a FMS interpereter, you can have certain values change the state of the interpereter, and these states could reflect components of the entity. So a certain value might put the FSM into a state where you describe the limb sizes, shampes, numbers and positions, and another might describe the entities stats, or even AI. FSm interperesters give much more flexability to the Genetic Algorithms but at the cost of complexity.

The problem with Sport is that alothough it allowed variation, it didn't have any real selection (because if the player died then they would just respawn). Most "Evolution" games I ahve seen have left out this very important step (and by not having selection it nolonger fullfills the requierments to be defined as evolution).

What you need for an evolution game is for the game to allow the entities to reproduce, allow variation in the offspring and give some way for the traits to be selected for or against.

Spore allows the player to reproduce (but not in large numbers), it allows the player to give variation (in fact this is the main part of the game in the early stages), but there is not real selection going on at all (and so it fails at being an evolution game).

I used to have a screen saver that was an evolution "game" (well there wasn't any goals so it wasn't quite a game). It would spawn a bunch of creatures that consisted of lines.

Each line would be one of 3 forms (Green = Photosynthising, Red = Carnivourous, Blue = Energy Store). A creature could gain energy from the the green lines, but it could also steal energy from another creature if its red line touched one of the other creature's lines (of any colour). Blue lines would allow it to store energy, and once it had enough energy it would reproduce, or if its energy was reduced to 0 it would die.

Each of the lines had the number, colour, direction, size (bigger lines were better) and where it joined another line as part of the genetic code, so over time the creatures would adapt to each other and the population would develop.

The part where the player can in was that you could select a creature to kill (drain energy from), or help (give energy to). So the player had control over the selection process.

This screen saver fulfilled the criteria to be an evolutionary system: Reproduction, Variation and Selection.

So to make an evolutionary game, you will need to include all 3 of those criteria in it.
Quote:Original post by Edtharan
What you want is a genetic algorithm.


Sorry I thought that much was already implied in my original post.

My questions were about what features to grade in the genome and what degrees of freedom in environmental control the operator should have.

Naturally I have intended to use a genetic algorithm from the start. Just a much slower implementation than what is normally used, except in cases where players fast forward time.

To clarify for others posting here, I have a solid understanding of AI algorithms and a very deep understanding of evolution. I'm only interested in details for creating an evolution simulator/game that would be fun and produce interesting results and allow the user to exert some directed control over the evolution of species.

It's a game. In real life you'd have to be some kind of omniscient being to steer evolution in a given direction by directly tweaking environmental parameters, but this isn't a debate on the fundamentals of evolution. Just the practicality and mechanics of the simulator/game in question.

This topic is closed to new replies.

Advertisement