Friday, January 1, 2016

Improving Bumping with Mass Matching: Part II - The Data!

Its the most wonderful time of the year, and the holiday season is a good time for contemplation on meaning and methods.  When I had first looked at the mass-match bumping data that I promised you in November, I found some interesting things.  This post took a little bit longer than I had anticipated because I wanted to present a plausible hypothesis for what is happening.  Now that this is done, I hope it will motivate you to explore the bump behavior in game further and hurl your adversaries across the grid with greater energy than ever before.  Enjoy the post, and please contact me with questions or corrections. 

In my last post, I proposed a way to improve how far you can bump objects of much different size by thinking a bit about impedance matching, or mass matching, to couple more energy to the bumped ship.  Once again, the on-grid motion mechanics of EVE are based on real physics models.  Understanding this physics deeply is a way to learn how to do things that were previously believed impossible.  I continued in this line of reasoning by applying mass matching to the analogy of a Newton's cradle device and applied it to ship collisions. 

Recall in the previous post that I showed that if we use an intermediate ship to match the masses between the bumping ship and target ship, that we can deliver more of the bump energy to the target.  That is, one ship bumping another with no intermediate will bump it with velocity, 
$\Large v_{2-ship}(t=0^+) = v_1 \frac{2 m_1}{m_1 + m_3}$  
Whereas, if an intermediate mass, m2, is present, the target ship bump velocity is,
$\Large v_{3-ship}(t=0^+) = v_1 \frac{4 m_1 m_2}{(m_1 + m_2)(m_2 + m_3)}$ 

To maximize the distance that we bump our target, I find the best mass for the intermediate ship is, $m_{2,optimal} = \sqrt{m_1 m_3}$ . The additional distance that you will bump the target in this case can be written as the ratio, 
$\LARGE \frac{x_{3-ship}(t \rightarrow \infty)}{x_{2-ship}(t \rightarrow \infty)} = \frac{2 (K + 1)}{(\sqrt{K} + 1)^2} $.
Readers will recall that K is the ratio of the bump target ship to the initial bumping ship, $K = m_3 / m_1$.  In the case where the square-root of K is much larger than 1, we can simply approximate this ratio as a factor of 2.  In most cases, however, the additional bump distance for capitals is 40% to 60%.  Based on this analysis, I setup an experiment where I bump a Thanatos with either a 500MN MWD Vagabond, or with an intermediate Orca bumped by the 500MN MWD Vagabond. On to the experimental results...


Data Doesn't Lie

I have shown how to calculate the bump distance of objects in EVE.  Lets see if bumping with an intermediate ship helped to improve the bump distance, and if so, by how much?


Figure 1 shows our comparison point with a traditional bump setup -- a 500MN MWD Vagabond hull bumping a stationary Thanatos.  Keep in mind that for each of these data points, I waited around 8 x τThanatos = 318 seconds, for the velocity of the bumped ship to drop below 0.1 m/s.  Of course, if I could accurately sample the ship velocity immediately after the bump, none of that would be necessary because I could compute the settle distance from τVBUMP, but I'm too lazy to setup OBS.  As you can see in Figure 1, there is good agreement between data and theory.  


Figure 1: Data for the two-ship Carrier bumping is shown.  Time constant for Thanatos in this situation is, τThanatos = 39.7s.  Note that I make a small correction to the bump distance of the carrier by 500m (See Part I for notes on zero-meter radius), and I show quantized bump distance greater than 10,000 meters. 

Next, I positioned an unfitted Orca between 200m and 400m of the target Thanatos.  This distance should not be critical to the results as the only requirement is that the Orca does not have time to slow down after being bumped.  If the distance between the stationary Orca and the Thanatos is much smaller than τOrcaVMAX,Orca, which is approximately 3000m, you should get similar results.   I then bump the Orca into the Thanatos using the 500MN Vagabond, with varying velocities. 

Also, note that these results should not depend on the Orca pilot's skills.  This is because the mass is not affected by skills and the 'inertia' (or drag) doesn't matter because the distance that the intermediate ship moves during the collision is small. As you can see in the data below, at low bumping ship velocities, the data and theory agree again, increasing the capital bump distance by 40%.  Something is happening, however, at higher bump velocities that is not described in the intermediate bump mechanics above!   

