Author Topic: Chameleon gene  (Read 2463 times)

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Chameleon gene
« on: January 22, 2006, 02:20:20 PM »
NOTE: I posted this in the tips and tricks section by mistake So I'll post it here and you can delete the one in the tips and tricks section

Well, chameleon genes ...

Code: [Select]
' Chameleon

def foundmemloc 51
def reqmemval 52

cond
*.eye5 0 >
*.refshoot *.myshoot !=
*.foundmemloc 0 =
start
.memloc .memloc store
*.memval .foundmemloc store
stop

cond
*.eye5 0 >
*.refshoot *.myshoot !=
*.foundmemloc 0 !=
start
*.foundmemloc .memloc store
*.memval .reqmemval store
stop

cond
*.reqmemval 0 !=
*.foundmemloc 0 !=
start
*.reqmemval *.foundmemloc store
stop

Once you've seen a bot with a .memloc based conspec recognition system you will be a conspec in it's eyes until you see another bot with a number in .memloc

Give a bot this gene and it will always beat Ymir  :)

Great program by the way
« Last Edit: January 22, 2006, 02:32:11 PM by Elite »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Chameleon gene
« Reply #1 on: January 22, 2006, 04:04:59 PM »
Trouble is that Ymir is about the only bot that ever used a memloc based conspec recognition system.

Nice bit of code though.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Chameleon gene
« Reply #2 on: January 22, 2006, 04:30:30 PM »
There just doesn't seem to be a way of fooling *.refeye conspec recognition yet (except for Umbra Draconis' shots, but they aren't practical until you're really close)

Any ideas?

How about you .repro and then .vshoot the required number of *.eye5s into the child, then shoot all your energy at him (you die, but your child is immune)

Or you grab an enemy with a tie and change his *.myeye using the tie. You can then shoot him freely. This is even allowed in F2 isn't it, since you're not actually feeding with the tie.
« Last Edit: January 22, 2006, 04:37:43 PM by Elite »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Chameleon gene
« Reply #3 on: January 22, 2006, 05:49:27 PM »
Venom, poison, ties and viruses are all the ways I can think of. It's easier to change the refeye of another than it is to mess with a bot's own genes. A virus like:

X(attackers eyenumber) .myeye store

works pretty well. Eventually someone started storing myeye at birth somewhere else defeating the viruses. Venom would probably be best since it could change their myeye into your own. Poison works easiest but the opposing bots will still attack yours.

I think its possible to make a SG bot that grows in genome size/ability from viral shooting. I've always been curious about how the rules would work for such a bot.

In 2.4 its possible to have a bot that has only one apparent eye using the * readback. Can't get it lower without having the bot go blind though.
« Last Edit: January 22, 2006, 05:51:15 PM by Endy »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Chameleon gene
« Reply #4 on: January 22, 2006, 06:13:33 PM »
Quote
Or you grab an enemy with a tie and change his *.myeye using the tie. You can then shoot him freely. This is even allowed in F2 isn't it, since you're not actually feeding with the tie.

Allowed? yes.

Possible? No. (At least I don't think so)

Unfortunately, *.myeye is refreshed on every cycle rather than fixed at birth. At least I am pretty sure I wrote the code that way. I would have to check to make sure.
In retrospect, it could be better to have it just fixed the once so that this kind of weapon could work.

Give it a try. Maybe it WILL work.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
Chameleon gene
« Reply #5 on: January 22, 2006, 07:07:16 PM »
I may have tinkered with this code too, I don't remember exactly.

Somewhere along the line I flirted with the idea of turning eyes on if you ever try to read from an eye memory location.  I don't remember if I ever added it though, or to what versions it might be in.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Chameleon gene
« Reply #6 on: January 23, 2006, 11:11:21 AM »
Viruses, yes ...

Code: [Select]
cond
start
100 .vshoot store
*.thisgene .mkvirus *.vtimer -1 mult 1 add mult store
676 .myeye store
676 *.memloc store
*.mkvirus 1 add  .delgene *.mkvirus *.thisgene sub dup mult sgn mult store
.delgene dec
stop

This little virus is an advanced version of the virus you refer to

Those that are infected with it will have a unique *.refeye and *.memval code. The infected will gang up on the non-infected to further the spread of the virus.

*.mkvirus 1 add  .delgene *.mkvirus *.thisgene sub dup mult sgn mult store
- Permits only one copy of the virus in each bot so as to avoid unnecessary energy expenditure

.delgene dec
- Anti antivirus

*.thisgene .mkvirus *.vtimer -1 mult 1 add mult store
- Complex conditionless coding to only ready a virus if there are none 'loaded' - again to stop unnecessary energy expenditure
- Conditionless coding skills help in designing viruses

The infected act like zombies ...

The 'eyes turning on' isn't in 2.37.6 - probably would make it easy to fool *.refeye though - it's the most secure method of conspec recog we've got

My newer bots use a hybrid of *.memloc and *.refeye conspec recognition, and sometimes *.refshoot - Incredibly difficult to fool