Darwinbots Forum

Code center => Suggestions => Topic started by: PurpleYouko on April 03, 2005, 12:15:44 PM

Title: Collisions
Post by: PurpleYouko on April 03, 2005, 12:15:44 PM
I have a few ideas about how this could become controllable from the options screen. just haven't had the time to implement them yet.
Please add comments about the way you would prefer it to work.
Title: Collisions
Post by: shvarz on April 03, 2005, 02:19:15 PM
I am not too fond of bounces.  But other people might.  I say "no bounces" by default and allow bounces somewhere deep inside "advanced options".
Title: Collisions
Post by: Numsgil on April 03, 2005, 06:16:12 PM
Technically I'd like to try out a system of 0 momentum like schvarz suggested a while ago.  That would be as simple as fixing friction rates and then setting them incredibly high.

I would like a slider between 100% elastic collisions and 100% 'sticky' collisions.  That'd be ideal.
Title: Collisions
Post by: PurpleYouko on April 04, 2005, 09:35:56 AM
Friction is fixed in the physics code that I sent you. Should work fine now.
Title: Collisions
Post by: Botsareus on April 04, 2005, 12:50:25 PM
I am all in stuff like bounces.... I like that stuff , its kool
Title: Collisions
Post by: Zelos on April 04, 2005, 02:13:59 PM
I think we shall use physical things. im more of the reallity guy. the momentum in a system is always 0
Title: Collisions
Post by: PurpleYouko on April 04, 2005, 03:32:19 PM
Quote
the momentum in a system is always 0
How does that work then?
If the system is closed then no energy can go in or out. But even then the momentum (or KE) can be converted to heat or light or back to KE.

If you have zero momentum then you must also have zero motion.

Or are you saying that the net change in momentum during a collision is always zero? Meaning that the total momentum for both robots is the same both before and after the collision.

Again this only applies to an idealized system where no energy can be converted to any other forms. Doesn't happen in real life situations as a certain amount of momentum is always converted to a different form of energy such as heat, light or sound.