Figure 2: Bump distance data using closest optimal intermediate ship mass (optimal = 266Mkg, m2,Orca = 250Mkg) is shown.  Theory predicts a straight line, however, above 2500m/s, a much larger bump distance is achieved.


What is happening here?!  


At 3000m/s and higher, the carrier is bumped an even greater distance!  Can a simple explanation capture what is going on here? 

Without understanding what the bump model is doing internally all we can do is test hypotheses.  Lets start with a  simple hypothesis based on notions of limitations of the tick rate in the game, breaking up a complex bump interaction into individual events.  

The Double-Bump Hypothesis


Notice that the transition to this longer bump distance happens only at high velocity, above 2500m/s.  What if the bumping ship is hitting both the intermediate ship and the bump target before it is being slowed down by either of the collisions.  Then the intermediate bump ship would then hit the target ship, contributing energy from the bumping ship twice!  In this arrangement, the input energy is being double counted.*

If you derive the motion of the target ship after both bumps, you have to account for the fact that the target is already moving.  I derive the following mess for the target velocity after all of the bump events are complete.  Note that I call this time $t = o^{++}$ because it is after the target has been struck twice,  

$\Large v_3(t = 0^{++}) = v_1 \frac{2 m_1(m_1m_3 + m_1m_2 + 3m_2m_3 - m_2^2)}{(m_2 + m_3)(m_1 + m_3)(m_1+m_2)}$


Plotting this against our data, I see qualitative agreement in Figure 3, compared to this larger bump distance in the 3-ship case.  As with many models, it explains almost all of the data, but this does not mean that it is the only explanation, or that it is correct for all circumstances. 
 
Figure 3: The intermediate ship data, for higher strike velocities, shows first-order agreement with the double-bump hypothesis.


Although it is impossible to get definitive proof, it is plausible that EVE works in this way.  Also, consider this 'hack' from the developer's perspective -- If you needed to write a collision algorithm that worked for any number of ships, with synchronization between any number of clients, and limited to a finite time-step, you'd compartmentalize the ship interactions, too.  So, if my hypothesis is correct, CCP's engineering of this solution meets the challenging needs of the game, even if it does not replicate a perfectly adiabatic process in all situations.  

This presents an obvious and intriguing possibility.  If there is a way to double-count energy, is there a way to triple count it?  What about multiply the input energy by any arbitrary amount?  Can we deliver more energy to the target ship than we put into the collision event? 

Looking at the energy for each of the bump cases in Figure 4, you can see that the double-bump phenomenon is now quite efficient, delivering almost 80% of the energy to the target in spite of a 20x difference in the masses of these ships.  Under normal circumstances, less than 20% of the energy is delivered to the target from a 500MN bump stabber, so an almost 4X improvement is huge! 


Figure 4: At high velocities, the double-bump hypothesis appears to explain most of the energy transfer to the target capital ship.  A 4X improvement in bump distance energy is achieved over using the bumping ship alone. 


I have presented enough on this for one post, and given the community something to ponder and experiment with.  In my view, the next step is to study the double-bump regimen in greater detail, reoptimizing the intermediate bump ship mass as well as experiment with ways to further increase the number of double-bump events.  Is the order of the strikes from the intermediate ship and the bumping ship important?

Can we make triple-bump events?  More?  

The more we study the system, the more questions arise. 

Applications of Mass-matching Bump Technique

In recent history, CCP introduced a new rig called a Higgs anchor.  Whatever CCP's intentions for this module, at first glance it would appear that this rig has made bumping more challenging because it doubles the mass of the target ship.  With mass matching techniques, this effect can be mitigated.  The rig bonuses have quite a profound effect on the ship motion parameters:

Bonuses for the Higgs Anchor Rigs:
  • Mass +100%
  • Inertia -55%
  • Velocity -75%
Looking more closely, the consequences of these parameters is that bumped distance will be reduced significantly for smaller ships when they have this rig fitted.  Figure 5 shows how a Higgs rig will affect the target bump distance for selected bumping ship configurations.  Based on my calculation, the distance ratio is,

$\Large \frac{x(t \rightarrow \infty)_{Higgs}}{x(t \rightarrow \infty)_{No \: Higgs}} = 0.45 \frac{m_1 + 2m_2}{m_1 + m_2}$

