I have this game concept I've been working on for a while and I'd like to get some feedback on it. It's nothing terribly ambitious, just an arcade get-high-score type game, but I think it's an interesting idea.
The basic idea is that the player is a flying predator feasting on a swarm of food critters (based on "boids") before bailing out to hibernate/migrate/otherwise move on. The players energy would constantly be draining from flying around so much, and every bug caught would add a bunch of energy. The objective would be to bail out with the most energy you could get which would then be your score.
The tricky part comes in that the critters reproduce quickly to restock their numbers, and they have hereditary genetics, so they are capable of evoloution. The idea is that as the player eats the critters that he can catch, the survivors get to reproduce, so the population tends to adapt to the players strategy/presence, theoretically to the point where the player can no longer catch them fast enough and would have to bail out and log the score. Hopefully, if done right, the player would be able to use a variety of strategies to counter and prolong the natural evoloution of the critters to get a higher score.
I have built a prototype of the game, so far it's pretty fun. I havn't got the evoloution to happen fast enough, though I think it's just a matter of tweaking mutation rates and having the right areas that the critters can vary in, etc. I'd love to show a screenshot of it, but I haven't bothered to figure out how yet, and the graphics arent very impressive. I suppose I will report again when I get things further along if people are interested, might post the source if I can package it nicely.
Anyways, I'd like to ask what everyone thinks of the concept, and if there is anything that you think could make it better. I'll also explain it in more detail if anyone is interested.
Thanks
Yet Another (Evoloution) Game Idea
That sounds pretty cool.
Do the food critters have their own energy reserves? Do they need to find their own food, or do they just fly around and try to avoid the player?
What kind of features do the critters get to change as they evolve? Sight distance? Sight accuracy/polling rate? Turning rate? Acceleration? Speed? Is there any disadvantage to evolving these stats to 'better' levels (if the critters consumed their own energy reserve, improved stats would probably increase energy consumption).
A very simplistic artificial life simulator I found a long time ago had a similar design (except the player could not fly in the world, you just watched). I'll describe the simulator and you might get some ideas to use.
There were two entity types: Plant and Animal. Animals were split into Herbivores and Carnivores. There were no Omnivores.
Plants: Eaten by herbivores. Provide a fixed amount of energy to herbivores. Randomly respawn in a new location when eaten.
Animals had the following properties:
- Energy which constantly decreases over time and the critter dies when it hits zero. If the energy amount hits a certain limit, the creature 'reproduces' into a large number of critters with random mutations.
- A forward-facing sight cone which feeds a perceptron-style neural network, which outputs two nodes: thrust values for two 'thrusters' which act like tank-tread style driving controls. The sight cone is broken into 5 sectors, with each sector reporting the amount of plant, herbivore, and carnivore presence in that sight-sector.
- The sim would always start with neural network weights hand-tuned by the creator of the simulator designed to function at a basic level. Herbivores would attempt to drive towards food and away from carnivores. Carnivores would attempt to drive towards herbivores.
- Animal evolution would randomize some of the weights in the neural network. No other animal properties would change.
- Carnivores attempting to eat Herbivores get "trampled" in the attempt if the herbivore had a higher energy level than the carnivore (with some amount of random chance).
The amazing thing is that with enough tuning of simulation parameters, I eventually observed some carnivores which evolved 'camping' tactics - they would stay near food and eat any weak herbivore that got too close.
I found that it was VERY difficult to keep the simulation stable (an interesting amount of both herbivores and carnivores) once the carnivores got too effective (or too ineffective).
[Edited by - Nypyren on June 5, 2010 1:07:47 AM]
Do the food critters have their own energy reserves? Do they need to find their own food, or do they just fly around and try to avoid the player?
What kind of features do the critters get to change as they evolve? Sight distance? Sight accuracy/polling rate? Turning rate? Acceleration? Speed? Is there any disadvantage to evolving these stats to 'better' levels (if the critters consumed their own energy reserve, improved stats would probably increase energy consumption).
A very simplistic artificial life simulator I found a long time ago had a similar design (except the player could not fly in the world, you just watched). I'll describe the simulator and you might get some ideas to use.
There were two entity types: Plant and Animal. Animals were split into Herbivores and Carnivores. There were no Omnivores.
Plants: Eaten by herbivores. Provide a fixed amount of energy to herbivores. Randomly respawn in a new location when eaten.
Animals had the following properties:
- Energy which constantly decreases over time and the critter dies when it hits zero. If the energy amount hits a certain limit, the creature 'reproduces' into a large number of critters with random mutations.
- A forward-facing sight cone which feeds a perceptron-style neural network, which outputs two nodes: thrust values for two 'thrusters' which act like tank-tread style driving controls. The sight cone is broken into 5 sectors, with each sector reporting the amount of plant, herbivore, and carnivore presence in that sight-sector.
- The sim would always start with neural network weights hand-tuned by the creator of the simulator designed to function at a basic level. Herbivores would attempt to drive towards food and away from carnivores. Carnivores would attempt to drive towards herbivores.
- Animal evolution would randomize some of the weights in the neural network. No other animal properties would change.
- Carnivores attempting to eat Herbivores get "trampled" in the attempt if the herbivore had a higher energy level than the carnivore (with some amount of random chance).
The amazing thing is that with enough tuning of simulation parameters, I eventually observed some carnivores which evolved 'camping' tactics - they would stay near food and eat any weak herbivore that got too close.
I found that it was VERY difficult to keep the simulation stable (an interesting amount of both herbivores and carnivores) once the carnivores got too effective (or too ineffective).
[Edited by - Nypyren on June 5, 2010 1:07:47 AM]
Yes the critters have thier own energy balance. If they manage to get alot of energy, they get to split in two (reproduce). If they lose all thier energy, they fizzle out and die. I am going to make it so that accelerating costs energy too (it doesn't right now).
So far they don't actually have to go find food, they just sort of absorb it out of the air. I think eventually they will have to find particularly rich spots to absorb it out of. If they crowd each other, they get less food and eventually starve, so that keeps the population balanced.
As for particular "genes" I'm thinking for physical characteristics, a tradeoff between food-absorbing efficiency, thrust force, and sensor range. Turning rate is a good one too, right now turning rate isn't meaningful (the model is instant turn), but I do intend to add turning stuff to the model at some point, so I'll probly add that.
For behavior, it's all stuff like how the critter reacts (velocitywise and positionwise) to the predator, its visible friends, food, and such, and then how these change with fear/hunger/friend density/etc. Right now not all of these are implemented, but I'm working on it. Polling rate is once per frame right now, but it might be efficient to do it every few frames instead. I don't want to make anything that can affect computational performance into an evolved trait, so that they don't just evolve into CPU-hounds.
I had more genes but I noticed that with more genes, evoloution is slower, so I will have to find a balance between how much the genes can express and how fast evoloution can proceed. It's going ot be difficult to get things traded off just right, as I am trying to squeeze a million-year timescale process into a few-minutes timescale videogame. I think I should be able to make it work, though.
So far they don't actually have to go find food, they just sort of absorb it out of the air. I think eventually they will have to find particularly rich spots to absorb it out of. If they crowd each other, they get less food and eventually starve, so that keeps the population balanced.
As for particular "genes" I'm thinking for physical characteristics, a tradeoff between food-absorbing efficiency, thrust force, and sensor range. Turning rate is a good one too, right now turning rate isn't meaningful (the model is instant turn), but I do intend to add turning stuff to the model at some point, so I'll probly add that.
For behavior, it's all stuff like how the critter reacts (velocitywise and positionwise) to the predator, its visible friends, food, and such, and then how these change with fear/hunger/friend density/etc. Right now not all of these are implemented, but I'm working on it. Polling rate is once per frame right now, but it might be efficient to do it every few frames instead. I don't want to make anything that can affect computational performance into an evolved trait, so that they don't just evolve into CPU-hounds.
I had more genes but I noticed that with more genes, evoloution is slower, so I will have to find a balance between how much the genes can express and how fast evoloution can proceed. It's going ot be difficult to get things traded off just right, as I am trying to squeeze a million-year timescale process into a few-minutes timescale videogame. I think I should be able to make it work, though.
With the simulator I mentioned previously, the way it was able to evolve animals so quickly (in matter of minutes, anyway) was that when an animal split up, it split into a LARGE number (20-50) new critters instead of just two, with each one having a slightly different variation than its siblings.
The world usually had 50-100 plants and between 500 and 3000 animals active at any given time. The rendering was just 2x2 colored blue/red pixels for animals though, so not very graphically intense.
I'm not sure how many critters your game can/will support, but having higher 'offspring' count definitely helps evolve faster.
(Edit) Found it! It's called 'Bitozoa 2': Link
The world usually had 50-100 plants and between 500 and 3000 animals active at any given time. The rendering was just 2x2 colored blue/red pixels for animals though, so not very graphically intense.
I'm not sure how many critters your game can/will support, but having higher 'offspring' count definitely helps evolve faster.
(Edit) Found it! It's called 'Bitozoa 2': Link
Oh you added a bunch to your post. Here is my reply to the new stuff.
That sounds really cool, reminds me of some stuff I used to try to do in the starcraft map editor. Looks like energy balance ideas tend to converge on the same idea. I'm also trying to add sexual aspects to the reproduction as a way to make the evoloution more effective (horizontal gene transfer).
The neural-net thing is pretty cool, but I don't think they evolve fast enough for my purposes, and I havn't seen them produce very good results either. I'm hoping a well-tuned structured approach will allow relevant adaptations to occur in a timely manner. Unfortunately, the structured approach doesn't have the same possibilities for advanced emergent behavior (camping in your sim). The behavior model with the sectors and amounts seems interesting, I might have to incorporate some of that.
Stability will probably be an issue for me, though I havn't had too much trouble yet. I imagine that population busts will be part of the game, and part of the strategy will be avoiding them. Booms will be controlled by a finite food supply.
For initial conditions in my game, the story is that the area has been undisturbed by predators for a bit and the player just arrived, so the critters are all tuned for maximum harvesting. This sort of brings me to the setting and story of the game, so I'll describe a bit of that.
This game is just a little slice of life for some magical lifeforms in a world that I've been thinking up for some other games that I want to do. Basically there is this magical energy in clouds that the little critters feed on, and then there are larger predators that travel between clouds, eating the little guys to stock up on energy for the journey to the next cloud. The predators obviously want to maximise thier margin for how long they can wait before the next feeding, and how much other stuff they can do in between, so they want to get as much energy as possible in a given cloud, which is where the player and the high score come in. The bigger clouds would have many more predators in them, and the "herbivore" life would be tuned for that, plus there would be competition from other predators. The scenario that the player plays would take place in a small isolated cloud that hasn't had other predators in a while. The small cloud population is unprepared for the predator, so the predator can get a good fill, but the critters will adapt quickly, so the predator can't just hang out indefinitely.
That sounds really cool, reminds me of some stuff I used to try to do in the starcraft map editor. Looks like energy balance ideas tend to converge on the same idea. I'm also trying to add sexual aspects to the reproduction as a way to make the evoloution more effective (horizontal gene transfer).
The neural-net thing is pretty cool, but I don't think they evolve fast enough for my purposes, and I havn't seen them produce very good results either. I'm hoping a well-tuned structured approach will allow relevant adaptations to occur in a timely manner. Unfortunately, the structured approach doesn't have the same possibilities for advanced emergent behavior (camping in your sim). The behavior model with the sectors and amounts seems interesting, I might have to incorporate some of that.
Stability will probably be an issue for me, though I havn't had too much trouble yet. I imagine that population busts will be part of the game, and part of the strategy will be avoiding them. Booms will be controlled by a finite food supply.
For initial conditions in my game, the story is that the area has been undisturbed by predators for a bit and the player just arrived, so the critters are all tuned for maximum harvesting. This sort of brings me to the setting and story of the game, so I'll describe a bit of that.
This game is just a little slice of life for some magical lifeforms in a world that I've been thinking up for some other games that I want to do. Basically there is this magical energy in clouds that the little critters feed on, and then there are larger predators that travel between clouds, eating the little guys to stock up on energy for the journey to the next cloud. The predators obviously want to maximise thier margin for how long they can wait before the next feeding, and how much other stuff they can do in between, so they want to get as much energy as possible in a given cloud, which is where the player and the high score come in. The bigger clouds would have many more predators in them, and the "herbivore" life would be tuned for that, plus there would be competition from other predators. The scenario that the player plays would take place in a small isolated cloud that hasn't had other predators in a while. The small cloud population is unprepared for the predator, so the predator can get a good fill, but the critters will adapt quickly, so the predator can't just hang out indefinitely.
Quote:
Original post by Nypyren
With the simulator I mentioned previously, the way it was able to evolve animals so quickly (in matter of minutes, anyway) was that when an animal split up, it split into a LARGE number (20-50) new critters instead of just two, with each one having a slightly different variation than its siblings.
The world usually had 50-100 plants and between 500 and 3000 animals active at any given time. The rendering was just 2x2 colored blue/red pixels for animals though, so not very graphically intense.
I'm not sure how many critters your game can/will support, but having higher 'offspring' count definitely helps evolve faster.
(Edit) Found it! It's called 'Bitozoa 2': Link
Good to know, I will try that. And I'll take a look at that link too. Thanks for your help!
In real evolution sexual reproduction (as opposed to asexual reproduction) is better because it provide more variety in the genomes wihtout them becomeing too subject to harmful mutations.
The reason for this is that with sexual reproduction two functional genomes (genotypes) are merged into one phenotype (the offspring). Because both parents had functional genomes, then the ofspring is much more likely to end up with a functional genome, and because there is two genomes instead of one genome, there can be much mroe variation in the offsprings genome.
In Genetic Algorithms, this can be done by allowing each organism to have two genomes (one from each parent), and when they produce an offspring, they randomly select one of their two genomes to impart to the offspring.
The main difficulty lies in how to integrate two genomes into one phenotype. The easiest way is to break the genomes up into sections and randomly select a section to be included into the phenotype
EG:
Genome 1: [ABC][DEF][GHI]
Genome 2: [abc][def][ghi]
Phenotype: [ABC][def][ghi]
If you want to include more complexity, you could include a "Gene" that increase the likelyhood that that section will be chosen for inclusion into the phenotype. This would then have to compete with the "functional" genes that encode for the creature's properties.
The reason for this is that with sexual reproduction two functional genomes (genotypes) are merged into one phenotype (the offspring). Because both parents had functional genomes, then the ofspring is much more likely to end up with a functional genome, and because there is two genomes instead of one genome, there can be much mroe variation in the offsprings genome.
In Genetic Algorithms, this can be done by allowing each organism to have two genomes (one from each parent), and when they produce an offspring, they randomly select one of their two genomes to impart to the offspring.
The main difficulty lies in how to integrate two genomes into one phenotype. The easiest way is to break the genomes up into sections and randomly select a section to be included into the phenotype
EG:
Genome 1: [ABC][DEF][GHI]
Genome 2: [abc][def][ghi]
Phenotype: [ABC][def][ghi]
If you want to include more complexity, you could include a "Gene" that increase the likelyhood that that section will be chosen for inclusion into the phenotype. This would then have to compete with the "functional" genes that encode for the creature's properties.
Quote:
Original post by Edtharan
In real evolution sexual reproduction (as opposed to asexual reproduction) is better because it provide more variety in the genomes wihtout them becomeing too subject to harmful mutations.
The reason for this is that with sexual reproduction two functional genomes (genotypes) are merged into one phenotype (the offspring). Because both parents had functional genomes, then the ofspring is much more likely to end up with a functional genome, and because there is two genomes instead of one genome, there can be much mroe variation in the offsprings genome.
In Genetic Algorithms, this can be done by allowing each organism to have two genomes (one from each parent), and when they produce an offspring, they randomly select one of their two genomes to impart to the offspring.
The main difficulty lies in how to integrate two genomes into one phenotype. The easiest way is to break the genomes up into sections and randomly select a section to be included into the phenotype
EG:
Genome 1: [ABC][DEF][GHI]
Genome 2: [abc][def][ghi]
Phenotype: [ABC][def][ghi]
If you want to include more complexity, you could include a "Gene" that increase the likelyhood that that section will be chosen for inclusion into the phenotype. This would then have to compete with the "functional" genes that encode for the creature's properties.
Thanks for the info! As it is, my organism's genes are real numbers, and genotype and phenotype are not distinct. When they do a combination from parents to child, it's just a randomly wieghted average. I can't think of how any other system would give significantly more interesting results, so I'll keep it as is.
I'm only looking at sexual reproduction as a way to keep the population's genetics somewhat unified as a species, instead of having each individual essentially being it's own species, which is the problem with asexual systems.
Your selfish "copy this section" gene is an interesting idea, though it might just end up monopolizing the genome, as any that appeared would get copied at the expense of useful genes. I think it would be fun to have some stuff like that if I do an experimental system (I would also insist on a turing-complete genetic code), but I don't see it adding value to a system where the objective is to optimize critters quickly.
Thanks!
Quote:
I can't think of how any other system would give significantly more interesting results, so I'll keep it as is.
I did some GA programming about 15 years (or so) ago, and one GA system I cam up with was using genes to add a value to a stat.
Each gene of a creature (or NPC, etc) can be thought of as a string (or a 1 dimentional array) of function calls (this is an important concept). The value in each elemnt of the array references a particulat function to run on the creature.
Each function can be as simple or as complex as needed. But mainly you will need the function: Add 1 to Stat Y. SO if you had a section of gene that was [SSSSSSS] and the letter 'S' ment call the function: Add 1 tyo the Strength Stat , then the result of reading that section of the genome would be that the strength stat would have the value 7 added to it (and if it started at 0 then it would equal 7).
You could get a more complex one like this
[SDSDDSS]
Where:
S = Add 1 to Strength
D = Add 1 to Dexterity
The result you get would be:
Strength +4
Dexterity +3
Of course you don't have to use letters, you can use whatever symbology you like (like numbers), all you have to do is map the particular value in the array elemnt to a function and allow the GA to change the values in each element during mutation.
There are more complexities you can add to it (like chromosomes and dominance) but these are not necesary. It is even possible to have the what stats exist defined by the genes and even define function that other genes call (but this is very complex GA design and most liekly beyond what you are needed for a game but they were ideas I was using with my GAs that I did).
Quote:
Original post by Edtharan Quote:
I can't think of how any other system would give significantly more interesting results, so I'll keep it as is.
I did some GA programming about 15 years (or so) ago, and one GA system I cam up with was using genes to add a value to a stat.
Each gene of a creature (or NPC, etc) can be thought of as a string (or a 1 dimentional array) of function calls (this is an important concept). The value in each elemnt of the array references a particulat function to run on the creature.
Each function can be as simple or as complex as needed. But mainly you will need the function: Add 1 to Stat Y. SO if you had a section of gene that was [SSSSSSS] and the letter 'S' ment call the function: Add 1 tyo the Strength Stat , then the result of reading that section of the genome would be that the strength stat would have the value 7 added to it (and if it started at 0 then it would equal 7).
You could get a more complex one like this
[SDSDDSS]
Where:
S = Add 1 to Strength
D = Add 1 to Dexterity
The result you get would be:
Strength +4
Dexterity +3
Of course you don't have to use letters, you can use whatever symbology you like (like numbers), all you have to do is map the particular value in the array elemnt to a function and allow the GA to change the values in each element during mutation.
There are more complexities you can add to it (like chromosomes and dominance) but these are not necesary. It is even possible to have the what stats exist defined by the genes and even define function that other genes call (but this is very complex GA design and most liekly beyond what you are needed for a game but they were ideas I was using with my GAs that I did).
Thanks for all the ideas, I'll have to try them out some time to see what I can do with them.
I notice that there is an optimization that can be done on this system: assuming permutation doesn't matter, instead of saying {SSSDDDD} or some permutation of that, you could say {S=3, D=4} which would take up way less room. But then the procedure for combining or splitting would have to do a bit more work, probably with binomial or hypergeometric sampling thrown in somewhere. This was my original plan, but I decided to use a simpler averageing combiner/splitter procedure with real numbers instead of a hypergeometric or binomial with natural numbers.
Of course this is all mostly irrelevent, I don't think it matters much exactly how the genes work as long as traits are hereditary and mutation occurs. The real trick is coming up with a set of genes that allows alot of flexibility, but is small enough to allow quick adaptations.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement