Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: Welwordion on September 18, 2005, 04:45:09 PM

Title: multibot theories
Post by: Welwordion on September 18, 2005, 04:45:09 PM
ok write here about all concepts how multibots might work, which strategies they may use.

I will start with my thoughts.

1There seems to be an agreement , that the movement of multibots is extremely hard to coordinate (that is if there is not a "leader" and the other just  adapts there speed and ditance like swarms usually do)
so the easiest way to avoid this is to create a stationary multibot.
Whats the role of a stationary bot?
There are 2 food gaining mechanism for him,
 either relying on food that moves into his reaches(he could exploit attraction mechanism, like use a virus to hypnotize prey to come to him)
or managing an source of algae/veggies, which means limiting his energy and protecting his foodsource from extern influences.
To optimize the ratio protection(energy use) and energy gain.The outer surface has to be mimized while the inner surface has o be maximized(you can not feed of algae surrounded by other algae)(large free  areas abundant of food would be some quite good saftey puffers against non algae transporting  bots)

2A multibot invests quite much energy to reach full growth, such creating full
 developed progeny would probably slow down his reproduction to much.
The most practibable solution I think is the production of spores which will always result
in the fact that a multibot will have to go trough different lifephases

3Because a multibot invests so much to complete his structure and his numbers are lower compared to single bots  he can not afford to die that easily.
Result is that to be praticable an multibot has to have an really strong and flawless
as possible immune system.

4So far I can imagine three growth patterns :
First after surrounding an single algae, a layer growth with cells alway trying to point outward(where no other bots are), the inner structure then could be formed by letting inner cells die.For example when a cell binds to an algae and has 2 non algae neigbors these could be forbbiden to bind algaes such algae and non algae binding cells  would alternate after enough outer layer would have build up the nonbinding cells would die, the binding cells would ensure they are connected to a neigbour of their own species(the outer layer)this new connection partner then would be converted to an algae binding cell, their neigbors to nonbinding.After several cylces of this the inner surface would have grown.
Second concept is the alternation of layer growth and ring extension, inspired by certain tree growth mechanisms. The basic thought is when the outer layer extends
drastical the inner layer connections will be dragged apart the inner cell would register that stress and cut ties if the stress reachs a certain lvl.This would also result in a greater inner surface.
Third an extending ring that grows string from his inner surface, here also could be used an alternation system trigerred by algae.

Well thats what I could think of till now.
Title: multibot theories
Post by: Numsgil on September 18, 2005, 05:14:20 PM
I posted a quick article on multibots on the wiki.  Just thought I'd throw that out.

Life phases is a great solution on paper, but quickly becomes a befuddling mess in practice.  What we need is better code organization techniques I think.

The ring thing sounds really neat, I'd love to see it in reality.  Closest thing I can think of is PYs purple swarmer.
Title: multibot theories
Post by: Welwordion on September 18, 2005, 05:23:09 PM
You should change the wiki link I always linked to the old wiki ^^ and wondered
where the stuff you spoke of was.
Title: multibot theories
Post by: Numsgil on September 18, 2005, 05:43:52 PM
MMm... yes, I'll do that.  Almost all the pages in the old wiki are at the new wiki anyway.
Title: multibot theories
Post by: Endy on September 19, 2005, 02:47:45 AM
Made a basic circle forming MB. Fixed it in position, repro'd at 99 and turned it by 241 (135 degrees) each time.

__-o-o
__o---o
__o---o
___o-o

The technique could certainly be improved, just wanted to get the basic blue-print out. They have enough space inside to comfortably house 1 or 2 plants to start with, not sure how to get them inside though. Possibly form the MB when the veggie is first sighted.

Still working on getting them all to focus in one direction. They don't seem to be co-operating though.

You should be able to form differently shaped MBs by adjusting the angle 157 makes a triangle, 314 makes a square, and so on.
Title: multibot theories
Post by: PurpleYouko on September 19, 2005, 08:48:56 AM
That is the way Hexagonis does it. Check out his code to see how to get them all facing outward.
Title: multibot theories
Post by: Welwordion on September 19, 2005, 08:50:44 AM
hmm I wanted to give the veggie a movement command after tying to it however
that did not work strange.

cond
*.numties 1 =
start
.dn .tieloc store
5 .tieval store
1 .tienum store
stop
Title: multibot theories
Post by: PurpleYouko on September 19, 2005, 08:57:15 AM
Should work just fine. I have done this loads of times. I would look for an error elsewhere like there being more than one tie or having the wrong tienum value.

Also try a much bigger move command like 20 to test it.
Title: multibot theories
Post by: Welwordion on September 19, 2005, 09:03:52 AM
hmm the gene gets activated but does no movement.