When the target mass is much larger than the bumping ship, the bump distance is almost unchanged.  So, capital ship bump distance will not be affected much by Higgs anchors, because the mass is already so large that energy transfer can't be made much worse.  Smaller ships, on the other hand, such as cruiser and BS hulls can try to reduce how far they get bumped. 


Figure 5: Bump distance ratio for ships with a Higgs Anchor rig fitted.  As you can see, capital ship bump distances should not be affected much (103 Mkg) but smaller ships bump distance will be significantly shorter. 
With the information in my last two blog posts, mass matching techniques give players an option to counter the effects of mass in the game.  Even more significant is the double-bump phenomenon which can significantly extend the bump distance for massive targets.  Stationary mining ships not paying attention to an mass matching ship slipping up along side them deserve to be hurled across space like a pierogi at a pierogi-tossing competition.  


Appendix: More intermediate ships

The case when we have a large number of intermediate ships beckons to us with the possibility of perfectly efficient as an energy transfer between bumper and bumpee.  Of course, in game it would be very difficult to arrange this in an adversarial situation but it is an interesting case to describe formally.  

Start by imagining that you have N total ships.  Let mi be the mass of i-th ship in the chain.  The first ship, m1, is the bumping ship.  The final ship, with mass mN, is the target ship to be bumped.  The N-2 intermediate ships are arranged in a line, and the target ship is placed at the end of this sequence of ships, i.e. m2, m3, ..., mN.  The bumping ship strikes m2 transferring energy to start the domino motion of Newton's cradle elements which will ultimately strike the target. 

Assuming that the striking ship is not triggering any double-bump effects, as we saw above, the first bump triggers each ship in the sequence to strike the next ship.  I can write the velocity of the next element i+1, based on the velocity of the previous ship and the masses,

$\Large v_{i+1} = \frac{2 m_i v_i}{m_i + m_{i+1}}$

It is easy to generalize this to the solve for the velocity of the final ship, by constructing the product of these terms, as,

$\Large v_{N} = v_1 \left ( \prod\limits_{i=1}^{N-1} \frac{2 m_i }{m_i + m_{i+1}} \right  )$

The obvious question I ask next is, what is the optimal tapering of the masses in the sequence {2, 3, ..., N-1} to achieve maximal energy transfer to the target?  

The equation below fits the bill and contains a trick.  It expresses the mass of the i-th ship as an exponent of the ratio of the target ship to the bumping ship, and then scaling along the array of ships to the α-th root.  You may find this to be of interest if you attempt this derivation yourself, 

$\Large m_i = m_1 K^{(\frac{i-1}{N-1})^\alpha}$

Good luck and let me know what you find.  I hope you have found this post enlightening and good luck with your bumping activities.


Interlude

"If you have two loaves of bread, keep one to feed the body,
sell the other to buy Drum & Bass tracks to feed the soul."
                                                     - Russian Proverb




* Of course, you could also try the assumption that the bumping ship hits the intermediate ship, and then the intermediate ship strikes the target, followed by the bumping ship striking the target.  Order matters in this case, because each step will create different initial conditions for the bumping of the target ship. 


Friday, November 20, 2015

How You Can Improve Bumping by Studying a Desk Gadget: Part I - The Theory




Bumping ships in EVE is fundamentally about exchange of energy between objects.  Mechanical systems store energy kinetically, or in some potential, such as gravity or a spring.  Now, in ship bumping, there are no explicit springs because bump events are practically instantaneous in EVE.  So the difference we have to focus on is the mass of the ships.  

Energy flows most efficiently from one object to another when the masses are the same.  That is, matching the form of a source of energy to its destination, improves the efficiency of the conversion.  Unlike most computer games, the world of EVE is based on a physical model that enforces these laws, so understanding them deeply is the source to doing things others can not.


In this post I describe a bumping technique that has been used in EVE primarily for bumping capital ships, but the principle appears to apply to all ships.  Black Legion made use of this technique when bumping capitals out of station docking radius.  No doubt, other groups use this approach as well, but I have yet to see it described publicly or with insight.  I hope you enjoy these notes. 


In a nutshell...

The case of one ship bumping another is easy enough to understand.  Both energy and momentum are conserved for object collisions in EVE.  While it is reassuring to know that all the energy you put into the collision comes out as ship motion, the problem is that much of that energy is reflected in the bumping ship as it bounces off the target ship.  That is, the energy transfer between the objects was limited by the fact that the incident bumping ship bounced backwards.  I described the physics of this system in Part III of my original notes if you are interested in data and analysis supporting this claim.  A good system to help build intuition for what is happening in an elastic collision model is a common desk gadget, the Newton's Cradle.  

Figure 11-1: Animated Newton's Cradle.  Used under Creative Commons from Lurlock:Wikipedia.
If you've ever played with one of these gizmos, you'll know that energy is mostly conserved when you raise one of the spheres and start the pendulum collisions.  Bumping between two ships in EVE is, in most respects, identical to the effect of a Newton's Cradle with two spheres that that are proportioned to the ship masses.*  All the energy that you put into the collision comes out as either motion in the target ship or reflected motion in the bumping ship. 

The fundamental insight of this post is that because energy exchange between objects in EVE follows a fundamental physical law, the real-world technique of impedance matching applies to in-game bumping interactions.  

The way in which EVE motion is different, of course, is that all ships are experiencing drag proportional to their velocity so after being bumped, the target ship will slow down, provided it was stopped to begin with.  If you want more detail on how to calculate ship bumping effects, you can review Part III of my notes in my September 15th blog post.** On with an example...

Two Ships, One Bump

Lets consider bumping a target ship, that has mass m1 and inertia, I, with a bumping ship that is going velocity v1, and also has mass, m1.  A quick thought experiment based on the Newton's Cradle tells us exactly what will happen here -- the bumping ship will stop in its tracks, transferring 100% of its energy to the bumped ship!  In the figures below, I colored the bumping ship in a rust color for obvious Minmatar reasons.
 
Figure 11-2: Bumping of ships of identical mass.  All of the energy is transferred to the target ship. 

Based on the elastic collisions, and for m2 = m1,
$\large v_2(t = 0^+) = \frac{2v_1(t=0^-) m_1}{m_1 + m_2} = v_1(t=0^-)$

If you try this in game using the 'Approach' command you will notice that your bumping ship continues to move forward, but this is because your motion command is still active.  If the motion command were removed at the moment of collision your ship would stop dead in place and the target ship would take your velocity and drift a distance exactly $x=v_1m_2I_2 = v_1\tau_2$.  Energy is obviously conserved in this instance because the energy of the target ship is equal to the energy that the bumping ship had at the start of the collision event.  This is identical to the Newton's Cradle case.  

Now lets consider another common case, where the bumping ship is less massive than the target ship, or m1 < m2. In this general case, the velocities after bumping are, 
$\large v_1(t = 0^+) = v_1\frac{m_1-m_2}{m_1 + m_2}$ 
 $\large v_2(t=0^+)=v_1\frac{2m_1}{m_1 + m_2}$

As you can see from the equations above, when the mass of the target is greater than the bumping ship, the bumper will be reflected back with some velocity.  You can try this at home, either with your metal balls, or with ships in EVE. 
Figure 11-3: When bumping a larger ship, a lot of the bumping energy is reflected.

Looking at the velocity of the target ship, you can see that more of your velocity is transferred to the target when the masses are close together.  Is there a way to exchange energy between more similar masses making the energy exchange ratio between the ships more complete? 


Let's try an Experiment...

What if we introduce an intermediate ship that is in-line with the bumping ship, placed very close to the target ship and is stationary.  Instead of bumping the target, instead I aim to bump the intermediate ship, having some mass m2, which will then strike the target. 

Crazy talk!  Or is it...?

I've draw this case out below, and you can imagine from the intuition we developed above that the bumping ship, m1, is reflected with less velocity if strikes m2, which has less mass, than if it had bumped into m3, which has greater mass.

Figure 11-4: An intermediate ship is included to improve energy transfer from the bumping ship to the more massive target ship.

If I analyze this by writing the m3 target ship's velocity after both bump events are completed, 
$\large v_3(t=0^+) = v_1\frac{4m_1m_2}{(m_1 + m_2)(m_2+m_3)}$

