Darwinbots Forum

Bots and Simulations => DNA - General => The Gene depository => Topic started by: Endy on March 07, 2005, 01:29:37 AM

Title: New ID system
Post by: Endy on March 07, 2005, 01:29:37 AM
I'm not real sure if even Nums knows this, but .thisgene when viewed by an opponent, actually shows the last active gene in the genome.

Once I realized this it was simple to make an ID system based on it. For same species recognition must have the same number of genes and same last active gene. Fortunately this worked well with Nums' idea of a constantly active viral defense at the end. Even if this value is discovered by another bot it requires constant storing in-order to maintain the deception. A further advantage is that the enemy would be hindered in effectively defending against viruses.

cond
*.robage 0 =
start
.thisgene .memloc store
stop

cond
*.eye5 50 >
*.memval *.genes !=
' must be both active and same number as last gene
start
-1 .shoot store
stop

cond
start
' little constant viral defense gene doubles as ID gene
*.genes .delgene
*.thisgene *.genes sub dup div
mult *.robage sgn mult store
.genes inc
stop
end


Endy ;)
Title: New ID system
Post by: Numsgil on March 07, 2005, 01:36:04 AM
Oh wow, that is pretty cool.

I hadn't really figured out a good use for .thisgene other than for viral stuff.
Title: New ID system
Post by: Endy on March 07, 2005, 01:54:33 AM
Glad you like it. :D

Just promise me it won't get changed. I've [you]finally[/you] managed to beat Helios with it.

Edit: Oops, new balanced shots allows any version of Din to beat Helios, new code just helps out a little.

Endy ;)
Title: New ID system
Post by: Numsgil on March 07, 2005, 02:15:35 AM
It's such a simple piece of code I can't imagine changing it.  Even with the other uses you found for it it's still not overpowered.

I'll probably go through and eliminate the tie activation of delgene.  I was going to get rid of delgene entirely but since I think you've actually found a use for it in your other post...
Title: New ID system
Post by: Light on March 07, 2005, 02:50:27 AM
The code might not get changed but Helios certainly will  :D

but yeah cool idea