Jump to content
  • Advertisement
Sign in to follow this  
Threads

Right chaps, time to play god.

This topic is 2948 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello my fellow blasphemes.

I have three questions, but first I'll breifly summarize what I want to produce. My goal is to simulate an ecosystem of plants and animals by creating a system of evolution. So in effect, I want to run my program and end up with a bunch of plants and animals I didn't design. Eventually I'd like to use this same system in a game-context, but first I'd like to see it work.

My questions are this:

1) Where should my program begin? From cells? Basic life? Fully fledged species?

2) How should the 'genes' work? And the mutation?

3) Finally, does anyone know any example of this being done before that I could look at for reference?

Thanks for your time. I feel this would be a really interesting project and I'd love to manage it.

All help appreciated and all that.

Share this post


Link to post
Share on other sites
Advertisement
if you only want plants and animals, I'd start with existing plants and animals. I'd make a list of all the shapes of bodyparts used by existing creatures. Then from that you want to extract a genetic system which will give you that array of parts, and tell you how to put them together. It doesn't have to be like real genetics - I personally like games which use a monoploid genome, which eliminates recessive and dominant genes.

Share this post


Link to post
Share on other sites
Thanks for the reply, Sun.

That's not bad at all as a starting point. It's likely that I'll choose to follow this line of doing things. What I want to accomplish in the end though is to have creatures evolve in strange ways and do things I don't expect them to do. In other words, I'm not sure how to deal with behaviour and senses.

Share this post


Link to post
Share on other sites
Overview

The design I am describing has these parts:
o Classification of organism subsystems
o Format of the Genome and its mutations
o Laws

Classification of Organism Subsystem

I think you can set the line of abstraction at the level of an organism subsystems. For each organism, I think you can have these common mutable subsystems to describe each organism:

o Digestive system. This system determines what the organism can digest
o Energy storage system. This determines how much energy it can store
o Muscular system. This determines how strong and how fast it can move
o Sensory system. This determines how far and what it can sense
o Control system. This determines what it will try to eat, avoid, grow, and mate
o Add more if you want

The Genome and its Mutations

Each gene of the organism can be interpreted as a property for 1 or more systems. In the game, a gene is a string of bytes. A gene is like this:

[ one system byte that starts with 00 ]-[ n information bytes ]

The properties of the organism is determined by scanning through its genome, and interprets the first few genes for each system that it encounters. If the genome contains multiple genes for a system, the organism will only use the first few that it reads, and ignore the rest of the genome.

Mutation operations include:
o Bit flipping.
o Bit shifting
o Byte swapping
o Byte reversing
o Byte shifting
o Byte insertion
o Byte removal
o Add more if you want

Each system has its own way to interpret a gene. All interpretable gene must have a SysByte and at least one InfoByte.

Example:

Digestive System SysByte = 0000 0001
A valid Digestive System gene has five InfoBytes. The first byte specifies the minimum temperature for the organism to digest. The second byte specifies the max temperature. The third InfoByte is a number that specifies what material the organism can digest. The fourth InfoByte specifies the amount of material it can consume per day. The fifth InfoByte specifies the the amount of energy it gets for each unit of digested material.
[0000 0001][Min Temp][Max Temp][Material ID][Consumption Rate][Energy %]

Energy Storate System SysBute = 0000 0010
A valid gene for this system has five InfoBytes. The first specifies the minimum temperature for the organism to survive. The second specifies the max temperature. The third specifies the max energy the organism can store. The fourth specifies the base energy loss of the organism. The fifth specifies the percentage of energy given to an offspring.
[0000 0010][Min Temp][Max Temp][Max Engy Strg][Base Engy Loss][Offspring Engy %]

... and so on

Universal Laws

These are meant to be a set of universal laws that governs all organisms. For example, you could have a law that determine how the size and content of the organism's genome relates to the organism's physical size and appearance.

This is the part where you could include what Sunandshadow is saying. For example, if the organism contains a muscular system gene that specifies that the organism can fly, then the laws would draw the organism with wings.



I can talk more if you are interested in coding it at this level.

Share this post


Link to post
Share on other sites
Wai. You are a Darwin among men.

Your genome explanation really cleared things up for me. Thank you. I feel a lot more confident about beginning the project now, which is probably the most important thing for its completion.

It'd be great if you go into more depth. I'd like to hear more of your ideas on this subject.

I'd still really like to hear if this kind of thing has been done before if anyone's come across such a thing.

Share this post


Link to post
Share on other sites
A minor improvement to the examples: Instead of [max temp] have [temp spread]. This prevents meaningless cases where min is greater than max.

Share this post


Link to post
Share on other sites
Quote:
Original post by Threads

I'd still really like to hear if this kind of thing has been done before if anyone's come across such a thing.


Closest I've seen to what you're talking about is in Star Wars Galaxies. They have a process in which Beast Masters can collect DNA strands from creatures. Equipment is needed too... an incubator unit, enzyme extractor, centrifuge, and some other stuff. They then incubate the eggs, and can either sell or hatch the egg themselves.

Beast Masters have full control over the color and combat skills of the beast. There is a significant random element to beast crafting too, including a random chance for mutations, which can improve combat stats or change the appearance of the creature being incubated. I think they have a 14 day free trial though if you want to check it out.

Can't say that I've seen anything like that for plants though.

Share this post


Link to post
Share on other sites
All of the explanations are just examples. You could modify it to fit what you want to do.

The temperature InfoBytes are for simulating the effect of habitat change and migration among other behaviors. But if you think that temperature is not a significant property of a region, you could change it to something else, like humidity, acidity, etc. I just picked temperature because it changes acorss regions.

But a principle behind the design is using one alphabet across all systems.

I think it is better to have [temp spread] as AngleWyrm said. The genome can carry meaningless genes, but I think it is better to just carry valid but unexpressed genes instead of meaningless genes.


Additional UnivLaws to Consider:

    A living organism must have at least one expressed gene for each for each system
      The longer the genome, the slower the organism grows
        The longer the genome, the more likely that a byte removal mutation will occur
          The longer the genome, the more likely that mutations will occur
            The faster an organism uses its energy, the hotter it gets.


            Muscular system

            [SysByte 0000 0100][Min Temp][Temp Rng][Movement ID][Power][Agility]

            The Muscular system determines the organism's modes of movement. A valid gene has five InfoBytes. Movement ID specifies a form of movement, such as running, grabbing, swimming, flying, bitting and also static features like horns. Each Movement ID corresponds to one or more limbs. The positions of those limbs and the shape of the organism are determined by the position of the gene in the genome and some additioanl UnivLaws that dictates how an organism grows during development:

              Muscle genes closer to the beginning of the genome grow first

              Power and Agility specify how the associated limbs can be used. They together affects the amount of energy consumed when the organism uses the movement. Higher power corresponds to denser muscles and more strength. Higher agility corresponds to having more joins, segments, or wider range or movement.

Share this post


Link to post
Share on other sites
There's a lot of research going on in this area, both here and there.. Here's an attempt at evolving virtual creatures:
http://www.cs.bham.ac.uk/~txm/creatures/
Here's another:
http://www.stellaralchemy.com/lee/virtual_creatures.php

Google "virtual creatures evolution" for some more info.

AI junkie has some nice programmers-articles on NN and mutation:
http://www.ai-junkie.com/

You might also want to read up on intelligent agents before setting up your model:
http://en.wikipedia.org/wiki/Intelligent_agent

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!