Author Topic: dnalen and virus  (Read 2517 times)

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
dnalen and virus
« on: September 02, 2006, 06:47:49 AM »
I think I have found a bug anyway...

Had a go at redoing Bubbles as a 1g bot, added commands to make it delete gene1 if it wasn't or gene2 if there was more than 1 gene and it was still gene1.

The problem is that while it seems to be doing this it is still suffering a dnalen change. If I open the ingame rob info it always shows ''''Gene 2: Last 'stop' at position 3299''''' but the console tells me that standard bots have a dnalen of 3300 and ones that have had a virus before have a dnalen of 3318
The other bots recognise this by using a dnalen ID and shoot it even though it is back to having one gene.

Saving the dna from each bot gives me text with seemingly random changes:
Code: [Select]
*.refvelup
  add
  0
 floor        '#name: Bubbles singleb.txt'#generation: 6'#mutations: 0condstart  300  963  *.robage sgn  1  sub abs  mult  store  500  984  *.robage sgn  1  sub abs  mult  store  336

A couple of pages of condensed code follow before it goes back to normal code and continues until the next time that '#name:' bit appears (have just looked again and it seems to be triggered by '0 floor' and stops being condensed at the next '0' increasing in length by one '0' each time? The condensed code always seems to be the original code from the start and I can't spot any '0 floor's in it.

Looks like the dnalen changes back to 3300 if I save the dna for one of the corrupted bots and restart the sim with it.

Used:
DB V2.37.6
League conditions
Bubbles 1G
DIN 2
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
dnalen and virus
« Reply #1 on: September 02, 2006, 12:39:07 PM »
Looks as if it's a bug in the DNA saving routines or something similar.  Those # tags tell the parser that the line has to do with the bots generation number, ancestor name, etc.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
dnalen and virus
« Reply #2 on: September 03, 2006, 06:59:52 AM »
ok cool.

That is the side problem though, the ingame problem that led to me noticing it is dnalen not resetting its value after my bot deletes a virus.
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams