Jump to content

  • Log In with Google      Sign In   
  • Create Account

Way's to evolve enimies


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 studentTeacher   Members   -  Reputation: 915

Like
0Likes
Like

Posted 19 August 2013 - 05:28 PM

I've been looking into a topic of interest for myself, and the real issue I've had the past couple months are keywords. I don't always know exactly what to search, to find the results I want. So here I am, looking to see if I can get some help looking for resources.

 

What I'm making is a voxel-destructible sandbox RPG adventure game that, for enemies, I want to evolve against the user. Not just a neural-network sort of thing, but evolve in a Darwin sort of way. Not just their strategy and path-finding, but also their physical structure, their weapons, and everything else. These special enemies will be bosses/droves that come in waves; where between each wave, the game can spend a substantial amount of time allocating a little time each frame to stepping up the evolution of these enemies, based on the previous wave's battles against the user.

 

These enemies will not be building themselves from the ground up. They will start out with an easy-leveled, predefined behavior and animated physical structure, defined in a way that they can then modify between each wave thereafter the first wave. One thing I've thought about is if I absolutely have to settle on something less procedural, I can make my enemy system more modular, where body parts, animations, and strategies can be interchanged based on some simpler AI. I'd rather go the procedural route, however, as it is far more interesting and fun biggrin.png

 

Two issues, really.

 

(1) Does this sound feasible / doable with today's close-to-top-end computers? I don't want to pursue down this road too far if this is not reasonable. If this is not reasonable, are there ways to make it reasonable? I don't have a time limit or person limit on this project, so being able to implement the system is a short amount of time is not a solution; this is educational for me too. I just want to know, on a reasonable scale, how doable this is with the right software practices and computer restraints. I can use openCL, and other languages to run things on the GPU, as well. 

 

(2) If it is doable, what types of research paths should I head down? I'm looking mainly for keywords or topics to research, as finding the right things to research is taking it out of me. If you have anything more detailed to say, or even want to discuss this topic further, I'd be glad to; I haven't completely fleshed out the idea 100% yet.

 

------

If I haven't been too clear, just ask. I mean for this to be a way of discussing this idea, as well as getting some ideas of what steps to take next. 

 

NOTE: I have experience with neural networks, most AI algorithms you'd find in a book or in-depth class on AI, and topics in game theory and machine learning. I'm not starting from scratch with this idea or AI in general. My main areas of naivety are mainly in the evolutionary side of things, mostly biological and chemical influences on the way to computerize evolution.

 

Thanks for taking the time to help me out! biggrin.png



Sponsor:

#2 Norman Barrows   Crossbones+   -  Reputation: 2357

Like
0Likes
Like

Posted 19 August 2013 - 08:53 PM

genetic algorithms


Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

 

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

 

 


#3 dehe   Members   -  Reputation: 118

Like
2Likes
Like

Posted 20 August 2013 - 12:37 AM

Hi,

check out

http://www.ai-junkie.com/

great page about genetic algorythms/neural networks



#4 levis501   Members   -  Reputation: 113

Like
1Likes
Like

Posted 20 August 2013 - 11:34 AM

I would agree that genetic algorithms (GA) is good way to go.  In short, these types of algorithms simulate Darwinian evolution.  In general, GA is not very computationally intensive.

You'll need to come up with a set of parameters (genes) that guide an AI's behavior. The first AIs that a player encounters will have these parameters set to values that provide descent behavior.  The parameters for each instance of the AI in this first generation should vary a bit.

  Next, you'll need to come up with a function which scores how well a particular AI performs.  This score might take into account how much damage the AI caused the player, and if the AI survived the round.  This score is known as the "objective function" in GA.

  After each round, the genes for the best scoring AIs are mated to create a new generation of AIs.  There are many ways to mate individuals, and will depend upon the genes, and the tradeoff between how quickly you want the AIs to evolve, and how much the game can tolerate malfunctioning AIs.

  Check out some of the resources on GA, and write back if you want to discuss more.



#5 studentTeacher   Members   -  Reputation: 915

Like
0Likes
Like

Posted 20 August 2013 - 11:54 AM

 

I would agree that genetic algorithms (GA) is good way to go.  In short, these types of algorithms simulate Darwinian evolution.  In general, GA is not very computationally intensive.

You'll need to come up with a set of parameters (genes) that guide an AI's behavior. The first AIs that a player encounters will have these parameters set to values that provide descent behavior.  The parameters for each instance of the AI in this first generation should vary a bit.

  Next, you'll need to come up with a function which scores how well a particular AI performs.  This score might take into account how much damage the AI caused the player, and if the AI survived the round.  This score is known as the "objective function" in GA.

  After each round, the genes for the best scoring AIs are mated to create a new generation of AIs.  There are many ways to mate individuals, and will depend upon the genes, and the tradeoff between how quickly you want the AIs to evolve, and how much the game can tolerate malfunctioning AIs.

  Check out some of the resources on GA, and write back if you want to discuss more.

 

 

 

This is sort-of what I should have expected to hear tongue.png
 

