Bots and Simulations > Bot Tavern

Communication networks

(1/2) > >>

Welwordion:
Swarm bots work by monitoring their brethrens and such exchanging information about their velocity,
such its an easy thought that other informations like the position of enemy units might be shared the same way.
The problem with conventional bots however is, that they can not access the "network" (by monitoring another bot of their kind) and "survey" their surroundings to get new information at the same time.
My solution to this problem is:
Construct a multibot consisting of an "headbot" and an "eyebot", the headbot looks for food and enemy, while the eyebot monitors your brethrens to get information, then this information is transmitted trough the tie to the headbot and both head- and eyebot put it into the out channel so other bots can access the information.

Additionally bots could produce satellites that form transmission lines enabling communication over larger distances.
Here comes in some know how: The network multibot might not move conventionally but rather similar to rocket worm(although I never could get my hands on a rocket worm text file), meaning the eye transfers all of his energy  to the head killing itself, the head reproduces, ties and becomes the new eye while his children becomes the new head:
E-H                    
...H
...H-H
...E-H    Note: the new eye turns to the coordinates of the last "access" to the network
......H
......H-H
......E-H
Ocasionally, when the distance to the next network acccess becomes larger instead of killuing itself of the eye would untie and work as a satellite
E-H
E H
E H-H
E E-H
E....H
This is the first reason why the reproduction movement could be beneficial, the second is that zero movement speed simplifies calculations for aiming and observing.

Numsgil:
Sounds interesting, I'd like to see something like this in action.

Elite:
' Cometes Duo
'
' Moves using reproduction
' Best on large sims

def newmom 51
def head 52

cond
 *.robage 1 >
 *.numties 0 =
 *.nrg 100 >
start
 50 .repro store
 1 .newmom store
 1 .head store
stop

cond
 *.newmom 1 =
start
 .tie inc
 .newmom dec
stop

cond
 *.numties 1 =
 *.multi 0 =
start
 628 .fixang store
 5 .fixlen store
 1 .tienum store
 1 .readtie store
stop

cond
 *.head 1 =
 *.multi 1 =
start
 90 .sharenrg store
 *.eye7 *.eye3 sub 7 div .dx store
stop

cond
 *.head 1 =
 *.multi 1 =
 *.eye5 30 >
start
 -6 .shoot store
 32 .shootval store
stop

cond
 *.head 1 =
 *.nrg 10000 >
 *.multi 1 =
start
 50 .sharenrg store
 32000 .tielen1 store
stop

cond
 *.head 0 =
 *.multi 1 =
start
 .repro inc
 32000 .tielen2 store
stop

cond
 *.head 1 =
 *.bodgain 0 >
start
 *.bodgain 10 mult .fdbody store
stop

end

This bot uses *.in .out to communicate the locations of food to conspecs

' SocialSwarm

cond
start
.tie *.robage 1 add mult inc
.deltie inc
stop

cond
*.eye5 0 >
*.refeye *.myeye =
*.in1 0 !=
*.in2 0 !=
start
*.in1 .out1 store
*.in2 .out2 store
stop

cond
*.body 500 <
*.out1 0 !=
*.out2 0 !=
start
*.out1 *.out2 angle .setaim store
stop

cond
*.eye5 50 <
start
10 .up store
stop

cond
*.eye1 *.eye5 >
*.eye9 *.eye5 > or
start
*.eye9 *.eye1 sub 2 mult .aimdx store
stop

cond
*.eye5 35 >
*.refeye *.myeye !=
start
-6 .shoot store
8 .shootval store
stop

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refxpos .out1 store
*.refypos .out2 store
*.refveldx .dx *.eye5 sgn mult store
stop

cond
*.eye5 50 >
*.refeye *.myeye =
start
*.refaim .setaim store
stop

cond
*.body 1000 >
start
50 .repro store
stop

cond
*.nrg 5000 >
start
100 .strbody store
stop

cond
*.nrg 100 <
start
*.body .fdbody *.body sgn mult store
stop

end

********************************************************************

' SocialSwarm
'
' Communicates with conspecs
' using in and out

cond
start
.tie *.robage 1 add mult inc
.deltie inc
stop

cond
*.eye5 0 >
*.refeye *.myeye =
*.in1 0 !=
*.in2 0 !=
start
*.in1 .out1 store
*.in2 .out2 store
stop

cond
*.body 500 <
*.out1 0 !=
*.out2 0 !=
start
*.out1 *.out2 angle .setaim store
stop

cond
*.eye5 50 <
start
10 .up store
stop

cond
*.eye1 *.eye5 >
*.eye9 *.eye5 > or
start
*.eye9 *.eye1 sub 2 mult .aimdx store
stop

cond
*.eye5 35 >
*.refeye *.myeye !=
start
-6 .shoot store
8 .shootval store
stop

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refxpos .out1 store
*.refypos .out2 store
*.refveldx .dx *.eye5 sgn mult store
stop

cond
*.eye5 50 >
*.refeye *.myeye =
start
*.refaim .setaim store
stop

cond
*.body 1000 >
start
50 .repro store
stop

cond
*.nrg 5000 >
start
100 .strbody store
stop

cond
*.nrg 100 <
start
*.body .fdbody *.body sgn mult store
stop

end

Welwordion:
Ah thx quite interesting, although the comet seems to move differently from what I imagined.

Well here is the code I wrote till now, next up will be the Coordination=exchange of information between eye and head.


def function 50
'(0= head 1=eye)
def satposx 61
def satposy 62
def swarming 55
'(0=prioritize food in sight 1=prioritize network orders)


'Bewegung und Struktur(movement and structure)

'Suchroutinen(searchroutines)
'the head will observe  the movement of food and enemies, while the eye will use
' the same routine to follow their own kind.
'
Feind und Beuteerkennung(enemy and food recognition)

cond
*.swarming 0 =
*.refeye *.myeye !=
*.refxpos *.out1 sub abs 50 >=
start
*.refxpos *.out1 store
stop

cond
*.swarming 0 =
*.refeye *.myeye !=
*.refypos *.out2 sub abs 50 >=
start
*.refypos *.out2 store
stop


'Netzwerkzugriff (network access)

cond
*.refeye *.myeye =
*.in1 .out1 !=
*.function 1 =
start
*.in1 .out1 store
stop

cond
*.refeye *.myeye =
*.in2 .out2 !=
*.function 1 =
'deactivate when swarming is 0?
start
*.in2 .out2 store
stop

cond
*.refeye *.myeye =
*.refxpos *.satposx sub abs 50 >=
'deactivate when swarming is 0?
start
*.refxpos *.satposx store
stop

cond
*.refeye *.myeye =
*.refypos *.satposy sub abs 50 >=
start
*.refypos *.satposy store
stop

'Koordination (coordination)

cond

start

stop

'kind of hard to decide which information is accessed under which conditions

PurpleYouko:
How come everybody is using my "newmom" user defined variable?

Knew I should have got a patent on it  

Navigation

[0] Message Index

[#] Next page

Go to full version