What mass should we choose for m2?  Can this approach really be better than bumping m3 with m1? Before I write the ratio of final velocities, lets write these mass arrangements as ratios so we can get it down to one number.  

Define the ratio of the target ship, m3, to the bumping ship, m1, as K = m3/m1, and let's choose the intermediate ship mass, m2, to be a ratio α of the bumping ship, m2 = α m1.  Writing the ratio of the target bump velocities for these cases is, 

$\large \begin{align*} \frac{v_{3,3ships}(t=0^+)}{v_{2,2ships}(t=0^+)} & = \frac{2m_2(m_1 + m_3)}{(m_1+m_2)(m_2+m_3)} \\ & = \frac{2 \alpha (1 + K)}{(1+\alpha)(\alpha + K)} \end{align*}$             (11-2.x)


We can find the optimal value of the intermediate ship, m2 = α m1, by looking for where equation (11-2.x) has a minimum point and then solving for α.  It turns out that the optimal mass for the intermediate ship is simply the square root of the ratio between the bumping ship and the target ship, or, 
           $\large \alpha_{optimal} = \sqrt{K}$                                                  (11-2.y)

Therefore, the optimal mass of the intermediate ship, m2, 

$\large \begin{align*} m_{2,optimal} & = \alpha_{optimal} m_1 \\ &= \sqrt{K} m_1\\ &= \sqrt{m_1 m_3} \end{align*}$

This quantity is the geometric mean of the bumping and target ships.  It is certainly nice when I get a simple formula that I can remember.  Let's see how this performs in a simple example.  If I'm bumping a BS (100Mkg) with an MWD cruiser (15Mkg), then K = 100/15 = 6.6, which means that m2 = αopt m1 = 38Mkg.  Even if I could find or fit a ship with a mass near 38Mkg, would it really help?  Solving equation (11-2.x) I find that using the optimal intermediate ship will increase the bump distance of this BS target by about 20%.  This is certainly helpful but was all this work really worth an extra 20%?  

If I plot equation 11-2.x for a wide range of mass ratios, K, I find the benefit in bump velocity (and corresponding distance) below in Figure 11-5.  As you may expect, this helps us more if the ship masses are very different, i.e. bumping something very massive with a much smaller ship.  Considering ships in EVE span a mass range of over 1000, I can see how this would be extremely helpful when bumping capital ships. 

Figure 11-5: Benefit of using one intermediate ship with optimal mass to bump a ship that is K times more massive.  If you are in a ship with the same mass as your target there is no benefit, as with the equal-mass Newton's Cradle.

The other question pilots should ask is, "What masses of intermediate ships are needed for various bumping conditions?  Are ships with these masses available?"  Indeed, the optimal masses are frequently difficult to synthesize in the game.  There are, however, some important bumping cases where CCP has given us just the right tools for the job. 

The Classic Match-up


Lets consider capital bumping conditions -- a 500MN Vagabond (61Mkg) trying to bump a carrier (1163Mkg). Intuitively, the bump cruiser is going to bounce off something weighing almost twenty times as much unless we give it some help.  Figure 11-6 below gives a sense of the mass difference if these were solid spherical elements in a Newton's Cradle.  



Figure 11-6: As an aid to intuition, I have included a Newton's cradle with a carrier and a bump-Vagabond sized for spheres with constant density. When the target ship and bump ship are very different masses, the bump ship will bounce due to reflected energy.

Based on the work I showed above, an intermediate ship should get us 40% greater bump distance for the same bumper velocity.  The desired intermediate mass is 266Mkg, which is an unusual ship mass.  I wouldn't deign to mine in EVE, but those of you who do will immediately recognize this as being very close to the mass of the Orca, the ORE industrial capital ship.  Who knew that these ships had a purpose other than carebear activities! 


Figure 11-7: Here is a Newton's Cradle that you might find on a station undock in low-sec. By choosing an intermediate that has both optimal mass and a carebear demeanor, you can vastly improve your bump results. 

Even more beneficial, consider the case where you need to bump this same capital ship with a standard MWD cruiser, i.e. m1 =  15Mkg.  In this case, the optimal intermediate mass is close to m2 = 130Mkg, which can be closely synthesized with a BS hull but anything in the 100Mkg range will do a nice job of increasing the bump distance over 60%! 


Does it make you wonder whether early CCP engineers chose mass ratios in the game to achieve such benefits for clever players? 

I have taken data on these effects and I look forward to sharing it with the community.  I will wait to do so until December so that I can prepare all of these materials in one form.  Stay tuned -- there will be a couple important surprises. 


How does this work, you ask?


Consider for a moment energy exchange in the real world.  When an object with mass is moving, it has stored kinetic energy.  A very large mass doesn't need to move as fast to have the same energy as something that is small.  When we transfer mechanical motion to another object, it is temporarily stored in another form.  We can think of this intermediate state as the potential energy of a lossless spring.   

A thought experiment to aid in this: Imagine the moment when the bumping ship strikes the spring, storing all of it's energy, and coming to a stop.  The force applied by the spring on the bumper is the same as on the target ship.  The two ships, however, accelerate differently away from the event, according to Newton's law, 

$\large a_i = \frac{F_{spring}}{m_i}$ 


When we add an intermediate ship whose mass is in between the bumping ship's mass and the target's mass, we improve the ratio of energy that is transmitted forward to energy reflected.  Each intermediate mass of this type helps to match the mass of the energy source to the target.  

This principle is the same for many systems that transfer energy from one form to another, or transmit energy over a distance.  For example, an efficient loud speaker interfaces between the motion of a linear magnetic driver and acoustic waves in a large space with a tapered horn.  The horn of a loudspeaker accomplishes this by transitioning from the linear motion of the driver which moves a small amount of air a long distance, to a large amount of air a short distance.  This is the idea of impedance matching, and bumping in EVE also exploits this mechanism. 
 
Efficient electrical systems also need to match between the ratio of electric and magnetic fields to transfer energy from one place to another.  This is the principle behind impedance matching for antennas or cables.  From this perspective, you can imagine that having a continuum of matching states between the objects should enable you to transfer all of the bump energy to the target! 




Figure 11-8: Hypothetically, a large number of ships can be used in a taper configuration to transfer 100% of the bumper energy to the target.  I think GoonSwarm could try something like this. 

The theory for a large number of ships (or a continuum) can be generalized from what I have shared in this post.  I already tweeted a hint to the solution!  I will try to add this analysis to the data notes as an extension for enthusiastic readers.  

I hope that your bumping experiences are greatly improved by considering energy exchange in mechanical systems. 


Two final notes

Don't hesitate to use knowledge of game physics as part of your pilot admissions criteria for corporations and alliances.  Be sure to make applicants answer at least one trick questions about mechanics before admitting them.  This may not help you weed out spies but it certainly is fun.

Finally, getting good bump data in game is very tedious.  It takes a carefully configured setup to make reproducible results for ship bumping.  This is because any misalignment will result in a bump trajectory that requires angle measurement to correlate with theoretical 1-D predictions.  Furthermore, the large time-constants of the ships we are discussing in this post means accurate alignment can take a lot of time. Real combat situations on Tranquility are likely setup rather hastily, but I hope this post has shown you that you can always benefit from studying physics to improve your bumping performance.  



Interlude

This post is brought to you by Physics and liquid DnB.  Enjoy responsibly. 





"If what you have done yesterday still looks big to you, you haven't done much today."
- Mikhail Gorbachev 


 * - There are details in the analysis of real Newton's Cradles that I am ignoring here, including compressibility of the steel, proximity of the balls immediately prior to contact, and change in the contact area during the collision.  I am confident that these can be ignored without detracting from the intuition that studying this system can provide.  I could alternatively chosen to study billiard ball collisions for this model but this also has higher-order considerations like backspin which would also require this footnote.

 ** - Intuitively, you could imagine increasing the drag on the objects by submerging your Newton's Cradle in a tub of a viscous fluid but that could get messy... and how would you transfer energy to the first collision without drag?  So, it could get tricky but you get the idea.


Disclaimer
I want to reiterate that my work on energy and momentum conservation in EVE ship interactions fits the data that I have, however, I have not actually inspected any of the game code.  Former CCP developers have remarked on the accuracy of my work, but like everything else, readers should seek to develop their own understanding based on as much information as they can gather. Your mileage may vary, but it shouldn't.