Genetic programming and algorithms seems like something that would be a good base, especially for intelligent aspects of mutation, or varaiables that can chage by vectors or scalar values (motor movements, for example). I was more wondering if there's anything a little more specific to physical mutations in enemies, not so much the way they think; I know genetic algorithms can do this, but how...does anyone have an idea on how I could rate the fitness of a physical mutation on an enemy? Or how I can define changes to the physical structure or animations? I'm trying to figure out how to define physical mutations to their bodies...Hence the change in physical attributes, weapons (claws vs. fangs, or poison, etc.), and other less...mental attributes.

 

I can picture how to define motor movement using genetic algorithms, and rating their fitness to, say, how fast they move. They just change the values for forces, torque, and speed of the moving limbs. But how would one define the fields that can change for physical mutations? Just a thought deeper into the process...

 

-ST

 

EDIT: spelling...


Edited by studentTeacher, 20 August 2013 - 12:41 PM.


#6 levis501   Members   -  Reputation: 113

Like
0Likes
Like

Posted 20 August 2013 - 12:35 PM

 

 

I would agree that genetic algorithms (GA) is good way to go.  In short, these types of algorithms simulate Darwinian evolution.  In general, GA is not very computationally intensive.

You'll need to come up with a set of parameters (genes) that guide an AI's behavior. The first AIs that a player encounters will have these parameters set to values that provide descent behavior.  The parameters for each instance of the AI in this first generation should vary a bit.

  Next, you'll need to come up with a function which scores how well a particular AI performs.  This score might take into account how much damage the AI caused the player, and if the AI survived the round.  This score is known as the "objective function" in GA.

  After each round, the genes for the best scoring AIs are mated to create a new generation of AIs.  There are many ways to mate individuals, and will depend upon the genes, and the tradeoff between how quickly you want the AIs to evolve, and how much the game can tolerate malfunctioning AIs.

  Check out some of the resources on GA, and write back if you want to discuss more.

 

 

 

This is sort-of what I should have expected to hear tongue.png
 

Genetic programming and algorithms seems like something that would be a good base, especially for intelligent aspects of mutation, or varaiables that can chage by vectors or scalar values (motor movements, for example). I was more wondering if there's anything a little more specific to physical mutations in enemies, not so much the way they think; I know genetic algorithms can do this, but how...does anyone have an idea on how I could rate the fitness of a physical mutation on an enemy? Or how I can define changes to the physical structure or animations? I'm trying to figure out how to define physical mutations to their bodies...Hence the change in physical attributes, weapons (claws vs. fangs, or poison, etc.), and other less...mental attributes.

 

I can picture how to define motor movement using genetic algorithms, and rating their fitness to, say, how fast they move. They just change the vales for forces, torque, and speed of the moving limbs. But how would one define the fields that can change for physical mutations? Just a thought deeper into the process...

 

-ST

 

 

GA works well for physical structures, and weapons as well.   See videos for "evolved virtual creatures" or "Karl Sims".



#7 DareDeveloper   GDNet+   -  Reputation: 978

Like
0Likes
Like

Posted 20 August 2013 - 01:08 PM

If you find anything about meta 3D models ... please let me know. If I knew any resources I'd tell you.

I think I have seen something about the generation of trees ... and of course terrain but nothing dealing with living creatures.

 

I guess you could define your own kind of model filetype with multidimensional object variants and map the appearance to the evolving data.

 

Imagine there is a base model of a person and several variants (large, fat, muscular, skinny ...) and they differ only in the position of the vertices.

You could blend between the variants (30% muscular, 50% skinny, 15% fat, 5% large - not very tanky example I guess) by moving the vertices x percent along the variant vectors (30% from base to muscular, 50% from the result to skinny etc.).

Multidimensional meaning that there could be several arm/leg/torso models and each one has the variants mentioned before ... or maybe you could even blend between species.

Maybe some vertices would be positioned relative to each other ... the groups would be positioned relative to each other based on bone length which could be evolved.

Not sure how that would turn out, though.

 

I guess there are quite a few videos out there that could be interesting.

http://www.ted.com/talks/torsten_reil_studies_biology_to_make_animation.html

Maybe the initial state (even the movements) could be pre-evolved and evolve further from there.

 

I know there is another video where a guy simulated crowds in a train station to optimize the architecture. I think that would be great too ... measuring and evolving how well they performed as a team so that they can create classes and the composition of their army.

<edit>found it:

 

Guess the biggest problem might be that everything seems to be interdependent. Guess it will be hard to deal with that when you need to figure out how well the evolution worked and what aspects are to blame for any kind of failure.


Edited by DareDeveloper, 20 August 2013 - 02:16 PM.

Given enough eyeballs, all mysteries are shallow.

ProcGames.com


#8 studentTeacher   Members   -  Reputation: 915

Like
0Likes
Like

Posted 21 August 2013 - 12:02 AM

I've seen EVC and that's close to what I want to work on...and I've seen some of the guy's lectures on the topic of evolutionary computing. He talks about how the bodies are constructed recursively, like a tree structure, and from there can define movement; however, I still have trouble understanding the mutation part of the process; how does the program decide how to change the physical structure? How does it define its choices or the resulting "population" to choose from or test? Guess I'll have to take some time to think this through.....






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS