Darwinbots Forum

Bots and Simulations => Evolution and Internet Sharing Sims => Topic started by: Welwordion on December 03, 2007, 11:08:34 AM

Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 03, 2007, 11:08:34 AM
Ok by realising in my "niemand"(genetic template bot) project that virus based modularity currently works just to slow, I came up with a different  project idea, how about  storing each gene in a different bot and then letting them work collectively and modular?
My first thought was letting them form a big multibot, but the problems involved with that are just to large son instead I came up with a different method, do not let the genebots operate themself, no create an empty, dnaless puppet and let the genebots only operate this  puppet by information shoots.

What do you think of the idea? Whats the best way to bind the success of the genebots to their puppets?
How do I ensure energy share among all bots with the minimum amount of extra Dna and only 4 ties from the puppet?
Particulary the genebots have to be as minimalistic as possible to not be able to evolve and succeed without their puppets.
Title: Idea: Evolving puppeteer genes
Post by: EricL on December 03, 2007, 02:27:20 PM
Controling via info shots is probably also prone to lots of reliability problems.  Shots missing, etc.

I think you might want each bot to contain all genes, but only activate certain genes in certain cells by setting some state via genetic memory.  Not every cell woudl reproduce for example.  Then perhaps you control the overall organism centrally through the in/out sysvars.
Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 03, 2007, 03:01:07 PM
You seem to misunderstand this is not about the controlling of multibots its about independant evolution of genes.
And while the in and out method allows a suitable data transfer it does not change swarm specific problems like independant positions that need specific calulation to correct aim etc.
By having a bunch of extremely small bots that only read and manipulate the genes of a larger puppet bot we can evolve genes which later can be combined into the genome of one bot.

But your mentioning of genetic memory gave me an idea, I can probably treat my puppeteer bots like classic
template bots place their numbers into the genetic memory and  write a mutation gene thats get apllied to these numbers.
Title: Idea: Evolving puppeteer genes
Post by: Numsgil on December 03, 2007, 03:22:07 PM
It would work reasonably well if your pupeteer bots stay at point blank range to the larger puppet.  Use velocity matching.  And while using the in/out sysvars to communicate from the puppeteers, you can use it to communicate from the puppet.  Information that refvars don't provide, eyes, etc.  You'd just need the puppet bot to do some simple things like:

*.eye5 .out1 store
Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 03, 2007, 03:51:35 PM
Quote from: Numsgil
It would work reasonably well if your pupeteer bots stay at point blank range to the larger puppet.  Use velocity matching.

Right  thats what I had in mind, as for the rest:

cond
0 *.memloc =
start
*974 .memloc store
stop


cond
*973 abs *975 3 mod sgn abs 1 sub abs mult *.memval abs *975 3 mod sgn abs 1 sub abs mult =
*973 abs *.memval abs *975 3 mod 1 sub sgn abs 1 sub abs mult >
*973 abs *975 3 mod 2 sub sgn abs 1 sub abs mult *.memval abs <
start
*971 .shoot abs store
*972 .shootval store
stop

How about this instead of in and out? *971 ---> .shoot  *972  ---> .shootval  *973  -->hard value for condition
*974  --> puppets memory location to investigate *975 ---> determines if = > or < is used for condition.

 A gene to sometimes change these values randomy at robage 0 has yet to be added:

cond
*.robage 0 =
start
1000 rnd *971 1 rnd mult 1 rnd mult 1 rnd mult 1 rnd mult store
1000 rnd *972 1 rnd mult 1 rnd mult 1 rnd mult 1 rnd mult store
1000 rnd *973 1 rnd mult 1 rnd mult 1 rnd mult 1 rnd mult store
1000 rnd *974 1 rnd mult 1 rnd mult 1 rnd mult 1 rnd mult store
1000 rnd *975 1 rnd mult 1 rnd mult 1 rnd mult 1 rnd mult store
stop

edited: I attach my first try of the puppeteer , probably the intialization is a little to random
Title: Idea: Evolving puppeteer genes
Post by: Gobo on December 04, 2007, 12:14:13 AM
How do you imagine reproduction of the whole conglomerate?
Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 04, 2007, 07:15:16 AM
Well I do not assume a complete and tidy reproduction of the conglomerate, rather puppeteers will reproduce and accumulate around a bot and when another empty bot comes near enough puppeteer will accidently switch their puppets and such be distributed and shared among bots.
Atleast thats the idea.
 
Note: a little mistake I put *971 etc into the intialization instead of 971. It also does not yet behave completely like its supposed to
Title: Idea: Evolving puppeteer genes
Post by: Gobo on December 04, 2007, 07:40:28 AM
Quote from: Welwordion
Well I do not assume a complete and tidy reproduction of the conglomerate, rather puppeteers will reproduce and accumulate around a bot and when another empty bot comes near enough puppeteer will accidently switch their puppets and such be distributed and shared among bots.
Do you plan puppeteers reproduce by themselves, or there would be a special repro puppeteer, which would induce others' reproduction?
Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 04, 2007, 07:54:15 AM
We should try to keep  the puppeteers as simple as  possibly (which will also save computation time) so I vote for letting them reproduce on their own.
Also as we do not mutate their genome, but simple change the numbers in their genetic memory we do not have to fear that they will change their basic behaviour pattern, which however also means this basic behaviour pattern has to be optimized by ourself.

