Author Topic: Sybots V1 (Houshalter)  (Read 1186 times)

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Sybots V1 (Houshalter)
« on: February 19, 2010, 11:20:59 PM »
Allright this was inspired but not plagerized from Sammeh but I still should give him some of the credit. The idea is to force two different bots to work together or die. Sybot1 can hunt but can't reproduce. Sybot2 can reproduce and help Sybot1 to reproduce but it can't hunt. Sybot2 seeks out Sybot1s to tie to. You can make the bots more balanced by giving the bots extra abilities. For example, if Sybot2 is becoming useless because Sybot1 has learned how to reproduce on its own, you might have to change Sybot2 to give it extra ablities like venom, poison, shell, etc, so that it will not be completely useless and therefore will be selected for.

Sybot1:
Code: [Select]
'the important feeding gene
cond
*.eye5 0 >
*.refeye *.myeye !=
*.in1 77 !=
start
*.eye5 40 <
*.up 10 add .up store
not
*.refvelup 1 add .up store
true
*.refxpos *.refypos angle .setaim store
-1 .shoot store
stop

'set my out1 to 88 so sybot2 can find me
cond
*.out1 88 !=
start
88 .out1 store
stop

'show im not tied
cond
*.numties 0 =
*.out2 33 !=
start
33 .out2 store
stop

'show im tied
cond
*.numties 0 >
*.out2 22 !=
start
22 .out2 store
stop

'turn if i see nothing
cond
*.eye5 0 =
start
314 rnd .aimdx store
stop

'turn from allies
start
*.refeye *.myeye =
*.in1 77 = or
314 rnd .aimdx store
true
stop

'share the spoils :)
cond
*.multi 1 =
*.nrg *.trefnrg !%=
start
41 .sharenrg store
stop

'share the waste :(
cond
*.waste 100 >
start
1 .sharewaste store
stop


Sybot2:
Code: [Select]
'find a sybot1
cond
*.in1 88 =
*.in2 33 =
*.numties 0 =
start
.tie inc .tie inc
.refvelup .up store
stop

'store 77 in my out1
cond
*.out1 77 !=
start
77 .out1 store
stop

'also to help in the search
cond
*.numties 0 =
*.eye5 0 =
start
314 rnd .aimdx store
stop

'dump waste
cond
*.waste 100 >
start
100 .shootval store
-4 .shootstore
stop

'store 2 in readtie
cond
*.multi 1 =
*.readtie 2 !=
start
.readtie inc .readtie inc
stop

'turn away if i see something
cond
*.eye5 0 !=
*.multi 1 !=
start
314 rnd .aimdx store
stop

'collectively reproduce
cond
*.trefnrg *.nrg add 6000 >
*.multi 1 =
start
2 .tienum store
.repro .tieloc store
50 .tieval store
50 .repro store
stop

'manage body
cond
*.body 20 <
start
20 .strbody store
stop

Bugs:
1. Sybot1 easily becomes a Big Bertha.
2. Sybot2 seems to have a diminishing population, its only role is for reproduction anyways.
3. There is some weired glitches with the tie physics that screw up reproduction and a few glitches that cause just strange behavior, like the entire dna of every Sybot2 to not execute. The biggest glitch I can find is that the multi bot sharing isn't working for any explainable reason.