Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: happyhamsterchan on May 06, 2010, 04:52:52 PM

Title: mutation detection
Post by: happyhamsterchan on May 06, 2010, 04:52:52 PM
Hey all,

Is there a condition that will detect if my bot has mutated? Also, how do I get my bot to kill itself?
Title: mutation detection
Post by: Numsgil on May 06, 2010, 05:37:46 PM
There's not an easy way to determine if a bot has mutated.  Killing yourself is also less straightforward than you might think.  You can just shoot our nrg shots until you die.
Title: mutation detection
Post by: happyhamsterchan on May 06, 2010, 05:41:16 PM
What about antivirus genes? Can't those be modified to detect mutations instead of foreign DNA?

Also, almost all multicellular life uses some sort of apoptosis, as far as I know... We should implement that, it may lead to some pretty neat behavior.
Title: mutation detection
Post by: Numsgil on May 06, 2010, 05:51:06 PM
Quote
What about antivirus genes? Can't those be modified to detect mutations instead of foreign DNA?

Possibly.

Quote
Also, almost all multicellular life uses some sort of apoptosis, as far as I know... We should implement that, it may lead to some pretty neat behavior.

It's an issue with info shots.  If there's a .killme sysvar, it would make an info shot that saves values there an insta-kill.
Title: mutation detection
Post by: happyhamsterchan on May 06, 2010, 05:55:51 PM
Quote from: Numsgil
Quote
Also, almost all multicellular life uses some sort of apoptosis, as far as I know... We should implement that, it may lead to some pretty neat behavior.

It's an issue with info shots.  If there's a .killme sysvar, it would make an info shot that saves values there an insta-kill.

so? We can probably find some sort of defense for that too.
Title: mutation detection
Post by: Numsgil on May 06, 2010, 08:18:33 PM
Yes, that's a physically possible thing to do.  But it sort of smells like bad design.  

I saw this Bungie talk (http://doublebuffered.com/2010/03/14/gdc-2010-design-in-detail-changing-the-time-between-shots-for-the-sniper-rifle-from-0-5-to-0-7-seconds-for-halo-3/) at GDC this year.  It's got me thinking about game design for Darwinbots.  Adding in features ad hoc is a recipe for balance problems (ie: we'll get the pistol from Halo 1).
Title: mutation detection
Post by: happyhamsterchan on May 06, 2010, 10:51:04 PM
hmmm... Well if it doesn't work out we can always go back to a previous version... But changing DB would be a lot of work just to get my bot kill everything in IM.
Title: mutation detection
Post by: Houshalter on May 06, 2010, 11:21:14 PM
Try using .dnalen (is that right?) If it changes, theres been a mutation. Maybe just maybe you can fill the actual dna full of junk, useless operations that require precesion and use the things happening in the dna in their forumala. If anything goes wrong, they trigger an insta kill which would just be changing .shootval to an absurdly high value and firing a shot (-1 or -2, both could be interesting.) That might be kind of complicated. Maybe you could also duplicate every operation and do a check to make sure they match up.
Title: mutation detection
Post by: happyhamsterchan on May 06, 2010, 11:30:57 PM
the dnalen function can't detect point mutations, so that wouldn't work. And the junk DNA would only detect mutations in the junk DNA, not the important DNA, right?
So what I find most appealing is the third option, but I wasn't sure how to do that. DB uses reverse polish notation, but I haven't been able to find push/pop commands, so I'm not exactly sure how to do that... Could you show some pseudocode, if you don't mind?
Title: mutation detection
Post by: Houshalter on May 07, 2010, 06:53:23 AM
I'm not exactly sure how to do it. I guess you would have to do it twice and then check to see if the two numbers on top of the stack equal each other. Then you have to do that twice, just in case there was a mutation there. Actually, I'm not sure how to do it without leaving some code unprotected, but I think it could be done.
Title: mutation detection
Post by: happyhamsterchan on May 07, 2010, 07:48:03 PM
But how do I pop 2 numbers off the stack? I've noticed there's no pop function in DB... :<
Title: mutation detection
Post by: Houshalter on May 07, 2010, 08:57:18 PM
I don't think you can do that so straight forward, but if you really need to delete them you can put zero on top and multiply and then add.
Title: mutation detection
Post by: Tj3 on May 10, 2010, 08:04:25 PM
@nums, you could add killme as a sysvar. delgene is blocked from info shots, why couldn't another one? although its not good to pile up exceptions like this.
Title: mutation detection
Post by: Numsgil on May 11, 2010, 01:29:36 AM
Quote from: Tj3
although its not good to pile up exceptions like this.

Exactly.  We could just add another exception, but it feels like one step forward and two steps back.
Title: mutation detection
Post by: happyhamsterchan on May 11, 2010, 12:52:23 PM
agreedd
Title: Re: mutation detection
Post by: SlyStalker on March 12, 2013, 05:34:37 AM
Cant you just put a massive negative number into .shootval before you suicide?  :huh: