Re: questoin on breve logic
jon klein <[email protected]> Fri, 1 Apr 2005 10:35:15 -0500
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
On Mar 31, 2005, at 10:34 AM, noz wrote: > i am thinking that for well defined behaviour a subroutine has to be > used as i am createing multiple behaviours. so when a creature is born > it is told what subrountines it will use, so for each object i can > create a new mix of subrountines. there characteristics will not just > be how fast they move and suchlike, it will also use qualtities like > daring where depending on the genes it has depends on weather it will > fight a strounger apponent and suchlike. so i want to taylor the > indevidual behaviour of each creature and each creature will carry a > interger as health and hunger. i want to make many multiples so i cant > have a a seperate part of the program for each, if i make a new > instance how do i difene that instance to use which subrountines and > keep its interget assigned to that instance? I'm not sure I fully understand the question, but a simple way to represent genes for an agent is using a list of values. When an agent inherits the behaviors from a parent, you can do a "copylist" to copy the parent behaviors and then use mutation or crossover on the resulting list or lists. You then use the values in the list to represent the various qualities of the agent. If you really want to mix and match different subroutines, then you might want to look at the support for the Push language that is provided with breve. Push is a genetic programming language that allows you to evolve full programs which can run subroutines in breve code. Look at the SwarmEvolve2 demo for an example of how Push is used to evolve control programs for evolving agents. - jon klein _______________________________________________ breve mailing list [email protected] http://lists.spiderland.org/mailman/listinfo/breve