Darwinbots Forum

Code center => Suggestions => Topic started by: rsucoop on February 25, 2008, 12:23:10 PM

Title: Pond Mode Expanded
Post by: rsucoop on February 25, 2008, 12:23:10 PM
I'm sure this is already in use, but I've not seen it occur in DB. What if velocity changes effected all other bots; I.e. a direction away from a bot with a lot of velocity will push the water behind the moving bot, thus affecting another bot. Essentially something like Thai Chi would be born, a bot could fix to a spot and just use velocity vectors to push opponents away from them. What does everyone think about that?
Title: Pond Mode Expanded
Post by: Numsgil on February 25, 2008, 07:46:41 PM
It's computationally expensive, basically.  If you're in to that sort of thing, check out plasma pong (I think you can google it).  Maintaining and updating velocity vectors in a huge vector field is really cool, but it would simply bring the program to a crawl.
Title: Pond Mode Expanded
Post by: rsucoop on February 25, 2008, 09:44:36 PM
Quote from: Numsgil
It's computationally expensive, basically.  If you're in to that sort of thing, check out plasma pong (I think you can google it).  Maintaining and updating velocity vectors in a huge vector field is really cool, but it would simply bring the program to a crawl.

What if it were very ineficient and inacurate? Just a velocity change to a very limited field of effect. Say 10 away on the eye return, and only with 1 degree of area. THis would mean a jet could be used. The physics for emulation shouldn't be too difficult, since only a small area of vectors would need to be created; we can also assume that the jet affect carries no true inertia, so it would stop once a bot turned.
Title: Pond Mode Expanded
Post by: Numsgil on February 25, 2008, 10:48:50 PM
Quote from: rsucoop
Quote from: Numsgil
It's computationally expensive, basically.  If you're in to that sort of thing, check out plasma pong (I think you can google it).  Maintaining and updating velocity vectors in a huge vector field is really cool, but it would simply bring the program to a crawl.

What if it were very ineficient and inacurate?

I haven't worked it before, so I'm going on heaer say.  If the user is running some multicore computer, it might be easier.  This sort of thing is pretty easy to parallelize.

Quote
Say 10 away on the eye return, and only with 1 degree of area. THis would mean a jet could be used. The physics for emulation shouldn't be too difficult, since only a small area of vectors would need to be created; we can also assume that the jet affect carries no true inertia, so it would stop once a bot turned.

I don't understand exactly what you mean here.  Are you suggesting that we just have lines of force from a bot's motion, ignoring issues of turblence, etc.?  It might work.  It would simplify things, certainly.  If we simulated a sort of elongated triangle off each side of a moving bot, representing its wake,  and an elongated path where the bot has just been, representing the dead zone inside the wakes, and slowly expanded the shapes to represent wave propogation, it might work.

So I dunno, maybe.
Title: Pond Mode Expanded
Post by: EricL on February 25, 2008, 10:50:21 PM
It would be easier (and more effecieint) to give shots mass.  Bots could then use shots for propulsion.  Combine this with control over shot velocity and you have a reaction drive...
Title: Pond Mode Expanded
Post by: Numsgil on February 25, 2008, 10:52:54 PM
That would work.  Would bots have to give up some of their own mass when they form a shot?  Or do we assume a sort of magic mass-is-created-from-nrg when a shot is formed?  Not that conservation of mass doesn't necessarily apply in the bots' universe anyway.
Title: Pond Mode Expanded
Post by: rsucoop on February 26, 2008, 12:41:27 PM
Quote from: Numsgil
That would work.  Would bots have to give up some of their own mass when they form a shot?  Or do we assume a sort of magic mass-is-created-from-nrg when a shot is formed?  Not that conservation of mass doesn't necessarily apply in the bots' universe anyway.

E=mc^2

So it can be assumed that even if energy was used, the mass would be there in a small form. It might be easier to say that a -6 body shot produces a massed shot, since it takes away mass from the bot. But how would this effect the planet-eater mode?
Title: Pond Mode Expanded
Post by: shvarz on February 26, 2008, 12:54:52 PM
Quote
Would bots have to give up some of their own mass when they form a shot?

Isn't energy used to calculate bot's mass?  If not then it should be.  Thus a bot spending energy on a shot would loose some mass. Although I would not go so far as to make it a "realistic" conversion, I.e. a shot should have more mass than what a bot spent on its creation in energy. Otherwise this method of propulsion would be extremely inefficient and expensive.
Title: Pond Mode Expanded
Post by: rsucoop on February 26, 2008, 01:09:49 PM
Quote from: shvarz
Quote
Would bots have to give up some of their own mass when they form a shot?

Isn't energy used to calculate bot's mass?  If not then it should be.  Thus a bot spending energy on a shot would loose some mass. Although I would not go so far as to make it a "realistic" conversion, I.e. a shot should have more mass than what a bot spent on its creation in energy. Otherwise this method of propulsion would be extremely inefficient and expensive.

I cannot agree with you on that. I like having the dietary part of the bot exclusively gene activated. And unless you commit millions in energy, the amount of mass going into a shot is insignifigant with relations to energy-mass transfer.
Title: Pond Mode Expanded
Post by: EricL on February 26, 2008, 01:54:02 PM
In the current code, nrg has no mass.  Body and shell are the only substances with mass.  Thus a bot can change it's mass by making shell or converting nrg to body and back.  This is what Num's means when he says conservation of nrg/mass doesn't apply.

As a strawman proposal, I might make nrg shots have mass equivalent to if their contained nrg was converted to body.  Bot's could generate quite a propulsion kick by keeping their own body and shell stores small and shooting.  It would be easy to shoot a shot more massive than the bot that shot it.  Of course there is a cost to doing this in the form of lost nrg.  Impact adds both the nrg as well as the inertia to the impacted bot.
Title: Pond Mode Expanded
Post by: rsucoop on February 26, 2008, 02:32:19 PM
Quote from: EricL
In the current code, nrg has no mass.  Body and shell are the only substances with mass.  Thus a bot can change it's mass by making shell or converting nrg to body and back.  This is what Num's means when he says conservation of nrg/mass doesn't apply.

As a strawman proposal, I might make nrg shots have mass equivalent to if their contained nrg was converted to body.  Bot's could generate quite a propulsion kick by keeping their own body and shell stores small and shooting.  It would be easy to shoot a shot more massive than the bot that shot it.  Of course there is a cost to doing this in the form of lost nrg.  Impact adds both the nrg as well as the inertia to the impacted bot.

I like that idea. It shouldn't be too hard to implement since the physics is already in 2.43.1.
Title: Pond Mode Expanded
Post by: EricL on February 26, 2008, 02:45:39 PM
I should point out that this might be a more radical change than it first appears.  It's not enough to just give shots mass.  I have to impliment Newton's 3rd law when it comes to firing nrg shots and when nrg shots impact.  This will radically change the effect the act of firing an nrg shot or having an nrg shot impact has on light bots, particularly if we go so far as to impliment it for returned nrg shots.  The result my be that when you shot feed off a light bot, it goes flying away due to the reaction of ejecting the nrg shot and you go flying away when the shot impacts you and transfers it's inertia to you.  Not saying this is a bad thing - it might actually help dumb bots evade shot feeders and give slower more massive bots a shot feeding advatage - but I wanted to point it out.
Title: Pond Mode Expanded
Post by: Numsgil on February 26, 2008, 09:46:23 PM
I would add it as a new shot type.  It would be used exclusively for propulsion, forcing another bot to go away, that sort of thing.  Wouldn't do anything else.  Or add it for all shot types and see what happens.  It might not be as big an effect as we think.

Also, if it's feasible, I'd like to see bots hit off center to start spinning.
Title: Pond Mode Expanded
Post by: Endy on February 27, 2008, 03:35:08 AM
Sounds cool  

I agree that a shot type would be best, but it could be interesting to see what effect it has on regular shots.

Could we implement more of the actual laws for motion anyways? The thing with massive bots and gravity has always bugged the crap out of me.
Title: Pond Mode Expanded
Post by: Numsgil on February 27, 2008, 04:41:49 AM
A proper physics engine is a project that's as deep and convoluted as the rest of the program put together.  It's what I'm presently working on.
Title: Pond Mode Expanded
Post by: EricL on February 27, 2008, 11:49:41 AM
A new shot type with mass is fine with me.  Another shot type increases the genospace and provides evobots another simple means for mutations to result in locomotion.

Any suggestions on how to determine the mass and nrg conversion rate of the shot?  A strawman is to use a .shootval value indicating the nrg to shoot and make the mass the body equivalent of this.   Not sure what a 0 .shootval should mean - a massless shot?  Also, should an impact transfer the body amount?

Adding inertia transfer to angular momentum and spin for off-center impacts is doable, but a little involved.  The concept of anagular momentum is there today - bots can spin and maintain spin due to tie torque today - so I can expand this but it may really call out issues with our broken absolute direction aiming paradym....  I may have to replace .aimsx, etc. with thrusters for this to work well...
Title: Pond Mode Expanded
Post by: Numsgil on February 27, 2008, 01:41:40 PM
Using a strict nrg to equivelant body mass probably isn't a good idea (hugely wasteful).  I would do nrg to equivelant shell mass, I think.  That's like 10 to 1 compared with body, right?

Angular momentum is broken presently, because it wasn't based on proper laws of motion.  If you fixed up the behind the scenes stuff to incorporate Moment of Inertia and Torque, though, aimdx, etc. could be modelled as motors: they produce as much torque as needed to achieve the desired change in angle, and charge the bot the equivelant nrg.