Author Topic: A new overflow error in 2.42.6c  (Read 5739 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
A new overflow error in 2.42.6c
« on: June 24, 2006, 10:17:03 AM »
I was away for a day hoping that I was going to run a nice evosim. When I came home this afternoon the program had crashed after 300000 cycles. I have attached the save here.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
A new overflow error in 2.42.6c
« Reply #1 on: June 24, 2006, 01:07:06 PM »
Testlund, your on a roll!

Bot 575 in this sim is attempting to make a virus.  The only issue is that its DNA is over 25000 base pairs long and the gene in question is 23503 base pairs in length!  The code multiplies this by 2 to get the number of cycles to wait before firing the virus, which results in an integer overflow of .vtimer.

I'm running out the door to go play in the sun so I haven't fixed this yet, but it will be fixed in 2.42.7.  Will probably make .vtimer a long.

Testlund, I'll post a buddy for you this evening (US west coast time).

I assume everyone is okay with a max DNA length of 32000?  There may be more bugs of this type coming out of the shadows as we see bots with DNA lengths approaching or attempting to exceed this...
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
A new overflow error in 2.42.6c
« Reply #2 on: June 24, 2006, 01:14:40 PM »
So that's what happend??   That was a quick evolve of the bots. Unfortunately I can't check it out for myself because all my aurosaves crash too. I think 2.42.7 will be awesome!  
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A new overflow error in 2.42.6c
« Reply #3 on: June 24, 2006, 03:08:33 PM »
I'd ideally like bots to have the possibility of up to 2^32 base pairs instead of 2^16, but it doesn't come up all that often

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
A new overflow error in 2.42.6c
« Reply #4 on: June 24, 2006, 11:42:22 PM »
Quote from: Numsgil
I'd ideally like bots to have the possibility of up to 2^32 base pairs instead of 2^16, but it doesn't come up all that often
Doing that would be a lot of work.  There are a lot of places in the code and in the DNA programming model where there are direct and indirect assumptions of being able to address DNA locations using an integer valued index and storing such indexes in the integer-valued DNA or mem array.  .vloc, .ploc and postive shotvals are direct indecies into the DNA for example.  .vtimer is indirectly a function of DNAlen and gets stored in the mem array.  A lot of the refvars (and sysvars (e.g. .myeye) similarly could in theory overflow if DNA was allowed to exceed 2^15.  Changing all this would be... a lot of work and amoung other things, I beleive necessitate moving from integer valued base pair and mem values to dwords.  Can you say win16?

It could be done, but IMHO, not high on the list for the VB fork...
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A new overflow error in 2.42.6c
« Reply #5 on: June 25, 2006, 12:45:02 AM »
It's done somewhat implicitly in the C++ version, so I guess I'm not going to worry about it too much.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
A new overflow error in 2.42.6c
« Reply #6 on: June 25, 2006, 01:22:35 AM »
Testlund, here is your buddy drop.  Has fixes for the long gene issue and the small kilobody veggy feeding thing.
Darwinbots 2.42.6d
« Last Edit: June 25, 2006, 01:26:49 AM by EricL »
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
A new overflow error in 2.42.6c
« Reply #7 on: June 25, 2006, 03:16:35 AM »
Kewl! Time to start a new evosim again. Hopefully it will last a little longer this time.  
The internet is corrupt and controlled by criminally minded people.