([span style=\'font-size:8pt;line-height:100%\']For simplicity's sake momentum and kinetic energy are assumed to be the same[/span])
Title: Collisions
Post by: Botsareus on April 04, 2005, 03:52:51 PM
who here plays tabel pool? How can I get dbs to behave like that when they collide?


2nd qustion: Was the exselaration messed up too?
Title: Collisions
Post by: Zelos on April 04, 2005, 04:03:55 PM
it worx coz momentum cant be converted to any energy form. its kenetic energy that can. if I throw something in space at one direction, my body gets movementum in the other direction, which would be - compared to the thing I throw. if it have 5 as momentum, then I get 5 momentum in the other direction. so it becomes like 5-5=0. still 0 momentum. no matter what you do, it will always be 0
and PY, ure 42, right?, you should know better than thinking momentum and kenetic energy are the same, its completly different thing
Title: Collisions
Post by: Numsgil on April 04, 2005, 04:05:56 PM
If you don't like sticky collisions Bots, what did you vote for?  Shouldn't your vote be for the 2nd choice?

In reality either collisions system hardly effects the bots at all.  Most good bots will probably either bump veggies along in front of them or never touch them at all.
Title: Collisions
Post by: Numsgil on April 04, 2005, 04:09:07 PM
Quote
it worx coz momentum cant be converted to any energy form. its kenetic energy that can. if I throw something in space at one direction, my body gets movementum in the other direction, which would be - compared to the thing I throw. if it have 5 as momentum, then I get 5 momentum in the other direction. so it becomes like 5-5=0. still 0 momentum. no matter what you do, it will always be 0
and PY, ure 42, right?, you should know better than thinking momentum and kenetic energy are the same, its completly different thing
Uh, Zelos, I think you're a little confused.

Momentum is mass times velocity.  In your example, you're assuming you started with 0 velocity, so when you throw the end system still has 0 momentum.

But if you throw something when you're already going 3 m/s then the end momentum and the beginning momentum aren't 0.

I don't think PY was saying that momentum and KE are the same thing.  Just that sometimes KE (and thus momentum) are converted into heat, light, explosions, etc. in some collisions.

That is, not all collisions conserve KE perfectly.
Title: Collisions
Post by: Botsareus on April 04, 2005, 04:09:18 PM
I did not say I want no energy loss during movment. Friction etc. is all good ideas, thats why I voted for choise 4
Title: Collisions
Post by: Botsareus on April 04, 2005, 04:14:43 PM
But if the new legues will use this new , slow , collisions ,then I have no choise , I will use them too.
Title: Collisions
Post by: Numsgil on April 04, 2005, 04:26:06 PM
What do you mean by 'slow' collisions.  Mostly what happens now is that bots won't bounce off each other.  They'll either kind of stick together or do this:

O>.....0   -> O0 -> O.... 0>

Where > denotes motion.
Title: Collisions
Post by: PurpleYouko on April 04, 2005, 04:32:54 PM
Quote
and PY, ure 42, right?, you should know better than thinking momentum and kenetic energy are the same, its completly different thing

Where did I say they were the same thing?

Momentum is Mass times velocity
Kinetic Energy is 1/2 MV squared

Whoopdy bloody do!

What I said was
Quote
(For simplicity's sake momentum and kinetic energy are assumed to be the same)
That just means that is a shit load easier to discuss and explain things in terms of conservation of momentum that it is to bring KE into the conversation.

And NO! Momentum most certainly does not alway equal zero!
Try throwing a ball at a wall covered in soft plaster.

Try this calculation for size!

Before collision
Ball velocity = 20
Ball mass = 10
Ball Momentum = MV = 200

Wall mass = about 20,000
Wall velocity = 0
Wall momentum = 0

Collision!!!!!!!!!
!!!!!!SPLAT!!!!!!!
Ball sticks in soggy plaster

Ball velocity now zero
Ball momentum now zero
Wall velocity OOH Look It's still ZERO
Wall momentum is STILL ZERO

Where did your momentum go?

Well neither the wall or the ball are moving any more so IT ISN'T THERE ANY MORE

Why?

Because the kinetic energy of the ball was absorbed by the plaster and used up completely in reshaping it from a nice flat surface into a big sodding dent!

KE and momentum may not use the same calculation but they are very similar in nature. Both can be imparted or absorbed by other features in any system and DO NOT ALWAYS EQUAL ZERO. In fact the only time when momentum in a system can actually be zero is when that entire system has reached maximum entropy.

That is just basic physics.
Title: Collisions
Post by: Botsareus on April 04, 2005, 04:37:15 PM
ok , I just tryed the F1 mode , I found some more bugs , but my bots make it , They do make it anyway , few....
Title: Collisions
Post by: PurpleYouko on April 04, 2005, 04:40:01 PM
Quote
But if the new legues will use this new , slow , collisions ,then I have no choise , I will use them too.

What actually happens now (V2.36) is that when a collision is detected the two robots are moved (not accelerated) directly away from each other such that they don't overlap.
Next, the incoming momentum of both robots in both x and y directions is calculated.
Then the combined momentum is divided between the two robots in proportion to their mass so that a huge fat robot hitting a tiny one will just be slowed a little while the tiny one will be accelerated away from the impact quite a lot.

A collision like this (more arrows = more speed)

O>>>>>o>

will result in

O>>>o>>>>>>>>>>

and

O>>>><<o

will yield

O>o>>>>>>>>>>>>

Make sense now?
Title: Collisions
Post by: PurpleYouko on April 04, 2005, 04:42:06 PM
Previously any collision resulted in both robots being accelerated away from the impact by an amount proportional to the degree of overlap.

This just wasn't realistic as a large overlap could sometimes happen at low speeds while a small overlap could equally happen at high speeds.
Title: Collisions
Post by: Botsareus on April 04, 2005, 04:43:34 PM
ok , thx,  now it makes sense.
Title: Collisions
Post by: Zelos on April 05, 2005, 12:59:34 AM
it is ALLWAYS, ask any physicer about it. it you throw a ball and then it bounce at a wall. to wall get some momentum and goes at the other way, or maybe its the air that get the momentum, did you ever think on that air can get it?. and if I start whit 3m/s then something else have -3 compared to me. it is coz the momentum in the universe always shall be 0, that spacecrafts worx. if it wasent so we wouldnt be able to go anywhere in space.
Title: Collisions
Post by: Numsgil on April 05, 2005, 01:33:04 AM
Quote
t is coz the momentum in the universe always shall be 0,

Momentum of the universe is undefinable:

Momentum of Universe (http://www.madsci.org/posts/archives/nov2001/1004787623.As.r.html).

Wikipedia also says:
Quote
However, in curved spacetime which is not asymptotically Minkowski, momentum isn't defined at all.

Quote
the momentum in a system is always 0

Quote
no matter what you do, it will always be 0

Momentum for any system is defined as:

Sum of (mass_x * velocity_x)

Say I define a system with 1 mass and 1 velocity.  A ball 2 kg moving at 5 m/s.  In my system, total momentum is not 0, but 10.

Therefor, for my system, momentum is not zero.

Now, is Momentum always conserved?  Yes, assuming it's definable (see above).  That means that taken any system. the change in momentum for the system will be zero.  That assumes you take everything into account, and that you have a way to measure micro velocity.

PY's examply describes how and why Kinetic Energy is not conserved.  That's because KE is a form of energy.  Energy itself is conserved.

But the big question: is momentum itself always zero?  Most certainly not.  Shame on you for even thinking such a thing!
Title: Collisions
Post by: Numsgil on April 05, 2005, 01:50:44 AM
Imagine the universe is not expanding.  That's not hard, you've done it already.

Imagine I am moving 5 m/s relative to the universe.  Now imagine I define the universe as everything except me.  The momentum of the universe would be 5m/s times its mass.  Definately not 0.

Because velocity is a relative term, the quantity of momentum isn't important.  Only the change in momentum is important.
Title: Collisions
Post by: PurpleYouko on April 05, 2005, 09:36:28 AM
You are correct that the atoms in the air or water or whatever medium a moving object is in, will take on some of the momentum as the object slows but then again we aren't attempting to model every atom of the whole universe here. All we care about are collisions between balls of varying size and mass.

My whole poiint is and always has been, that it makes more sense to model Darwinbots physics on momentum rather than KE.
For one thing, momentum has a vector while KE doesn't (it actually can but it is harder to define)
It also gets a bit tricky to split KE into X and Y coordinate vectors while for momentum it is trivial.

Basicly I am just too lazy to work out the math for using KE so I substitute momentum instead.

Incidentally though, how do you explain that the universe is not only expanding but accelerating?
How does that fit in with your idea of zero momentum?
Where is the extra velocity coming from?

Come to that, how do you know that the big bang wasn't already moving at the point of exploding into a new universe? If it had been then the universe will have a significant bias in momentum in one direction so the total combined momentum in the system will definitely not be zero.
Besides which it is impossible to find a position of rest with which to compare motion so the toatal momentum of the entire system is inherantly unknown and unknowable.
You are the one who keeps going on about relativity. Check your facts before making sweeping statements that can never be proven under the physical laws that you yourself advocate.
Title: Collisions
Post by: Endy on April 05, 2005, 11:14:38 PM
Would it be possible to have a collisionless mode? Not exactly realistic, but the speed would be unreal. :D


Endy B)
Title: Collisions
Post by: Numsgil on April 05, 2005, 11:55:42 PM
Actually collisions have been so streamlined you'd only get like another 20% increase in speed.

But it might be worth a go.  An interesting mode to be sure.

A much faster and pointless mode would be a 'blind' mode where bots don't get any information through eyes or reference variables.  You'd have to 'feel' your way around.  Talk about unreal speed.
Title: Collisions
Post by: Old Henk on April 06, 2005, 07:43:04 AM
One of my bots is visually impaired. Well, actually I made it to be. Hmmm, I think I hear  DB-activists knocking at my door...
Title: Collisions
Post by: Zelos on April 06, 2005, 01:26:09 PM
im giving up on you guys, its simply to hard for you to understand that a momentum to the right is minus for one that are to the right. like the borgs in star trek says "you think so 3 dimensianal"
Title: Collisions
Post by: PurpleYouko on April 06, 2005, 01:35:38 PM
Quote
im giving up on you guys, its simply to hard for you to understand that a momentum to the right is minus for one that are to the right. like the borgs in star trek says "you think so 3 dimensianal"
It doesn't apply to DarwinBots though.

The medium in which they swim is fictional. It isn't actually there so we can't transfer momentum to millions of non-existent atoms of water, air, chicken soup or whatever the hell you want to imagine the bots swimming through.

When a robot slows down due to friction, where does its momentum go?
When a robot speeds up with a .up command where does its momentum come from?
Without modeling every atom of the medium in which they live, complete with eddy currents, viscosity and all the other fun little things that exist in the real world, there is no way to fully conserve momentum in DarwinBots.

And even if we could, who the heck cares?

Anyway how could a DarwinBot think in 3 dimensions when they are clearly 2 dimensional creatures.
Title: Collisions
Post by: Zelos on April 06, 2005, 01:49:38 PM
I dont say we shall simulate all of them, it just went from fictionalmomentum to real momentum, or atleast I thought so. of course we cant simulate all of them, but if 2 bots bump into each other I think it shall follow that rule, but still what ive seen, you guys truly are "3 dimensianal" in ur thoughts
Title: Collisions
Post by: shvarz on April 06, 2005, 01:58:28 PM
Zelos, when you have free time, try the following: Find an experimental subject, then run towards him/her as fast as you can and bump into him (or her).  Measure the outcome and see if it matches the expected "momentum conservation".  Try it with subjects of different sizes  Try doing the same in water   :)
Title: Collisions
Post by: Zelos on April 06, 2005, 02:09:54 PM
it aint possible to messure it EXACLY on earth. but it is in space and I think they have done it. and I know im right shvarz, wasent it you who know much about science? and the law of conservation tells that momentum cant disaphere or come from nowhere. man ur so 3 dimensianal shvarz
Title: Collisions
Post by: PurpleYouko on April 06, 2005, 02:22:53 PM
Nobody ever said you could make momentum from nothing or disipate it to nothing.

Al we have been saying is that it is impossible to know if the entire momentum in a given system is zero. All we know is that the momentum in the system remains unchanged

If your entire system is on board a speeding spacecraft then its net momentum is shitloads but if it is stationary (with respect to what though?) then it could be zero.

There is just absolutely no way to know what the total momentum for any system is since it is also impossible to know the absolute velocity of any object anywhere. As you are so fond of saying, it's all relative.
Title: Collisions
Post by: Zelos on April 06, 2005, 02:47:48 PM
thats what ive been saying, but I have gone from the thought that its most likly to start whit 0 momentum if we start whit a big bang
Title: Collisions
Post by: Botsareus on April 06, 2005, 02:48:17 PM
zelos are you saying this:

   A is still
  B is moving toward A
  B(300jingleballs\spuclick) is the speed of B

A<---------------B(300jingleballs\spuclick)

results in

A(0jingleballs\spuclick)B(0jingleballs\spuclick)

?
Title: Collisions
Post by: Zelos on April 06, 2005, 02:51:41 PM
ok, bot, use SI units for everything and not the freaking mph, I dont use km/h, do I?
no what im saying is that
AB
a throw away object be and A/B is equal heavy. And B gets V 5m/s then A will get 5m/s in the other direction
Title: Collisions
Post by: Botsareus on April 06, 2005, 02:55:15 PM
Not if more effects of friction on A then B....


All good zelos , now it makes more sense....


***
Btw I am more used to km\h myself... who cares.   ok ok , ill change it to jingleballs\spuclick
Title: Collisions
Post by: Botsareus on April 06, 2005, 02:57:45 PM
:laugh:
Title: Collisions
Post by: Zelos on April 06, 2005, 03:03:04 PM
if you ask me, the last thing was just stupid, when we talk about this we use SI units, which means m/s, but for me mph tell me nothing more than the speed is between 0m/s to C m/s
Title: Collisions
Post by: Botsareus on April 06, 2005, 03:05:53 PM
:D So you did get it , good job...
Title: Collisions
Post by: Zelos on April 06, 2005, 03:18:31 PM
of course I get it, do you think im somekinda idiot? im insulted. I´ll send you to the coal mines when im done :evil:
Title: Collisions
Post by: Botsareus on April 06, 2005, 03:50:43 PM
(just dont start taking yourself seriosly)
Title: Collisions
Post by: Numsgil on April 06, 2005, 05:10:26 PM
Uh, Zelos, I don't understand what it is you're arguing anymore.  Is it that momentum is always conserved in non-curved space time?  Then I think I agree with you, although I don't agree that that actually tells us anything useful, since as PY says, friction and other things have to be measured on the macroscopic level.  Momentum is really only useful directly before and after a collision.

If you're arguing something else, shame on you!
Title: Collisions
Post by: Zelos on April 07, 2005, 12:24:46 AM
im not argueing anymore