751
Simulation Emporium / Shapes and bots
« on: August 24, 2006, 07:16:01 AM »
V. nice, it is really cool to see positive mutations in an evo sim!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I've been wondering about the default cost settings. How did you come up with those numbers as default values?
What I can't do is mimic behaviour of simple things like fish because they have two eyes and bots don't. I can't mimic shoal behaviour for instance only mass following behaviour.
How about giving bots greater control over eyes, so that, for example, each refvar gets split into 1-9
So *.refeye9 would read back the eye reference of a bot in your eye9
What I was thinking when I wrote that was more sort of two eyes and being able to choose the location that they are at. The difference between having eyes at side of head or on front of head style.
Maybe something similar to what I'm doing with ties. Have a command (switcheye or something) that changes which eye has the "focus", and as such changes the info read from the refvars during DNA execution. You could change your "focus" from eye5 to eye3 and back again in a single cycle.
The only possible issue is while this increases potential complexity (which is good) it decreases reaction time that bots have. Already bots can accomplish alot in a single cycle. The few cycles it takes to turn and "lock" onto an opponent are very important to the fitness landscape, and we should be careful before we change it.
Where the eye's overlap the animal has depth perception, where they can see with only one eye they have no depth perception but can ID objects.
That's what the bots are doing wrong isn't it! They have depth perception through the side eyes but can't ID.
If we remove the distance part of eye5 and require bots to triangulate the distance to other bots, these are the consequences as I see them.
1. We would need to add some trig functions. Perhaps map the usual 0-360 degrees and -1 to 1 of regular sin and cosine to 0-1256 and -1000 to 1000.
2. Things get more complex for the bots. Specifically finding the distance to the target becomes rather difficult. Finding the velocity even more so.
3. It may not be possible to tell the difference between a really big bot and a very close bot unless you form a multibot and use steroscopic vision.
4. Alot of old bots simply wouldn't work.
I would be willing to make this fundamental change as part of the feature set for 3.0, since upgrading the numbers gives us a legitimate reason not to support older bots But it would be a huge change.
2. Things get more complex for the bots. Specifically finding the distance to the target becomes rather difficult. Finding the velocity even more so.
3. It may not be possible to tell the difference between a really big bot and a very close bot unless you form a multibot and use stereoscopic vision.
The only possible issue is while this increases potential complexity (which is good) it decreases reaction time that bots have. Already bots can accomplish alot in a single cycle. The few cycles it takes to turn and "lock" onto an opponent are very important to the fitness landscape, and we should be careful before we change it.
'I know, I know, but it's been 9 days since the last one! This one has a useful venom/poison defence.
'Bubbles is a social hunter using a primitive form of communication to make up for its
'lack of spatial awareness. Bubbles follows the ancient "Path of Bubbles" which states
'that the shame of being poisoned or paralysed demands the sacred act of "Death by
'Baby!"
'To many Bubbles lead to disorientation though and some "Followers of the Bubble" may
'then become confused and unable to fufil their destiny.
def move 990
def bodya 989
def nrga 987
def nrgb 986
def bodyb 985
'ID gene - Endy
cond
*.robage 0 =
start
300 .bodya store
500 .nrga store
.thisgene .memloc store
100 .mkshell store
.tie inc
stop
'memloc check
cond
*.memloc .thisgene !=
start
.thisgene .memloc store
stop
'eye4
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye4 0 >
*.eye4 *.eye3 >=
*.eye4 *.eye2 >=
*.eye4 *.eye1 >=
*.eye4 *.eye6 >=
*.eye4 *.eye7 >=
*.eye4 *.eye8 >=
*.eye4 *.eye9 >=
start
*.aim 35 add .setaim store
stop
'eye6
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye6 0 >
*.eye6 *.eye4 >
*.eye6 *.eye7 >=
*.eye6 *.eye8 >=
*.eye6 *.eye9 >=
*.eye6 *.eye1 >=
*.eye6 *.eye2 >=
*.eye6 *.eye3 >=
start
*.aim -35 add .setaim store
stop
'eye3
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye3 0 >
*.eye3 *.eye4 >
*.eye3 *.eye6 >
*.eye3 *.eye2 >=
*.eye3 *.eye1 >=
*.eye3 *.eye7 >=
*.eye3 *.eye8 >=
*.eye3 *.eye9 >=
start
*.aim 70 add .setaim store
stop
'eye7
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye7 0 >
*.eye5 0 =
*.eye7 *.eye4 >
*.eye7 *.eye6 >
*.eye7 *.eye3 >
*.eye7 *.eye2 >=
*.eye7 *.eye1 >=
*.eye7 *.eye8 >=
*.eye7 *.eye9 >=
start
*.aim -70 add .setaim store
stop
'eye2
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye2 0 >
*.eye5 0 =
*.eye2 *.eye4 >
*.eye2 *.eye3 >
*.eye2 *.eye7 >
*.eye2 *.eye6 >
*.eye2 *.eye1 >=
*.eye2 *.eye9 >=
*.eye2 *.eye8 >=
start
*.aim 105 add .setaim store
stop
'eye8
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye8 0 >
*.eye5 0 =
*.eye8 *.eye2 >
*.eye8 *.eye3 >
*.eye8 *.eye4 >
*.eye8 *.eye7 >
*.eye8 *.eye6 >
*.eye8 *.eye1 >=
*.eye8 *.eye9 >=
start
*.aim -105 add .setaim store
stop
'eye1
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye1 0 >
*.eye1 *.eye2 >
*.eye1 *.eye3 >
*.eye1 *.eye4 >
*.eye1 *.eye6 >
*.eye1 *.eye7 >
*.eye1 *.eye8 >
*.eye1 *.eye9 >=
start
*.aim 140 add .setaim store
stop
'eye9
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye9 0 >
*.eye9 *.eye1 >
*.eye9 *.eye2 >
*.eye9 *.eye8 >
*.eye9 *.eye7 >
*.eye9 *.eye6 >
*.eye9 *.eye4 >
*.eye9 *.eye3 >
start
*.aim -140 add .setaim store
stop
'rotate if all eyes empty and not being shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye4 0 =
*.eye3 0 =
*.eye2 0 =
*.eye1 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
*.shflav 0 =
*.shflav -2 = or
start
*.aim 280 add .setaim store
stop
'follow friend if not being shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.in1 0 !=
*.in2 0 != or
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 =
*.shflav -2 = or
start
*.in1 *.in2 angle .setaim store
*.in1 *.in2 dist 500 div *.maxvel mult *.refvel add 0 floor *.maxvel ceil .up store
*.veldx .sx store
stop
'avoid friend when not getting shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.in1 0 =
*.in2 0 = and
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 =
*.shflav -2 = or
start
*.refxpos *.refypos angle 280 add .setaim store
stop
'if see friend but getting shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.in1 0 =
*.in2 0 = and
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 !=
*.shflav -2 != and
start
*.shang .setaim store
0 .shflav store
-1 .shoot store
*.shang *.aim add .aimshoot store
stop
'all eyes empty but being shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.eye4 0 =
*.eye3 0 =
*.eye2 0 =
*.eye1 0 =
*.eye6 0 =
*.eye7 0 =
*.eye8 0 =
*.eye9 0 =
*.shflav 0 !=
*.shflav -2 != and
start
*.shang .setaim store
0 .shflav store
-1 .shoot store
*.shang *.aim add .aimshoot store
stop
'follow friend if not being shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.in1 0 !=
*.in2 0 != or
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 =
*.shflav -2 = or
start
*.in1 *.in2 angle .setaim store
*.in1 *.in2 dist 500 div *.maxvel mult *.refvel add 0 floor *.maxvel ceil .up store
*.veldx .sx store
stop
'don't follow friend if getting shot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.in1 0 !=
*.in2 0 != or
*.memval *.genes =
*.refage 0 >
*.eye5 0 >
*.shflav 0 !=
*.shflav -2 != and
start
*.shang .setaim store
0 .shflav store
-1 .shoot store
*.shang *.aim add .aimshoot store
stop
'target and shoot
cond
*.paralyzed 0 =
*.poisoned 0 =
*.robage 1 >
*.eye5 9 >
*.memval *.genes !=
'*.numties 0 =
start
*.refxpos *.refypos angle *.aim sub .aimshoot store
-6 .shoot store
*.nrg 32 div .shootval store
stop
'move and communicate
cond
*.paralyzed 0 =
*.poisoned 0 =
*.robage 1 >
*.eye5 0 >
*.memval *.genes !=
*.numties 0 =
start
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 500 div *.maxvel mult *.refvel add 0 floor *.maxvel ceil .up store
*.veldx .sx store
*.refxpos .out1 store
*.refypos .out2 store
stop
'refresh communication or hide veg location
cond
*.paralyzed 0 =
*.poisoned 0 =
*.refeye 0 =
*.eye5 0 = or
*.memval *.genes =
*.eye5 0 > and
*.in1 0 = and
*.in2 0 = and or
*.out1 0 !=
*.out2 0 != or
start
0 .out1 store
0 .out2 store
stop
'turn back after repro
cond
*.paralyzed 0 =
*.poisoned 0 =
*.move 0 !=
start
*.aim 628 add .setaim store
.move dec
1 .deltie store
0 .shoot store
stop
'baby avoids mum
cond
*.paralyzed 0 =
*.poisoned 0 =
*.robage 1 =
*.numties 0 >
*.memval *.genes = or
start
*.aim 280 add .setaim store
0 .shoot store
stop
'repro
cond
*.paralyzed 0 =
*.poisoned 0 =
*.eye5 0 =
*.move 0 =
*.body *.bodya >
*.nrg *.nrga >
start
25 .repro store
*.aim 628 add .setaim store
1 .move store
*.bodya 10 div *.bodya add 30000 ceil .bodya store
*.nrga 10 div *.nrga add 30000 ceil .nrga store
stop
'delete tie
cond
*.numties 0 >
start
*.tiepres .deltie store
stop
'make body
cond
*.paralyzed 0 =
*.poisoned 0 =
*.nrg *.nrga >
*.body 3190 <
start
100 .strbody store
stop
'use body
cond
*.paralyzed 0 =
*.poisoned 0 =
*.nrg *.nrgb <
*.body 11 >
start
100 .fdbody store
stop
'make more shell
cond
*.paralyzed 0 =
*.poisoned 0 =
*.shell 100 <
*.nrg 500 > and
*.shflav -6 = or
*.shflav -3 = or
start
50 .mkshell store
0 .shflav store
stop
'poop
cond
*.paralyzed 0 =
*.poisoned 0 =
*.waste 50 >
*.memval *.genes !=
start
-4 .shoot store
*.waste .shootval store
stop
'Death by Baby!
cond
*.poisoned 0 !=
*.paralyzed 0 != or
start
100 .repro store
*.aim 280 add .setaim store
*.aim 280 add .aimshoot store
stop
'ID gene - Endy
cond
start
*.nrga 2 div .nrgb store
' little constant viral defense gene doubles as ID gene
*.genes .delgene
.fixpos *.fixed mult dec 'anti fixpos by Elite
*.thisgene *.genes sub dup div
mult *.robage sgn mult store
.genes inc
stop
end