Darwinbots Forum

Bots and Simulations => Evolution and Internet Sharing Sims => Topic started by: shvarz on December 06, 2006, 06:06:19 PM

Title: help with code
Post by: shvarz on December 06, 2006, 06:06:19 PM
Found this bastard in my evosim.  How is he reproducing?

Code: [Select]
pow >
 *.nrg stop
 >
 and
 start
 65 300 *-321 store
 and
 1 4 *-25 angle rnd dec
 7 8 *-386 *296 -17 .aimleft inc
 else
 -- -7 9 2 24 inc
 56 -6 store
 store
 107

I've seen it do it, and not just once - there was a whole colony of them.
Title: help with code
Post by: shvarz on December 06, 2006, 06:08:01 PM
BTW, what do these "stores to" and "reads from" negative memory locations do?
Title: help with code
Post by: EricL on December 06, 2006, 07:41:48 PM
Whoops.  

I thought I was doing abs(n) mod 1000 for stores to negatvie mem locations but I missed a check in another routine.  So, right now, the negative mem location is just dropped.   It does not get put on the stack.  So the line

65 300 *-321 store

is really

65 300 store

or

65 .repro store

As of 2.42.9k, it will instead be

65 300 *321 store
Title: help with code
Post by: shvarz on December 06, 2006, 08:35:47 PM
But that is going to kill my robot!!!! You bastard!!!!

 
Title: help with code
Post by: EricL on December 06, 2006, 09:34:04 PM
Think of it as a random mutation...