here the full code I tried for testing "fortress" lifephase 1:

cond
*.numties 0 =
*.multi 0 =
*.eye4 *.eye5 > or
*.eye3 *.eye5 > or
*.eye2 *.eye5 > or
*.eye1 *.eye5 >
start
*.eye1 3 mult *.eye2 4 mult add *.eye3 5 mult add *.eye4 6 mult add 10 div
.aimsx store
stop

cond
*.numties 0 =
*.multi 0 =
*.eye6 *.eye5 > or
*.eye7 *.eye5 > or
*.eye8 *.eye5 > or
*.eye9 *.eye5 >
start
*.eye9 3 mult *.eye8 4 mult add *.eye7 5 mult add *.eye6 6 mult add 10 div
.aimdx store
stop

cond
*.vel 30 <
*.multi 0 =
*.numties 0 =
start
30 *.vel sub 2 div .up store
stop

cond
*.eye5 50 >
*.refeye 0 =
*.numties 0 =
*.multi 0 =
start
20 .tie store
stop

cond
*.multi 1 =
*.numties 0 =
start
.dn .tieloc store
20 .tieval store
20 .tienum store
stop

end


should have put that into my tryouts post ^^
Title: multibot theories
Post by: PurpleYouko on September 19, 2005, 09:11:31 AM
did you check the veggie bot's memory locations to see if memloc(.dn) has a value?
Also make sure the veggie isn't blocked.
Title: multibot theories
Post by: Welwordion on September 19, 2005, 09:36:17 AM
if you mean what printmem 2 gives out
2-->0 otherwise I do not know what you mean because I am a beginner ^-^

hmm what kind of veggies you use?
Title: multibot theories
Post by: Welwordion on September 23, 2005, 11:10:54 AM
What do yout think is better feeding strategy for the big ring multibot(fortress)?
Sharing or tiefeeding?
Sharing would be much easier to implemment than tiefeeding, but tiefeeding would be much safer.Any comments?
Title: multibot theories
Post by: PurpleYouko on September 23, 2005, 12:53:06 PM
Quote
if you mean what printmem 2 gives out
Yes that is pretty much what I mean, although I wouldn't do it that way.

Just highlight the bot whose memloc(.dn) has been changed (or attepted to change) then open the console window.

type in "? .dn"

it will display the value currently held in memory location (memloc) 2

You don't need to type out printmem in full, or the numerical memory location.
Title: multibot theories
Post by: PurpleYouko on September 23, 2005, 12:57:47 PM
Quote
What do yout think is better feeding strategy for the big ring multibot(fortress)?
Sharing or tiefeeding?
Sharing would be much easier to implemment than tiefeeding, but tiefeeding would be much safer.Any comments?

The ultimate approach IMO, would be to make a ring around one or more tied veggies. Then you can sharefeed from the veggies while simultaneously pumping all waste products into them.

Assuming you have all robots facing outward then external feeding would be best done by shots.
Also add a really good leach gene that will reverse the flow through ties that are attached by predators. This wil be tricky as you will have to determine the tie phase of the attacker before you can leach it.
Title: multibot theories
Post by: Welwordion on September 23, 2005, 05:58:14 PM
Well the ring is what I wanted to do anyway. I only ask myself what happens when,
like in a multibot several sharefeeding bots with a 90% 10% ratio are linked would they not try to suck they energy from each other?
So you think tiefeeding is out of question?

Also shooting was exactly my choice for outwards feeding, as it has the greatest range and such the best defensive potential.

Shit making a ring is not that easy somehow the angle direction always gets alternated :/.And somehow I still not understand how this works in Hexagonis.
...ah I see you did not use fixang but aimsx
Title: multibot theories
Post by: Light on September 25, 2005, 04:28:01 PM
when you set sharefeeding to 90/10 they tend to try and kill each other and act quite strange

tiefeeding isn't out of the question, but you want to mantain the energy levels around the ring so each bot has equal energy, which sharenrg will do, it also wont kill the veg by accidentally sucking to much energy out of it, it will just generally be a lot simpler to implemtent.

It certainly is an interesting idea, I thought about it a while ago but never really found any time to have a go at it.
Title: multibot theories
Post by: PurpleYouko on September 26, 2005, 09:09:24 AM
Quote
Shit making a ring is not that easy somehow the angle direction always gets alternated :/.And somehow I still not understand how this works in Hexagonis.
...ah I see you did not use fixang but aimsx
[hint]When creating the ring structure try setting fixpos to 1. That way they won't drift around and screw up your shape before completing the ring. Reset it to zero when the bot goes MB or after some kind of timer[/hint]

Set your sharing to 50:50 and use a condition which looks at trefnrg and compares it to your own within 10%. Something like this.

cond
*.trefnrg *.nrg %!=
start
50 sharenrg store
stop
Title: multibot theories
Post by: Light on September 26, 2005, 01:04:19 PM
Here is how to form a simple ring round some veg :)
Code: [Select]
def count 50
def state 51

cond
  *.state 1 =
  *.count 20 <
start
  .count inc
stop

cond
  *.eye5 30 >
  *.refeye 0 =
  *.myeye *.refeye !=
  *.robage 20 >
start
  1 .tie store
  1 .fixpos store
  1 .state store
stop

cond
  *.count 2 =
start
  250 .aimsx store
  75 .repro store
stop

cond
  *.count 3 =
start
  314 .aimsx store
stop

cond
  *.robage 0 =
  *.eye5 70 >
start
  5 .tie store
  1 .fixpos store
  2 .state store
stop

cond
  *.robage 1 =
  *.state 2 =
start
 550 .aimsx store
stop

cond
  *.robage 2 =
  *.state 2 =
start
  75 .repro store
stop

cond
  *.robage 2 =
  *.state 2 =
  *.eye5 60 >
start
  10 .tie store
stop

cond
  *.robage 3 =
  *.state 2 =
start
  -314 .aimsx store
  20 .tie store
stop

cond
  *.robage 4 =
  *.state 2 =
start
  628 .aimsx store
  200 .fixlen store
stop

cond
*.nrg *.trefnrg !%=
*.multi 1 =
start
50 .sharenrg store
stop

end
Title: multibot theories
Post by: Welwordion on September 29, 2005, 07:01:23 PM
It makes a nice ring, however has a high rate getting blocked etc
Title: multibot theories
Post by: Endy on September 30, 2005, 02:36:51 AM
Maybe force them to clear the area if there's anything in front, either by feeding or shooting the other's dn. There's always oddball effects trying to form these, ocasionally they'll tie to plants or to other bots. The saddest is when they don't finish forming the mb and just sit there looking pathetic, a incomplete mb not doing anything to help itself.
Title: multibot theories
Post by: Endy on September 30, 2005, 11:44:40 PM
Figured out the equations for forming the smallest size MB's with each bot tied to every other bot.

Bots=MaxTies + 1

Lines=(MaxTies^2 + MaxTies)/2

Basically it goes Point, Line, Triangle, Square, Pentagram...

If ten ties becomes possible you could make a massive 11 bot MB with some 55 total ties :wacko:

Checking out L-systems, interesting stuff basically describes how to make fractals following a simple repeted set of rules; I was thinking that a MB could be made according to these so it would slowly expand it's structure rather than all at once.

Something like:

Line > Triangle > Square
Title: multibot theories
Post by: Welwordion on October 09, 2005, 05:56:34 AM
Here an bot that surrounds food sources.He is still a little bit buggy and does not work in 2.4
has a new search gene.He still need some genes for closing the ring and to produce spores(not connected children)

(I think next I will try out a bot that reproduces to make a long chain and then wraps it around anything he discovers, will call it fishing net)

name: niemand(when he is completed he will become fortress)

'search

cond
*.numties 0 =
*.multi 0 =
*.eye4 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye4 sub  *.eye1 mult add
.sx inc
.sx inc
.sx inc
stop

cond
*.numties 0 =
*.multi 0 =
*.eye3 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye3 sub  *.eye3 mult add
.sx inc
.sx inc
.sx inc
stop

cond
*.numties 0 =
*.multi 0 =
*.eye2 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye2 sub  *.eye2 mult add
.sx inc
.sx inc
.sx inc
stop

cond
*.numties 0 =
*.multi 0 =
*.eye1 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye1 sub  *.eye1 mult add
.sx inc
.sx inc
.sx inc
stop


cond
*.numties 0 =
*.multi 0 =
*.eye6 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye6 sub  *.eye6 mult sub
.sx dec
.sx dec
.sx dec
stop

cond
*.numties 0 =
*.multi 0 =
*.eye7 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye7 sub  *.eye7 mult sub
.sx dec
.sx dec
.sx dec
stop

cond
*.numties 0 =
*.multi 0 =
*.eye8 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye8 sub  *.eye8 mult sub
.sx dec
.sx dec
.sx dec
stop

cond
*.numties 0 =
*.multi 0 =
*.eye8 *.eye5 >
*.refeye *.myeye !=
start
100 *.eye8 sub  *.eye8 mult sub
.sx dec
.sx dec
.sx dec
stop

cond
*.numties 0 =
*.multi 0 =
start
50 div .aimsx store
stop


'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cond
*.numties 0 =
*.multi 0 =
*.refeye *.myeye =
*.eye5 30 >
start
314 .aimdx store
stop