(particulary their speedmatching and staying close has to be optimized, also like I said the gene initialization is yet to random there are just to many possible combinations)

Note: I tested it by giving my puppeteer a non random start configuration giving them 30 .up shoots when *.eye5 0 = , it was quite funny although the puppeteers did not follow fast enough so I changed their approaching speed a little.
Title: Idea: Evolving puppeteer genes
Post by: fulizer on December 05, 2007, 09:02:56 AM
to admit it sending info from a tie will work
Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 05, 2007, 03:20:57 PM
wellt ties are the easy solution but they also limit the number of puppeteers and consume the possibility of ties for the puppet, I hope there is a way to do it with shots.
Title: Idea: Evolving puppeteer genes
Post by: EricL on December 05, 2007, 03:27:31 PM
Quote from: Welwordion
wellt ties are the easy solution but they also limit the number of puppeteers and consume the possibility of ties for the puppet, I hope there is a way to do it with shots.
FYI, the limt on number of ties is about to go away completly.
Title: Idea: Evolving puppeteer genes
Post by: Numsgil on December 05, 2007, 03:38:54 PM
But there are still logistical limits.  100 bots attached to a single bot isn't going to work no matter what
Title: Idea: Evolving puppeteer genes
Post by: Welwordion on December 05, 2007, 04:35:42 PM
hmm changed bot to ties added

cond
*.robage 0 =
start
300 971 store
50 972 store
10000 973 store
310 974 store
2 975 store
*.thisgene .delgene store
stop

cause I wanted to make the puppets reproduce.

Note: those who read this previously just had the end command at the wrong point
Title: Idea: Evolving puppeteer genes
Post by: rsucoop on February 13, 2008, 12:55:04 PM
Quote from: Welwordion
You seem to misunderstand this is not about the controlling of multibots its about independant evolution of genes.
And while the in and out method allows a suitable data transfer it does not change swarm specific problems like independant positions that need specific calulation to correct aim etc.
By having a bunch of extremely small bots that only read and manipulate the genes of a larger puppet bot we can evolve genes which later can be combined into the genome of one bot.

But your mentioning of genetic memory gave me an idea, I can probably treat my puppeteer bots like classic
template bots place their numbers into the genetic memory and  write a mutation gene thats get apllied to these numbers.


It may be better to develop two different dnas, one for a master that just transfers information to where they need to go, and another that is forever controled and combative.
Title: Idea: Evolving puppeteer genes
Post by: gymsum on May 01, 2008, 12:19:26 AM
ok got something for you

cond
*.robage 32000 sub 2 mod 1 =
start
....push a variable into a sys var at location
stop

cond
*.robage 32000 sub 3 mod 1 =
start
...read from the location in 1st gene
stop

cond
*.robage mod 1 =
start
..push something into another location, such as tout1, or multi, or whatever
stop


This will let your multibots tie communicate between veggies. Every cycle store say *40 into tout1. Everyother cycle another bot writes to 40. Every three cycles the bot reads from tin1. That gives something for what you want. It could be used so a bot stores something in the veggie, another makes it shoot, and another makes it turn by waht bot a said or read.
Title: Idea: Evolving puppeteer genes
Post by: Peksa on May 01, 2008, 04:27:31 AM
I think that mod for negative values returns negative. Ie. -23 5 mod would be -3.
Title: Idea: Evolving puppeteer genes
Post by: Numsgil on May 01, 2008, 04:02:15 PM
Quote from: Peksa
I think that mod for negative values returns negative. Ie. -23 5 mod would be -3.

I always get math modulus and the programming one confused.  Someone should double check and then update the wiki page on mod (http://www.darwinbots.com/WikiManual/index.php?title=Mod).
Title: Idea: Evolving puppeteer genes
Post by: gymsum on May 04, 2008, 09:02:23 PM
not sure about negative modulous, is there an absolute value function? That would remove any problems.
Title: Idea: Evolving puppeteer genes
Post by: Numsgil on May 04, 2008, 09:48:38 PM
Yes, the command "abs" takes the absolute value of the number on the top of the stack.
Title: Idea: Evolving puppeteer genes
Post by: gymsum on May 05, 2008, 12:07:02 PM
Ok I did my research, turns out modulous returns the same values regardless of their sign. With congruent numbers, like 2 mod 4, the results are quite unique.  Any ways mod is a nice function, just used it to create a structured MB.
Title: Idea: Evolving puppeteer genes
Post by: Peksa on May 05, 2008, 07:04:21 PM
Hmm.. I remember doing some tests earlier and I got negative values from mod somehow. I'll check this later.