Sign in to follow this  
sooner123

Evolution game

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Could you do something along the lines of creating a pair of strings of bytes (as in the example Wai posted in the link Wai posted under your OP)?

Perhaps one "strand" could represent specific traits, as Wai outlined, but also phenotypic descriptors? For example, traits like pointy, blunt, hard, soft, muscular, etc. The second "strand" could contain information representing something along the lines of the position of that particular feature. So a trait that reads "sharp" and "bony" could end up positioned on a creature's back (like a porcupine) or at the ends of its limbs, as claws.

This information could be correlated to information in your game world, where objects also have physical descriptors that correspond to those in the animals. For example, a tree could have values that make it climbable, provided that an animal has the right combinations of strength, limb length, or features (like claws).

Inter-animal interactions could be easier to simulate, such as the amount of a creature's body covered with some form of protection, like a shell or spines, giving a lower probability of a predator succeeding in killing it, etc.

It's still a lot of work, but working at the feature level and using an approach like Wai's could allow for lots of novel combinations of traits, as well as varying levels of complexity for different animals.

As for how much the player can influence, that's tougher. My current suggestion would be to maybe look at what environmental features animal traits could interact with, and then work backwards to look at natural conditions that might prompt changes in those features. Did that make any sense?

Share this post


Link to post
Share on other sites
Yep. Working at the feature level was what I've been saying from the start.

I was saying that the feature level would be the only way to make things even remotely workable. Any lower level than that and we're talking about some serious cpu-crunching.

I like what you're saying about environmental properties that directly correspond in certain ways to some of the preconceived phenotypes of creatures. (surfaces that are more tactile to species that have some appendage with a terminus of some kind, etc.)

That actually is a step towards a way to work with the two major problems I outlined (how best to decide the complexity level of the genome and the phenotypes of individual alleles, and environmental control)

Because you see, designing the fundamental environment tools to be intimately related with all the phenotypes is definitely a step in the right direction of control and "steering."

I hadn't really thought of dealing with "properties," only "features" per se. Now things are starting to come together in my mind.

Share this post


Link to post
Share on other sites
About the gaming aspect:

My question is how many variables you should use in the game before it becomes too complicated to play. I suppose you could describe what the game might be like with very few variables, then expand on the complexity until it is too complicated to play.


Genre: Puzzle

Level 1:
Difficulty Level: Tutorial
Goal: Make the species evolve to become taller
Game: Adjust one environmental variable to kill off individuals with undesirable traits
Challenge: Identify the environmental variable among a few that will create the pressure.
Interactions: Paradise, no predator, no mating preferences

Level 2:
Difficulty Level: Tutorial
Goal: Make the species evolve toward a prototype
Game: Adjust one environmental variable at a time to kill off the other individuals
Challenge: Identify the order of environmental changes to do the job
Interactions: With predators, no mating preferences

and so on...

But so far it doesn't sound very fun to play. Is there a way to do the same without equating success to killing a sub-population?

Share this post


Link to post
Share on other sites
For the time being, I'm not sure there is. That's why I refer to it as a simulation/game. I'm kind of acknowledging that the minimum level of complexity might still preclude gamedom.

One thought I had was to have a fairly simple "game" mode with definite objectives, but to have the greater mass of the program be dedicated to a fairly complex sandbox.

In the long run, defining certain goals and achievements like evolving a species that could flourish in a given environment, or pitting your people against your buddy's people and see who wins, could add a little "gameness" to the platter.

But in the end, you're right. With all the functionality necessary to be able to freely evolve your critters to unanticipated heights and complexity levels, a widely appreciated game would be unlikely to form.

Share this post


Link to post
Share on other sites
here is what I would do:

start with a nice little landscape with some primitive creatures. The player can edit the map by planting seeds from a menu, changing the climate, causing mountains to form, etc... the important thing is to give the player some tools to manipulate the environment. In this landscape he can grab creatures and move them around, and kill them instantly (bolt of lightning?). His first goal is to get his creatures to split into two species.

This opens up several more landscapes (perhaps we will call them ecologies). One will be to create as many species as possible in a small ecology. Players can approach this in different ways but I imagine that most players will settle upon a system of islands, and trying to make each fertile enough so that predators will evolve to eat their specific prey. Each time the player gets to a new level of species it recognized this achievement. The player will also be able to bring his creatures from other ecologies to this one. If the species survives for three generations it counts towards the ranking. Another ecology might be called back to the sea. The goal is to get a species to live in the water. This one is timed. It will have a button to reset the scenario so you can try to improve your time.

All of these different landscapes will have a different challenge, and beating certain ones will unlock others. You will be able to take species from one to put into another most of the time, but sometimes you will be forced to start with primitive creatures. In some you can move creatures around and kill them, in others you can't. In some worlds you will be able to alter the climate, plant seeds, etc... but each world will have something that will make it special. Maybe one world is a city filled with humans and you have to evolve pests. While you are playing one world the other worlds still continue to evolve. If this takes too much processing power, even without the graphics being rendered, just have the game catchup when the player reenters.

Then of course there is multiplayer. Each player gets to place 20 creatures (probably of 3-5 species) into a large, empty world. After 20 minutes the game determines what percentage of the biomass each player controls and awards victory. It also awards medals for adapting in response to a predator and other things. So the multiplayer would basically be evolving your guys ahead of time, dropping them into an environment and seeing what happens. You would be trash-talking each other on chat the whole time.

Share this post


Link to post
Share on other sites
Hey nice idea for a game/simulator, the same idea crossed my mind years ago but never really done anything about it other then create small simulations of GA's, like this one:

http://www.zemerge.com/dev_javasimpians/simpians.htm

But ever since I've had new insights and revelations that made me start the following project called Zemerge. In short its a computing project of applying genetic algorithms and social simulations in order to find optimality in the mechanics of society.

Check it out:

http://zemerge.com/blog/

I'm in the middle of creating a flash concept prototype, any feedback would be great.

Share this post


Link to post
Share on other sites
I thought about this a lot. I came up with an idea.

The world starts with one species of creature, and then it has offspring. There are a number of variations and the player has to choose one base on its traits. The player plays the life of that little creature from birth, eating, growing, and ultimately finding a mate and breeding. This would actually be short, maybe 10 minutes, and then choose one variant in the new generation. This would end up in very long gameplay, developing changes over time. If the player dies before breeding the species is extinct, then load game or new game.
Not exactly evolution, but its the best way i could think to make something like this any fun.

Share this post


Link to post
Share on other sites
I just had a new thought. What if the game were multiplayer? Multiplayer games add an element of immediate competetiveness, which adds some spice even to dry tasks.

If the goals each player had could shift (achieve speciation such that you have X distinct species descended from Y organism for a 1 million year timespan, and then raise Z species total population above a certain number in 1,000 years), you could have multiple short-term objectives which each player could work towards for points. These points could then be used to fiddle with the other player's region/planet/whatever, to frustrate them from achieving their own objectives, a la Populous.

What impact each player could have on the other's progress would of course depend on the factors that players can influence, but competetiveness might be able to push this from the "simulation" to the "game" category.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this