cond
*885 12 >
*.numties 0 =
*.multi 0 =
1 *.fixpos =
start
0 .fixpos store
stop

'gen3
cond
*.vel 30 <
*.multi 0 =
*.numties 0 =
start
30 *.vel sub 2 div .up store
stop

'gen4
cond
*885 5 >
*.eye5 50 >
*.numties 0 =
*.multi 0 =
*.refeye 0 =
start
20 .tie store
20 .readtie store
0 .aimsx store
1 .fixpos store
stop

'gen5
cond
start
885 inc
stop

'gen6
cond
*100 0 =
*.nrg 4000 >
*.numties 0 >
*.numties 3 <
start
*66 .aimsx store
*66 50 add 66 store
stop

'gen7
cond
*100 1 <
*.eye9 20 >
*.eye8 10 <
*.multi 0 != or
*100 1 <
*.eye9 20 >
*.eye7 10 <
*.multi 0 !=
start
70 .repro store
100 inc
stop

'gen7
cond
*103 4 >
*66 314 >
*.numties 1 =
start
70 .repro store
stop


'gen8
cond
*66 1255 >
start
0 66 store
103 inc
stop

'gen9
cond
*.numties 2 =
start
314 aimsx store
20 .tie store
stop

cond
*.numties 1 =
*.refeye *.myeye =
*100 1 =
start
100 dec
stop

'gen10
cond
start
60 .sharenrg store
stop

'gen11
cond
*.eye5 20 >
*885 5 <
*885 1 >
*.refeye *.myeye =
multibot 0 =
start
10 .tie store
stop


end
Title: multibot theories
Post by: Ulciscor on October 09, 2005, 07:46:48 AM
Just to be pedantic, you have missed the 'cond' statement in Genes 4 and 9.
Title: multibot theories
Post by: Welwordion on October 09, 2005, 12:34:02 PM
0k now the text above is fully correct an I changed something in gen 6 conditions
and added a turn away from own kind gene.

I wanted to enable them to reproduce, so I wrote the following:

OLD  STUFF DELETED AND REPLACED BY THE FOLLOWING

cond
*67 0 =
start
2 rnd 67 store
stop

cond
*67 2 =
start
*102 .deltie store
102 inc
stop

cond
*.numties 0 =
*.multi 0 =
*67 2 =
start
67 dec
stop

cond
*102 30 >
start
0 102 store
stop
Title: multibot theories
Post by: Welwordion on October 10, 2005, 07:18:27 AM
Ok a new idea for multibots:
As for now the main reason single bots are superier in combat is the higher maneuverability. To compensate this MB could have "tentacles" bots that are
tied with only one, flexibile tie to the corepart of the bot and perform a simple search pattern of backwards, forward rotation(rotating till you reach a certain angle
then the rotation value gets inversed (*-1))

Tentaclles would enable a multibot to fire with multiple bots at the same enemy foodsource.
(I already got a conept for a tentacle testbot in mind)
Title: multibot theories
Post by: Numsgil on October 10, 2005, 09:24:07 AM
Sounds like fun.  I'd like to see something like that in action.
Title: multibot theories
Post by: Welwordion on October 10, 2005, 03:34:03 PM
oh heres my first testdesign, as I placed the old niemand into fortress,this bot took over the proud name niemand (maybe I will call him seastar or octopus ).

Moved him to the bestiary as octopus
Title: multibot theories
Post by: Numsgil on October 10, 2005, 04:13:16 PM
If fortress is done, go ahead and post him in the Beastiary, if you haven't do so yet.
Title: multibot theories
Post by: Welwordion on October 10, 2005, 04:54:51 PM
Nah fortress is far from completed, I still could not figure out to let him aim outwards so he could defend himself, also the reproduction is still not worked out  
he fails to surround large algae collections, algae can not reproduce inside and
I need to insert some virus into the veggies so th will tie and sharefeed from their neighbour algae.

Well to make it short he is still one mess of unuseful prototype.

But see for yourself it s the bot 6 posts above  :P.
(note any reproduction gene was deleted from the code)

well most of the repro gains I tried involve these genes:

cond
.....(based on the activation conditions I tried out)
start
*102 .deltie store
102 inc
stop

cond
*102 30 >
start
0 102 store
stop

one problem is also I have to set back *100 to 0 to make him "fertile" again
I use that memspace to shut of reproduction mode
Title: multibot theories
Post by: Numsgil on October 10, 2005, 04:57:50 PM
I have a real difficulty in running people's bots at the moment.

See, I only have internet at the library.  By tghe time I get home, I forget totally what I went home to do.  Same with coming to the library.  It's very distracting.