Bots and Simulations > Bot Tavern

I hope this is the right place :(

<< < (2/3) > >>

Jez:
Let's say that the memloc was 999 and your bots bots used a memval of 1 to identify themselves.

Your virus would need to place a value of, let's say, 2 into memval.

Any other bot would have a value of 0 in memloc 999...

-venom-:
ok these are part of the genes. the trouble im having is
that the bot still seeks out and eats any thing that gets in its way
can you please point out the error in the dna.

' Genes 1,2,3 viral genes
cond
 *.robage 0 =
start
 7 989 store
stop

cond
 *.vtimer 0 =
start
 3 .mkvirus store
stop

cond
 7 *989 !=
start
 67 .memloc store
 101 67 store
stop

' Gene 4 food finder
cond
 *.eye5 0 >
 *.memval *67 =
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
 400 .vshoot store
stop

' Gene 5 eat food
cond
 *.eye5 40 >
 *.memval *67 =
start
 -6 .shoot store
 *.refvelup 30 add .up store
stop

Jez:
It's far to late for me to judge this properly;

If you could post the whole DNA it would help.

As far as I can see, blurred vision excluded, your memloc is 989 and your memval is 7 (Id of friends).

If it is not a friend you are using a different memloc to store the memval rather than using the same memloc to register the fact. So gene 5 should be;

' Gene 5 eat food
cond
*.eye5 40 >
*.memval (*you don't want star here as that's the value of location) 7 (!)=
*.memval 0 !=
start
-6 .shoot store
*.refvelup 30 add .up store
stop

This would be only want your bot to attack other bots that have been affected by virus btw.

I you post the whole dna I will try to give you a better answer tomorrow!

Light:
You need to cut and paste '67 .memloc store' from gene 3 to gene 1, because you dont need it set in enemy bots you only need it set in your own bots. At the moment your bots aren't setting memloc so memval = 0 and *67 = 0 so they attack each other. Im far too tired to understand if what Jez is saying makes sense or is a better suggestion

Jez:
No, no, no; don't listen to me!

I'd obviously already started drifting off into dreamland when I wrote that. It makes no sense. Listen to what Light said instead.  

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version