Author Topic: Mutation Rates bug!  (Read 7371 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« on: May 31, 2005, 11:02:11 AM »
I tried the 2.37 and the new mutation panel is kinda screwy - try placing 0 in any of the cells, it totally messes up the "Overall 1 in blah-blah" mutation frequency.

Also, the mutations seem to work differently now - not as often as before and "non-mutating" veggie was getting mutated.

Also, the mutation settings are not saved in settings file - I had to re-adjust them again after loading up the saved settings file.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #1 on: May 31, 2005, 11:12:03 AM »
The 1 in X mutation probabilities are still a work in progress.  THe problem is that not all the mutations are 1 in X per DNA unit.  Some are per gene.  Some are per condition.  You get the idea.

The real value is probably somewhere between chance per unit and chance per bot.  (Not a tiny range I know).

None of the actual mutations routines were touched, so the mutations should work like before.

The settings file stuff should be fixed with 2.37.1.  I specifically checked it over a bazillion times.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #2 on: May 31, 2005, 12:07:22 PM »
About saving mutation rates - just tried it in 2.37.1 and this still does not work.  When I load the saved settings file and open the mutation rates panel, all mutation rates are still at values that were there before the save.  It is particularly annoying because there are two spots that always have 0 in them: "Delete a data point" and "Insert a new value".
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #3 on: May 31, 2005, 12:13:41 PM »
Oh this is driving me nuts!

I'll keep working on it.

In the mean time, internet sharing!  Internet sharing!

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #4 on: May 31, 2005, 12:32:42 PM »
shvarz, it looks like it's a graphical bug.  Your settings are loading and saving correctly (I think).

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #5 on: May 31, 2005, 01:51:14 PM »
Nums, I really think mutations got messed up.  I just started a sim and my "average mutations" graph shows no mutations at all after 30,000 cycles and 1800 new bots born.  Usually I see at least something appearing, but now it is completely empty.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #6 on: May 31, 2005, 01:52:24 PM »
Oops, never mind, I see some mutations appearing.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #7 on: May 31, 2005, 08:32:09 PM »
Found and fixed the problem.  It was a graphical bug.  That means what you see when you click okay is being saved to the bot, and the bot to the settings file, but it's just not showing up when you try to find it again.

I'll fix a few more things with internet, then post 2.37.2 to the FTP.

Have you tried out other settings shvarz?  Zero Momentum mode perhaps?

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #8 on: June 01, 2005, 10:50:56 AM »
I like the changes done to the options menu - a lot cleaner now.

About that Zero Momentum mode: Am I missing something, or Zero Momentum is essentially the same as Friction=1 mode?  If yes, then it might be better to expand the friction scale to include the value of 1 instead of introducing a whole new option.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #9 on: June 01, 2005, 11:01:13 AM »
Not quite.  Friction seems to be applied in such a way that at high friction levels you can't move.  That is, friction is applied to movement you initiate the same cycle.

Zero Momentum mode just cuts your velocity to 0 at the start of each cycle.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #10 on: June 01, 2005, 11:40:14 AM »
OK, I am confused.  I thought that friction is applied to current speed, while the "movement factor" applies to acceleration.  Then what is the difference between friction and movemement factor?
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #11 on: June 01, 2005, 11:57:46 AM »
Movement factor is how effective each impulse (acceleration) is.  Default is 80%.

Friction is applied to velocity after all accelerations are calculated.

So an impulse from a bot (say, a command to .up) has to go through both movement factor and friction.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #12 on: June 01, 2005, 12:17:04 PM »
That is completely messed up!  This means that friction and movement factor are essentially the same thing!  They should be different, MF should determine how effective your acceleration is and friction should determine how quickly you loose the speed with time.  These are not necessarily related things and sometimes can be reversed.  Imagine an organism suspended in air with no gravity.  Unless it has a propulsion jet, its efforts to gain speed will be largely wasted, because there is very little friction in the air.  Once it gained speed, it will loose it very slowly.

So, the order should be like this:

At the beginning of the cycle apply friction to reduce the current speed.
Execute genes.
Apply MF to .up/down acceleration, calculate collisions, brownian motion and such.
Move bots.

Thus, acceleration and deceleration will be separated.  Therefore, different combinations of MF and friction thus would allow description of very different environments.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #13 on: June 01, 2005, 12:34:45 PM »
I agree that friction is kind of silly in the current system.  But it's been that way for a while now (probably since it was first made?)  Doesn't mean we can't change it of course, it just means it doesn't appear to have hurt anything in the mean time.

Here's a graph of how it works.  Green arrows denote values at the start of the cycle, the others are the order of action.  (there's supposed to be a purple arrow between movement factor and velocity)



Unfortunately, fixing friction is more invlolved because friction works differently in different environments.

On solid surfaces for example you have static and dynamic friction, which are different.  In liquid substances, friction again works different.

The main difference between Movement Factor and Friction is that movement factor ONLY applies to accelerations from up, dn, sx, dx, and Movement factor feeds into friction.
« Last Edit: June 01, 2005, 12:40:25 PM by Numsgil »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #14 on: June 01, 2005, 12:56:53 PM »
Well, I don't care about the fancy details, so just separating these two would be fine with me.  It did not "hurt" anyone because not too many people tried to create different environments.  If you do it my way, then we can have environments like this:
1. Hard to accelerate but slow to loose speed - it is hard to change direction once you get going.
2. Easy to accelerate but fast to loose speed - very precise movement possible, but hard to travel long distances
3. Hard to accelerate and fast to loose speed - sit tight and don't go anywhere.
4. Easy to accelerate and slow to loose speed - current F1 conditions, free for all running and turning.
5. Anything in between 1, 2, 3, and 4.

The way MF and friction work now it is impossible to create these environements.  I think everyone will win if these changes are introduced.
"Never underestimate the power of stupid things in big numbers" - Serious Sam