Author Topic: Plankton Experiment (MB/*CB/F1/Veggie)(14-05-2008)  (Read 2643 times)

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
Plankton Experiment (MB/*CB/F1/Veggie)(14-05-2008)
« on: May 14, 2008, 01:15:17 PM »
Ok, so I've managed a bot that moves without storing velocity; it does read its velocity but only so it doesnt fly off away from its tied conspec. It swims almost like the older DB version that was mroe basic and easier to program for users. Anyways, I had to invent some equations for this to work right. I took from the 30-60-90 Triangle, as it is the golden triangle, its importance is for a finalization of the entire being, and in order to calculate these angles relative to the bots entire body, some consideration had to be made. First, the oldest bot is the center of the circle, and all triangles form from this bot. 2nd, no bot may tie to more than two bots at once, this means that as the circle develops, the older center bot actually launches offspring from the center. ITs conspe system confuses many bots, even mor chaotic swarmer, although it considers it a friendly species. Anyways, it uses a system to count the total ties in the group, and uses this information as a length of the entire organism, this the opposite side of the center bot; two other special sides are found and used to wrap the angle of the inner bot around the outside bots, makes them form a nice circle with a central veggie, nice protection too, but its defense mechanism seems to be broken.

Code: [Select]
'Curved Veggie

cond
*.robage 0 =
start
.tie inc
*.tiepres .out2 store
32000 rnd 1 .out1 store
stop

cond
*.tiepres 2 >
*.numties 2 > xor
start
*.tiepres .deltie store
stop

cond
*.robage 21 >
*.nrg 4000 >
start
100 .mkpoison store
50 .strvenom store
.eyef .vloc store
0 .venval store
.shoot .ploc store
50 .repro store
160 *.aim add .setaim store
stop

cond
*.shflav 0 !=
*.shflav -2 !=
start
1256 *.shang sub .aimshoot store
16 .shootval store
0 .shflav store
-5 .shoot store
-3 .shoot store
stop

cond
*.multi 1 =
start
25 .sharenrg *.multi mult store
*.tiepres .out2 store
*.timer mod *.out2 .redtie store
*.tout5 *.tielen mult 40 store
*.out1 .tout1 store
*.robage mod *.tin1 41 store
*40 *41 div 8 mult *.xpos *.ypos angle mod *.trefxpos *.trefypos angle add div .fixang store
*.vel *.trefvel sub mod *.maxvel *.timer add mod 20 rnd 1 2 mult mod *.tin5 *.tielen mult *.mass mult *.eyef abs mod 50 add .fixlen store
45 .stifftie store
stop

cond
*.readtie 0 >
*.robage *.trefage <
*.in5 .out5 >
*.tin5 *.tout5 > xor and
start
*.tin5 *.tout5 store
*.in5 .out5 store
stop

cond
*.tout5 *.out5 <
start
*.out5 *.tout5 add .tout5 store
stop

cond
*.eyef 0 >
*.in1 0 !=
*.refeye *.myeye =
*.tiepres 2 <
*.numties 2 < xor
start
*.refxpos *.refypos angle .setaim store
.tie inc
20 *.aim sub .setaim store
stop

cond
*.nrg 3000 <
*.body 10 >
start
20 .fdbody store
stop

end

Edited: Creates very unique formations, I saw one with three legs spinning in circles. Conditions: Run first with no mutations to get an idea for it, then run with if you like; use any bots to hunt them. Takes some generations for the shapes to form, but its worth it.
« Last Edit: May 15, 2011, 07:36:01 AM by Panda »