Author Topic: Mutation rates in 2.37.6  (Read 3832 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation rates in 2.37.6
« on: March 27, 2006, 05:09:14 PM »
Loaded one of my saves, run the sim for quite some time but don't see any mutants appearing.  Color does not change, nothing listed in "mutation details".  Mutations seem to be "enabled" in the options.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation rates in 2.37.6
« Reply #1 on: March 27, 2006, 05:46:33 PM »
Were bots mutatiing before the save?  Check individual bots mutation rates in the right click menu.
« Last Edit: March 27, 2006, 05:46:49 PM by Numsgil »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation rates in 2.37.6
« Reply #2 on: March 28, 2006, 11:08:09 AM »
Yes, they've been mutating before.  I checked the mutation rates for individual bots and they are OK.  

Have someone tried to duplicate that?

BTW, I thought I'd make a sim where this could be seen easily and set all mutation rates to 1, that completely crashed the program.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Mutation rates in 2.37.6
« Reply #3 on: March 28, 2006, 11:11:10 AM »
Quote
BTW, I thought I'd make a sim where this could be seen easily and set all mutation rates to 1, that completely crashed the program.

Do it in VB using 2.41.0 and tell me where!

I'll try to look into save symmetry when I get a couple minutes to rub together later this week.
« Last Edit: March 28, 2006, 11:12:41 AM by EricL »
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation rates in 2.37.6
« Reply #4 on: March 28, 2006, 12:45:17 PM »
The save routines have been highly modified and suped (by me) in 2.4 to be backwards and forwards comaptible.  So be sure to ask if something seems odd to you, it's probably part of that algorithm.

Setting all mutation rates to 1 probably isn't a great idea.  2 would probably be a minimum.  Try to reproduce it in 2.4.  That will tell us if I fixed the error way back when or not.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation rates in 2.37.6
« Reply #5 on: March 28, 2006, 03:26:17 PM »
OK, I managed testing it in a more accurate way by setting mutation rates to 40 for veggies and letting them divide several times - they were mutating a lot in the original sim, but not when I loaded the save.

I can't test it in 2.4 as I don't have it.  It's easy enough to test it, so I'll leave it for you, guys.

The 2.36.7 probably needs to be fixed though.

On a side note, I noticed another thing: when you load the saved sim, it does not automatically change all the settings.  If you click on "new sim", the menu still has all the settings that were there before you loaded the sim.  It is not really a bug, because one may argue that it's better that way...  But I find it that it's more convenient for me to switch to the new settings.  What do you guys think?
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation rates in 2.37.6
« Reply #6 on: March 28, 2006, 05:43:24 PM »
Still boycotting 2.4 eh ;)

I've reproduced this bug in 2.4.  In 2.4, it's cause the bots' mutation turn on/off get set to false if it was true.  This might be an issue with flipping what the value should be or having default settings overriding new bots in some way.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation rates in 2.37.6
« Reply #7 on: March 29, 2006, 08:54:33 AM »
I noticed something similar a few weeks back but didn't really think about it too much. I will try to look into this over the next week or so.
Damn I'm busy these days  :(
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Mutation rates in 2.37.6
« Reply #8 on: March 31, 2006, 12:44:55 AM »
I found this.  Believe it or not, the line to save the mutations setting for each bot was simply missing in the routine that saves each bot to the sim file.  This caused a positional difference between the expected format and the actual format when bots were being read back in from a saved sim.

Its near the end of each per-bot section, but everything after it was being read in wrong.  This included all bot mutation settings and the New Move and View settings.  What's amazing is that saved and loaded sims worked at all.  The flexability of the triple FE end-of-bot that marker sycned things back up correctly at the end of each bot.

This fix will be included in the forthcoming 2.42.0 drop.  It preserves backward compatability with previously saved sim files.

-E
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation rates in 2.37.6
« Reply #9 on: March 31, 2006, 06:35:10 AM »
That triple FE marker was my idea.  I was hoping it would prevent problems (such as this) from corrupting saved sims, though in retrospect it also makes them harder to realize they exist.