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

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #15 on: June 01, 2005, 01:26:25 PM »
I'll do some research in this area on how best to implement it.  Give me a few days (I'm working on some things at the moment).

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates bug!
« Reply #16 on: June 01, 2005, 06:27:03 PM »
I already fixed this problem quite a while back  <_<

The way it worked after I fixed it was that friction was applied to any velocity from the previous cycle and then the new acceleration vectors were added to the resultant movement rate.

This means that all new accelerations are not effected by friction on the cycle on which they are applied so in sims with infinite friction you can still have movement, just like with the new zero momentum mode.

If this isn't working in the present version then the code must have gootten lost somewhere  :(
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: 7742
    • View Profile
Mutation Rates bug!
« Reply #17 on: June 01, 2005, 06:30:41 PM »
I haven't checked the code yet, I was just quoting from memory.  Does so now...

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #18 on: June 01, 2005, 07:17:10 PM »
Okay, it looks like PY is right.  I'll increase the slider to give higher friction environments.

There are two different kinds of 'friction'.  If we think of the bots as on dry land, then friction comes in two varieties:

Static and Dynamic.  Static determines how hard it is to produce any motion at all.  Dynamic is how you slow down once you get moving.

It follows this law:

where Ff is the end force, Fp is the normal force (in a flat environment, we would call this the objects weight (ie: mass * gravity)) and uf is the coefficient of friction.  Dynamic and Static both have sperate coefficients, although usually coefficient of dynamic friction is less than that for static.

In fluids what we think of as 'friction' is in reality air resistance (ie: drag), which obeys an entirely different equation based on current velocity (solid surfaces just apply a constant dynamic friction force).

Here's a page I found on drag.  It can probably be simplified to some extent for DB, but you see it's an entirely different equation).

Drag is not friction.  Drag is a measure of the ability for water/air in the way to get out of the way.  (This is one of my pet peeves.  Comets do not 'burn up in the atmosphere from friction'.  They create a compression wave, which is itself hot because all gases heat as they are compressed.  This wave can become so hot that it evaporates the comet.  Many comets have been found that are cool to the touch, even icy, after impact.  This is precisely because the heating was non direct and fast.  Sort of like throwing food into a broiler for a few seconds.  The surface may be charred, but the interior can still be ice cold.)

The effects between the two types are somewhat similar, but drag means that your speed drops off faster the faster you get, while friction could care less how fast you're actually moving (but it does care if you're moving or not!)

This all implies some heavy duty slider control.

An interesting note: shape could change how drag works.  A sphere and a cube will experience different forces.  A triangle can be quite aerodynamic if it's moving right.
« Last Edit: June 01, 2005, 07:49:43 PM by Numsgil »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates bug!
« Reply #19 on: June 01, 2005, 09:33:22 PM »
In the present system initial resistance to movement is determined by the mass (size) of the robot while the existing "friction" is really more like a drag coefficient but doesn't actually follow either rule.
In reality, drag should have a greater effect when the bot is moving faster while friction may actually decrease as the bot moves faster.
It would be nice to make this follow the real laws. Shouldn't be too hard either.
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: 7742
    • View Profile
Mutation Rates bug!
« Reply #20 on: June 01, 2005, 10:07:03 PM »
Just means we have to set some arbitrary constants, either in the program (the area of a bot exposed along the movement vector) or in the physics panel.

Friction would probably use mass, while drag would use body (the physical size of the bot).
« Last Edit: June 01, 2005, 10:08:12 PM by Numsgil »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #21 on: June 02, 2005, 12:29:09 AM »
Just want to remind of a suggestion I made a while back: allow complex physics controls but hide them from an average user.  Instead we can have four "pre-sets" with descriptive names like: "Water, Earth, Side View, Whale"  or "Air, Moon, Top View, Bacteria"  and these would set physics parameters to suit these presets.  I even have a proposed presets and corresponding conditions organized in some Excel file.  I can attach it if people like the idea.
"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 #22 on: June 02, 2005, 01:38:10 AM »
The options for is getting too large anyway.  (It gave me a 'sorry, you have too many controls' error message the other day).  I may see if I can have popup windows for advanced options.

Attach the excel file of settings.  I'll see if I can set something up.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates bug!
« Reply #23 on: June 02, 2005, 07:01:01 AM »
Have you tested out the save and load sim functions?  They should be working again, allowing for linger cumulative simulations to be run.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Mutation Rates bug!
« Reply #24 on: June 02, 2005, 11:18:21 AM »
Here is the excel file with proposed presets.  The user would choose the following:

Organism size: bacteria, eukaryotic cell, dust mites, Insect, Animal

Gravitation: Space, Moon, Earth, Jupiter (not in Excel file, this would simply adjust the absolute amount, the excel file has relative contribution of gravitation to bots movement).

Environment: Space, Air, Water, Earth-Surface (top-down view), Earth-Soil (side view)

See attachment file and ask if you have any questions.
"Never underestimate the power of stupid things in big numbers" - Serious Sam