Bots and Simulations > Bot Tavern

Workable MB

<< < (2/2)

Ramiro:
I tried editting a latter version of this bots. I saw many genes that cause it to spin or move laterally that began with conditions like 0 6 =!  for example (I think that these are mutations, not designed genes, because the condition is always true and does not refer to any sysvar) so I replace it with more rational conditios like *.eye5  0 =
I tried it against SWARMS and it was OK, but against Diabolus exterminio the original version was superior to my "intelligent" desing. Interesting ,isn“t it?

Jez:
It's great isn't it!

I presume you are talking about this bit of code;


--- Code: ---cond
start
.aimleft
store
stop

cond
6
0
!=
start
*.aimleft
10
div
.sx
store
stop
--- End code ---

From what I can see it is using this gene to counteract the effect of turning, a more primitive version of (*.sx .dx store) and it seems to work ok because the bot doesn't slide when it turns.
It seems to be turning all the time, even when it can see stuff in eye5, (the gene above those stop it working if it sees a friend but the three above that almost always adjust aim) so perhaps it needs to keep stopping slide.

My suggestion would be to change the first gene posted here to;

--- Code: ---cond
start
.aimleft
store
*.aimleft 10 div .sx store
stop
--- End code ---
and delete the other gene.

Or you could try the condition (*.memval *.genes !=) or (*.aimleft 0 !=) on the second gene so it only fires when it doesn't see a friend in eye5 or is turning.
It is making use of the stack to make these genes work, something else that can complicate deciphering the code.

Even small changes to code can cause big changes in bots behaviour. Sometimes it can be hard to see what has changed and why it makes a difference.  

Ramiro:
Thanks for the idea!!!

Navigation

[0] Message Index

[*] Previous page

Go to full version