Optimal Usage of Instantaneous Displacements in Games

Mãge··39 votes·12,854 views

Introduction

Mathematics is capable of describing much of our universe. It’s no surprise then that it also describes the games that we play. After all, League is a video game (electronic game). Electronic games follow the rules of logic, which are themselves embedded deep within the underlying circuitry of the tools with which we use to play these games. Because a countless number of these logic gates are responsible for the resulting “game” that we play, the game also necessarily follows the rules of logic, and by extension mathematics. However, the actual gameplay that results once the human factor is put into the equation is determined just as much by the factors that constrain it (the various complex systems of logic that arise from the game’s written code) as it is by the players that play it. That is, the seemingly restrictive schemata upon which the game rests are not necessarily binding phenomena – gameplay doesn’t just happen with the existence of those rules themselves alone. The rules of the game merely exist coincidentally alongside the player, forging an amicable symbiotic relationship. This fact is most visible when players discover a bug (an undesired form of gameplay that emerges from the game’s “rules”), as well as when they discover a “feature” (mechanics such as input buffering). Ultimately, the rules of a video game are themselves hidden behind a metaphorical fog of war composed of fancy animations and visual effects (surprisingly, these sensory tricks are precisely the primary source of revenue for a multi-million dollar game company) and entirely dependent upon the player to discover what about them makes “gameplay”.

Enough about how gameplay emerges as a total greater than the sum of its parts, though. The purpose of my post today is actually to discuss the importance of timing in the use of instantaneous displacements in video games (usually RPGs, action games, or any video game that coordinates movement of points along a Cartesian plane), which I shall refer to as “ID” from this point forward. The optimal time at which to use an ID can be discovered using mathematics, coincidentally. I shall demonstrate this with some hypothetical scenarios once I’ve properly introduced how this relates to League of Legends in particular.

Relationship of Instantaneous Displacements to Distance Management Mechanics (Kiting) in League

Summoner Flash is the most popular spell pick across all regions. It teleports your champion 400 units in the direction of your cursor. Ignoring any added effects and quirks of the spell, such as that which catapults you across a piece of terrain should you land past the midpoint of the line segment that lies on the line passing through your champion and the cursor and that connects the two points on the perimeter of the piece of terrain that also lie on the same line, Flash is largely a very predictable spell with a very predictable outcome. Upon activation, the ID translation distance is 400 in any direction, period. Now come the tricky questions related to the actual gameplay. If Flash is so singular and straightforward, why then does it seem to elude explanation when certain Flashes result in a hasty and successful escape, while other Flashes provoke extra aggression from the ganker, leading to a kill? Could this possibly be explained accurately within the realm of mathematics, or is it a phenomenon that arises solely from the added complexity of the human player within the context of the game?

Regardless of the answers to those questions, mathematics is still capable of providing us with a sound understanding of what goes on during such an encounter. Let us examine the following hypothetical scenario. We have an incoming ganker, A, who wants to score a kill on the laner, B. Ignoring the possibility that the ganker will be influenced by any psychological tricks or gameplay-dependent phenomena, let us assign to our ganker the task of moving toward the helpless laner in the most efficient manner possible. Upon reaching B, A will hit B with a form of hard crowd-control that will inevitably lead to B’s grisly demise. A will be used both to name the ganker as well as to indicate the ganker’s initial position, and likewise with B for the laner.

In Scenario I, the distance between A and B is equal to the distance between B and B’, which will be B’s point of safety. This can be a Thresh lantern, a Bard ultimate, or the turret – it doesn’t matter. A is moving at √2 times the speed of B (in actual gameplay this can be imagined approximately as a Master Yi with boots and his ultimate activated moving towards a Zyra support without boots). B reaches B’ in the same amount of time that A reaches B’, even though A is further away from B’ than B, because A is moving faster than B.

The question posed is therefore: when will an ID used by B create the most distance between A and B if A is moving at √2 times the speed of B and A is moving towards B’s destination at a 45-degree angle?

[]http://imgur.com/a/qSQ07 (The illustration above depicts our current scenario, which we shall aptly name “setup”).

Well, let us pick three arbitrary test points along the path B to B’. Both the time it takes for B to reach B’ and distance between B and B’ in these test cases will be 10 (10 increments of time to reach B’ and 1 unit of distance per 1 increment of time). We pick 10 because it is an easy number to work with. In reality, the result does not change so long as the statements we accept as true for our setup remain true (namely, that A and B are the same distance apart as B is with B’ and that A is moving towards B’ at √2 times B’s speed). For our ID, represented by the variable x, we choose a distance of 2 (again, this is also arbitrarily chosen and does not impact the results).

[]http://imgur.com/a/6g4gy (The diagrams above depict our three test cases).

Test point #1 shows a percent difference in distance between A and B after the ID is used of approximately 3 percent. Test pointed #2 shows a difference of approximately 7.6 percent. Finally, test point #3 shows a difference of a whopping 41.4 percent!

Evidently, as the distance between A and B decreases, the distance gained from B’s use of an ID increases. The distance gained increases exponentially as B approaches B’. The limit of the distance gained as B approaches B’ is equal to x, or the actual distance of the ID itself, while the percent distance gained increases to infinity.

Therefore, the optimal time for B to use an ID without A ever actually reaching B is when A is as close as fucking possible to B. Of course, this is under the assumption that A will not use an ID to reach B. In Scenario II, we can examine what happens when the premises of our setup in Scenario I remain, but A also gains the ability to use an ID during the chase.

[]http://imgur.com/a/m1FsQ A’s most efficient path towards B will still be to move in a 45-degree angle. The dotted lines in the diagram represent a potential ID used by A at any given point during the chase, up until the last bit of remaining distance between A and B is equal to the distance of the ID itself. This point is the critical point at which if A uses an ID, A will instantly close the gap to B and render B’s screen gray. B of course is unaware because B expects to use an ID at the last possible moment in time. A clearly has the advantage if A is also capable of using an ID.


Results From this thought experiment we can see that mathematics answers our questions posed clearly and concisely. The optimal strategy for B is to use an ID right as A approaches it. The optimal strategy for A if A also has an ID is to use it before the distance between A and B becomes less than the distance covered by the ID. It is also probably a good idea for A to hold the ID until the critical point is reached for obvious gameplay reasons – unlike the situations posed in this thought experiment, real gameplay is far from perfect and carries unexpected variables.


Discussion Of course, our thought experiments only depict a specific scenario in which both our premises are true. However, although not included within our limited number of tests above, the optimal strategy for B will almost always be to use an ID when A is chasing B directly (A is moving towards B on the same line B is moving towards the destination or point of safety). The thing B must keep in mind is the critical point – A’s potential surprise ID may well be worth the use of an ID from B preemptively if B determines it is the case that A will definitely score a kill if A closes the gap. Also left out are the numerous interactions that exist in League of Legends – Elise, for example, has a ranged stun that effectively renders her “location” in the scenarios we used above as all the possible points her stun can reach. Other types of ID and dashes accomplish similar feats, with dashes effectively functioning as IDs after they’re time adjusted (travel time of the dash is taken into account) in our scenarios. The actual game that we play is simply far too complex for any simple generalizations to be made consistently, but the generalization exists whenever the situation in an actual game presents itself opportunistically as similar to the situations we examined above. In those situations, the generalizations made by our thought experiments leveraging mathematics can be thought of to be true so long as the similarity between the game situation and the situations we accounted for with the mathematics is retained.


Notes Thanks for reading. Means a lot to me if you actually went and bore with me the entirety of the post. I’d love to know what you fellow Summoners think – leave a comment! In fact, the entire purpose of this post is to see what responses you guys have to using math to determine optimal stratagems in games. After all, games themselves obey the rules of logic and math, even if you don't actively do any calculations as the player. If I’ve made any mistakes in my work, be sure to point it out to me as well. The results of our study can be applied to all IDs that exist in any game that uses a Cartesian coordinate system, so it may be of interest as a piece of thought for any video game designer using such a system. And here’s the TL;DR for those of you too impatient (frowns in disapproval).

TL; DR,

  • IDs such as Flash create the most distance between you and a chaser when you use it in the direction a chaser is traveling to reach you or when the chaser is as close to you as possible when traveling at an angle towards your path of escape, as proven by mathematics (yay math!). In other words, don't Flash immediately when you see the jungler coming at you from the side - it's seriously making you lose.

Love, Cardi

(How creepy is it that the entirety of this post and all the comments posted already existed in the Library of Babel?)

31 Comments

Mira Arya Enthe42 votes
Mãge9 votes

(extra disapproving frown)

Mira Arya Enthe2 votes

[{quoted}](name=Leblanc Main,realm=NA,application-id=3ErqAdtq,discussion-id=hndAhNfE,comment-id=00010000,timestamp=2016-09-28T18:46:26.902+0000)

(extra disapproving frown)

I'm a gamer, I can't be doing none of that reading shit!

(I'm kidding, read what I could earlier, but gotta get my games in before work.)

UberAffe8 votes

Did you need to write a paper and decide to do it on league then post it, or did you just have a lot of time and felt like going way to in-depth?

Mãge6 votes

I like games. A lot. Just so happened I thought it'd be a good idea to explore some less explored aspects of games and the results were unexpected. I think I learned a lot about what NOT to do with Flash and blinks. I also post new champion concepts and champion rework concepts from time to time as well, so feel free to leave your thoughts on those as well if you ever happen to catch me!

And anyone who has time to play League of Legends could possibly find the time to explore unexplored territories instead, you know :P It doesn't have to be for a paper.

Meanie405 votes

Instructions unclear. Dick now 400 units away from body.

Diage3 votes

I greatly appreciate that you did this... but coming from someone who spent way too much time in school studying math, I can't help but feel you spent a large amount of time on things that didn't need it and didn't spend time on the things that really mattered. I can listen to the, 'assume this is true' stuff all day, but when push comes to shove it doesn't help to solve any practical problem when you assuming too many things to be true. By the time I was done reading your assumptions, I was about ready to just assume the conclusion and be done with it. You need to motivate to me WHY we can take your statements for truth, not just declare them to be true. Sure, it may appear obvious that your arbitrary decisions don't matter, but you don't do anything to motivate that or prove it. What happens when the angle changes? The speed changes? You didn't need to pick arbitrary values for those two things, you could have gained far more information if you left them variable. Then certainly, your answer would be dependent upon those values but you should still be able to get the approximate difference between then two.

There are other interesting things to consider too that get overlooked because you glossed over your assumptions too lightly. For example, what if the point in which A was approaching was dst(B,B'+2)? How far ahead of the target to safety (B') would A have to approach based on the angle and speed to make the flash irrelevant?

Also... Your flat distance tells more of the story than the percent distance. Being .38 units away tells me more than 7% in this particular instance.

Basically, I think it would have been much more enlightening and interesting if you didn't just pick arbitrary values everywhere and instead used variables. Your conclusion that you should flash at the very last possible second is obvious to most people, but answering the question, 'at what angle should I approach a gank to render a flash useless' would be a much more interesting way to utilize your work.

By the way, there is a reason that current day Math proofs can take up hundreds of pages.

Mãge1 votes

Thanks for the long response! Absolutely the best. The reason I decided to go with test values in the end and keep things simple with a right triangle to illustrate only very specific scenarios from which we can hopefully glean just a little bit of insight into the mathematics of games is because with all the potential variables in the actual scenarios I quickly realized that I would require multivariable calculus in order to explain any of the relationships between the variables at all. I have not yet studied multivariable calculus.

And besides, that's just unacceptable - not everyone can understand multivariable calculus. Calculus is that one subject most college students struggle with. Keeping things plain and simple lets us get a simple explanation out while leaving out the killer math. It's not really helpful to understand the relationship between distance gained between A and B and the time during which B uses an ID in terms of a derivative of several other variables, for example. It doesn't readily tell us anything about the game at all - just that there are these variables which form this such relationship that's not easily "common sensed".

I hope that properly explains why I chose to use arbitrary test values and test points and the most well recognized theorem to reach a broad conclusion.

Weasel Kensei2 votes

Labeling the ganker and their starting position both as A. Try again.

Either label their starting point X,Y,~,1,a, but not BOTH A!

...you should know better.

FYI, thats the point I stopped reading at cause I knew if that you were going to be labeling two different things with the same label then it just wasnt going to be worth my time.

Ganker A should be represented by either A for their starting point, and their path by an a like you do in trigonometry or physics. A for starting point/angle, and a for side/vector.

Aesilidh2 votes

Sure, it's an error, but it's not as massive a deal as you make it out to be. With context there isn't really any place where it's super confusing if you're actively reading.

Weasel Kensei1 votes

Well here is how I feel about it.

If its going to start being any degree of confusing in the first paragraph, it makes me not want to read the next 12 because I feel like it will only degraded from there. Its like they say, you only get one chance to make a first impression. My first impression was "Well if simple shit like labeling is wrong, harder shit must be really wrong... (stops reading, types post about how they failed to label coherently) Moving on."

So maybe its amazing; I wont know cause like I said I stopped reading right at that first error and scrolled down to see how long it was and decided NOPE.

Its not like I posted that dancing guy gif saying they didnt read it. That moronic shit should be deleted and the poster should have a 24 hour ban on any more post. Its substancless troll shit-posting and has no place in any thread, much less Gameplay. Really the only person who gives a fuck is the idiot that posted it and other idiots that like the shit idiots do. At least I gave the reason why I didnt read it so the OP could fix it or not do the same next time.

Aesilidh2 votes

This is a pretty interesting problem. You have the situation that it's the early game, you're a laner, and you are being ganked by an enemy jungler with a high probability of death from the side. I feel this is more of a physics analysis than a risk analysis, and a risk-based analysis is probably the more proper option in this situation. I do like how you simplified the problem down to actual values to produce non-hypothetical results, but I'm not sure how much those results are applicable to actual gameplay.

How you're analyzing it is you're trying to optimize the distance to a 'point of safety'. A successful outcome is reaching said point, and a failed outcome is having the distance between the jungler and the laner become zero before the laner reaches the point of safety. You kinda addressed this when you said that your analysis disregards gameplay mechanics. Firstly, you have the jungler walking straight toward the 'point of safety' from his/her position on the side, which is only true if you can assure yourself that the laner won't just walk the other way. It's not a massive problem, since most cases that would result in the minimization of the marginal loss function from just the jungler also result in the minimization of the hypothetical bivariate loss function considering the linearity of lanes.

Since it's early game, we can parametrize success and failure in terms of gold (lategame success and failure is more about probability of objectives, but most ganks happen early enough to parametrize in terms of gold). For the isolated case you are proposing, for a given laner and jungler you have the probability density risk function R(d) where d is the distance between them. We know that R(d) is decreasing, and is zero at some point. From R(d), we can create a loss function L(R(d)) whose expected value is -300(R(d)) + v, where v := the expected gold value of your flash.

You also claim that arbitrary picking of specific constants for values will not affect your results, but in fact it should -- consider this simple thought counterexample. If your ID can cover the entire distance between your current position and the hypothetical 'safe point', its value in the situation will increase by a large factor, as it can bring down your risk function down to nearly zero or zero. Similarly, if the jungler's speed is set to a high value, over a long distance your ID will have much less value in the specific situation. In addition, it's kinda bad form.

Mãge1 votes

Thanks for the response. I love it. I'll mention here that I have no clue what "marginal loss function" and "minimization of the hypothetical bivariate loss function" mean at all, and I'm not sure even 1% of the League player population would. That being said, I'm sure your functions could possibly be used to calculate risk v.s. reward of using or not using flash at any given point during a chase directly in gold value, but actionable feedback would be more desirable than just the bland insertion of such terms that you probably know the majority of us won't understand (ex. I make the claim in the TL;DR that you should not do X). In other words, do the math for us and tell us what we can do in a TL;DR like I did pls :^)

The values do not affect the results because of our premises - that A and B are the same distance apart as B is apart from B' and that A is moving at root 2 the speed of B towards B's projected future location. This means time can be arbitrarily chosen for our test points. I specifically chose to divide time into ten units to demonstrate a case where B is less than halfway to B', a case where B is precisely halfway to B', and a case where B is more than halfway to B'. I chose 2 for value of the ID because in any situation where optimal usage is concerned, the ID value will be less than the distance of B to B'. If the ID is really close to the distance of B to B', B still gains the most distance by using the ID when A is as close to B as possible. Perhaps you might make the case then that "optimal" may not be the best word of choice because it's too vague. Optimal in our discussion would be maximum distance gained from the use of an ID.

Oh, and Viktor "Function over Form".

Weasel Kensei1 votes

You remind me of a buddy in physics class. Hes in cal3 and way overthinking the problems in class. He gets them right, but he spends a lot more time working them than I do.

A little physics and statistics would help some league players, though critical thinking is a requisite also. Even though I criticized you for your choice of labeling two different things A, I still want to say its good that we have people providing this kind of resource for those so inclined to read it, and added it to my "guides archives" because while I disagree with that labeling issue, this has some value to the community.

Like I wrote above, I essentially use the:

R=(L+A)((O-d)/O)+f Risk = (Your kill value + your assist value) times ((Optimal range of opponent - distance from opponent) divided by Optimal range of opponent) plus (minion wave spawns) ~~ or substitute +f value of CS lost while dead.

Calculation for flash when using it as part of an escape vector.

Because I play a lot of support, I dont miss much/any farm often, sometimes I dont flash because the Risk/reward value is so low. Often best to save it for a situation where I could extend utility in a teamfight, or initiate life saving disruption.

This brings up the flash value on attack maneuver flashes, and is often harder to calculate imo.

Any thoughts on that formula? Additions, other variables?

Aesilidh1 votes

What I'm describing is using the probability distribution of the risk of death based on the distance between the laner and the jungler to create an expected value of the gold gained or lost by flashing or not flashing.

What I was saying was that due to other gameplay parameters, what is optimal in our closed environment may be far from optimal in game, like you had mentioned.

Weasel Kensei1 votes

Youre off by a bit I think on the LRd. I didnt read the OPs entire post, but just looking at your 2nd to last paragraph:

_L(R(d)) whose expected value is -300(R(d)) + v, where v := the expected gold value of your flash. _

Its more like youre solving for R because R is the risk, and your banking flash value vs the Risk your facing. You would also have to factor the assist gold value (A), and also consider that as the (d) approaches 0, some laners and junglers are a threat at greater distance meaning it would be more like R= (L+A)((O-d/O) where O is optimal range, and d is distance, This gives a % value of the enemy threat and allows a proportional value of the flash (think Annie combo range, the closer she is to you the more time she has to get the kill, so Annie at max combo rang vs on top of you have differnt threat values). Note, its possible with this to have negitive values, meaning that if you flashed away from an opponent outside of optimal range or at values of -d meaning they were too far away to be a threat, then the flash value was less than zero.

Normaly a gank is a 2v1 situation, but we can average the value of O-d/O by calculating it for each ganker, adding the values, then dividing by the number of gankers. In the case of 3+v1 ganks, dont forget to calculate the A (assist) value differently, assist have minimum of 50 gold value.

The additional variables could increase the value of the flash. Deneying the 300 gold for the kill is good, but deneying 300+150 kill/assist gold is better. The value of a flash increases as well with spawn timer, and farm loss so CS waves while dead or (C) where the time spent dead reduces cs and so we have to factor in (C), or simply substitute +f for lost farm.

In a given situation an Udyr ganking for their Annie comes into lane, as Udyr approtches, Annie flashes up bringing her up to optimal range. If you will be dead for 30 seconds, you will lose... call it 12 CS your formula would be like:

R=(L+A)((O-d)/O)+f Risk = (Your kill value + your assist value) times ((Optimal range of opponent - distance from opponent) divided by Optimal range of opponent) plus (minion wave spawns) ~~ or substitute +f value of CS lost while dead.

R= ? L= 300 A= 150 O= 5 Teemos (Teemo is an arbitrary example distance, could be range units in its place) d= 2 Teemos C= 2 minion waves (aprox 300 gold =f value)

R= (300 gold +150 gold)((5 Teemos - 2 teemos)/(5 Teemos) + 300 gold in farm R= (450 gold)(0.6) +300 gold in farm R= 270 gold + 300 farm R= 570 gold value for that flash.

Another way the flash value can be negitive is if you flash under the enemy turret, and die, meaning that the you are da noobz. I see people do that a lot...

Anyway, maybe I missed something, what do you think?

Aesilidh2 votes

Its more like youre solving for R because R is the risk, and your banking flash value vs the Risk your facing. That's what I'm describing when I talk about a positive value for the expected value of the loss function -- I'm talking about a function based on a probability distribution, based on factors like you outlined in your post, of the expected gold gain/loss from flashing. You're right when you say I need to include more gold-associated variables with the function I described in my post, like gold for assists.

Lucky Moniker2 votes

I enjoy the deep mathematical theory crafting, and unlike some hyper critical persons on here who insist on showing that they themselves could have done it but didn't, I appreciate the write up.

Obviously you can't just read the numbers and win like some people want, but just breaking this down does impact a split second descicion where delaying a flash as long as possible has the greatest impact, for both safety and causing an opponent to over-extend.

These write ups are helpful but you gotta apply critical thinking and common sense to make use of them.

TL;DR Ty bro

Only Play Darius2 votes

Sorry, but I can't read this right now. Maybe another time.....

Cipse1 votes

His IGN is "Leblanc Main"

DealDelayNomore1 votes

[{quoted}](name=Leblanc Main,realm=NA,application-id=3ErqAdtq,discussion-id=hndAhNfE,comment-id=,timestamp=2016-09-28T16:07:20.531+0000)

Introduction

Mathematics is capable of describing much of our universe. It’s no surprise then that it also describes the games that we play. After all, League is a video game (electronic game). Electronic games follow the rules of logic, which are themselves embedded deep within the underlying circuitry of the tools with which we use to play these games. Because a countless number of these logic gates are responsible for the resulting “game” that we play, the game also necessarily follows the rules of logic, and by extension mathematics. However, the actual gameplay that results once the human factor is put into the equation is determined just as much by the factors that constrain it (the various complex systems of logic that arise from the game’s written code) as it is by the players that play it. That is, the seemingly restrictive schemata upon which the game rests are not necessarily binding phenomena – gameplay doesn’t just happen with the existence of those rules themselves alone. The rules of the game merely exist coincidentally alongside the player, forging an amicable symbiotic relationship. This fact is most visible when players discover a bug (an undesired form of gameplay that emerges from the game’s “rules”), as well as when they discover a “feature” (mechanics such as input buffering). Ultimately, the rules of a video game are themselves hidden behind a metaphorical fog of war composed of fancy animations and visual effects (surprisingly, these sensory tricks are precisely the primary source of revenue for a multi-million dollar game company) and entirely dependent upon the player to discover what about them makes “gameplay”.

Enough about how gameplay emerges as a total greater than the sum of its parts, though. The purpose of my post today is actually to discuss the importance of timing in the use of instantaneous displacements in video games (usually RPGs, action games, or any video game that coordinates movement of points along a Cartesian plane), which I shall refer to as “ID” from this point forward. The optimal time at which to use an ID can be discovered using mathematics, coincidentally. I shall demonstrate this with some hypothetical scenarios once I’ve properly introduced how this relates to League of Legends in particular.


Relationship of Instantaneous Displacements to Distance Management Mechanics (Kiting) in League

Summoner Flash is the most popular spell pick across all regions. It teleports your champion 400 units in the direction of your cursor. Ignoring any added effects and quirks of the spell, such as that which catapults you across a piece of terrain should you land past the midpoint of the line segment that lies on the line passing through your champion and the cursor and that connects the two points on the perimeter of the piece of terrain that also lie on the same line, Flash is largely a very predictable spell with a very predictable outcome. Upon activation, the ID translation distance is 400 in any direction, period. Now come the tricky questions related to the actual gameplay. If Flash is so singular and straightforward, why then does it seem to elude explanation when certain Flashes result in a hasty and successful escape, while other Flashes provoke extra aggression from the ganker, leading to a kill? Could this possibly be explained accurately within the realm of mathematics, or is it a phenomenon that arises solely from the added complexity of the human player within the context of the game?

Regardless of the answers to those questions, mathematics is still capable of providing us with a sound understanding of what goes on during such an encounter. Let us examine the following hypothetical scenario. We have an incoming ganker, A, who wants to score a kill on the laner, B. Ignoring the possibility that the ganker will be influenced by any psychological tricks or gameplay-dependent phenomena, let us assign to our ganker the task of moving toward the helpless laner in the most efficient manner possible. Upon reaching B, A will hit B with a form of hard crowd-control that will inevitably lead to B’s grisly demise. A will be used both to name the ganker as well as to indicate the ganker’s initial position, and likewise with B for the laner.

In Scenario I, the distance between A and B is equal to the distance between B and B’, which will be B’s point of safety. This can be a Thresh lantern, a Bard ultimate, or the turret – it doesn’t matter. A is moving at √2 times the speed of B (in actual gameplay this can be imagined approximately as a Master Yi with boots and his ultimate activated moving towards a Zyra support without boots). B reaches B’ in the same amount of time that A reaches B’, even though A is further away from B’ than B, because A is moving faster than B.

The question posed is therefore: when will an ID used by B create the most distance between A and B if A is moving at √2 times the speed of B and A is moving towards B’s destination at a 45-degree angle?

[]http://imgur.com/a/qSQ07 (The illustration above depicts our current scenario, which we shall aptly name “setup”).

Well, let us pick three arbitrary test points along the path B to B’. Both the time it takes for B to reach B’ and distance between B and B’ in these test cases will be 10 (10 increments of time to reach B’ and 1 unit of distance per 1 increment of time). We pick 10 because it is an easy number to work with. In reality, the result does not change so long as the statements we accept as true for our setup remain true (namely, that A and B are the same distance apart as B is with B’ and that A is moving towards B’ at √2 times B’s speed). For our ID, represented by the variable x, we choose a distance of 2 (again, this is also arbitrarily chosen and does not impact the results).

[]http://imgur.com/a/6g4gy (The diagrams above depict our three test cases).

Test point #1 shows a percent difference in distance between A and B after the ID is used of approximately 3 percent. Test pointed #2 shows a difference of approximately 7.6 percent. Finally, test point #3 shows a difference of a whopping 41.4 percent!

Evidently, as the distance between A and B decreases, the distance gained from B’s use of an ID increases. The distance gained increases exponentially as B approaches B’. The limit of the distance gained as B approaches B’ is equal to x, or the actual distance of the ID itself, while the percent distance gained increases to infinity.

Therefore, the optimal time for B to use an ID without A ever actually reaching B is when A is as close as fucking possible to B. Of course, this is under the assumption that A will not use an ID to reach B. In Scenario II, we can examine what happens when the premises of our setup in Scenario I remain, but A also gains the ability to use an ID during the chase.

[]http://imgur.com/a/m1FsQ A’s most efficient path towards B will still be to move in a 45-degree angle. The dotted lines in the diagram represent a potential ID used by A at any given point during the chase, up until the last bit of remaining distance between A and B is equal to the distance of the ID itself. This point is the critical point at which if A uses an ID, A will instantly close the gap to B and render B’s screen gray. B of course is unaware because B expects to use an ID at the last possible moment in time. A clearly has the advantage if A is also capable of using an ID.


Results From this thought experiment we can see that mathematics answers our questions posed clearly and concisely. The optimal strategy for B is to use an ID right as A approaches it. The optimal strategy for A if A also has an ID is to use it before the distance between A and B becomes less than the distance covered by the ID. It is also probably a good idea for A to hold the ID until the critical point is reached for obvious gameplay reasons – unlike the situations posed in this thought experiment, real gameplay is far from perfect and carries unexpected variables.


Discussion Of course, our thought experiments only depict a specific scenario in which both our premises are true. However, although not included within our limited number of tests above, the optimal strategy for B will almost always be to use an ID when A is chasing B directly (A is moving towards B on the same line B is moving towards the destination or point of safety). The thing B must keep in mind is the critical point – A’s potential surprise ID may well be worth the use of an ID from B preemptively if B determines it is the case that A will definitely score a kill if A closes the gap. Also left out are the numerous interactions that exist in League of Legends – Elise, for example, has a ranged stun that effectively renders her “location” in the scenarios we used above as all the possible points her stun can reach. Other types of ID and dashes accomplish similar feats, with dashes effectively functioning as IDs after they’re time adjusted (travel time of the dash is taken into account) in our scenarios. The actual game that we play is simply far too complex for any simple generalizations to be made consistently, but the generalization exists whenever the situation in an actual game presents itself opportunistically as similar to the situations we examined above. In those situations, the generalizations made by our thought experiments leveraging mathematics can be thought of to be true so long as the similarity between the

DealDelayNomore1 votes

[{quoted}](name=Leblanc Main,realm=NA,application-id=3ErqAdtq,discussion-id=hndAhNfE,comment-id=,timestamp=2016-09-28T16:07:20.531+0000)

Introduction

Mathematics is capable of describing much of our universe. It’s no surprise then that it also describes the games that we play. After all, League is a video game (electronic game). Electronic games follow the rules of logic, which are themselves embedded deep within the underlying circuitry of the tools with which we use to play these games. Because a countless number of these logic gates are responsible for the resulting “game” that we play, the game also necessarily follows the rules of logic, and by extension mathematics. However, the actual gameplay that results once the human factor is put into the equation is determined just as much by the factors that constrain it (the various complex systems of logic that arise from the game’s written code) as it is by the players that play it. That is, the seemingly restrictive schemata upon which the game rests are not necessarily binding phenomena – gameplay doesn’t just happen with the existence of those rules themselves alone. The rules of the game merely exist coincidentally alongside the player, forging an amicable symbiotic relationship. This fact is most visible when players discover a bug (an undesired form of gameplay that emerges from the game’s “rules”), as well as when they discover a “feature” (mechanics such as input buffering). Ultimately, the rules of a video game are themselves hidden behind a metaphorical fog of war composed of fancy animations and visual effects (surprisingly, these sensory tricks are precisely the primary source of revenue for a multi-million dollar game company) and entirely dependent upon the player to discover what about them makes “gameplay”.

Enough about how gameplay emerges as a total greater than the sum of its parts, though. The purpose of my post today is actually to discuss the importance of timing in the use of instantaneous displacements in video games (usually RPGs, action games, or any video game that coordinates movement of points along a Cartesian plane), which I shall refer to as “ID” from this point forward. The optimal time at which to use an ID can be discovered using mathematics, coincidentally. I shall demonstrate this with some hypothetical scenarios once I’ve properly introduced how this relates to League of Legends in particular.


Relationship of Instantaneous Displacements to Distance Management Mechanics (Kiting) in League

Summoner Flash is the most popular spell pick across all regions. It teleports your champion 400 units in the direction of your cursor. Ignoring any added effects and quirks of the spell, such as that which catapults you across a piece of terrain should you land past the midpoint of the line segment that lies on the line passing through your champion and the cursor and that connects the two points on the perimeter of the piece of terrain that also lie on the same line, Flash is largely a very predictable spell with a very predictable outcome. Upon activation, the ID translation distance is 400 in any direction, period. Now come the tricky questions related to the actual gameplay. If Flash is so singular and straightforward, why then does it seem to elude explanation when certain Flashes result in a hasty and successful escape, while other Flashes provoke extra aggression from the ganker, leading to a kill? Could this possibly be explained accurately within the realm of mathematics, or is it a phenomenon that arises solely from the added complexity of the human player within the context of the game?

Regardless of the answers to those questions, mathematics is still capable of providing us with a sound understanding of what goes on during such an encounter. Let us examine the following hypothetical scenario. We have an incoming ganker, A, who wants to score a kill on the laner, B. Ignoring the possibility that the ganker will be influenced by any psychological tricks or gameplay-dependent phenomena, let us assign to our ganker the task of moving toward the helpless laner in the most efficient manner possible. Upon reaching B, A will hit B with a form of hard crowd-control that will inevitably lead to B’s grisly demise. A will be used both to name the ganker as well as to indicate the ganker’s initial position, and likewise with B for the laner.

In Scenario I, the distance between A and B is equal to the distance between B and B’, which will be B’s point of safety. This can be a Thresh lantern, a Bard ultimate, or the turret – it doesn’t matter. A is moving at √2 times the speed of B (in actual gameplay this can be imagined approximately as a Master Yi with boots and his ultimate activated moving towards a Zyra support without boots). B reaches B’ in the same amount of time that A reaches B’, even though A is further away from B’ than B, because A is moving faster than B.

The question posed is therefore: when will an ID used by B create the most distance between A and B if A is moving at √2 times the speed of B and A is moving towards B’s destination at a 45-degree angle?

[]http://imgur.com/a/qSQ07 (The illustration above depicts our current scenario, which we shall aptly name “setup”).

Well, let us pick three arbitrary test points along the path B to B’. Both the time it takes for B to reach B’ and distance between B and B’ in these test cases will be 10 (10 increments of time to reach B’ and 1 unit of distance per 1 increment of time). We pick 10 because it is an easy number to work with. In reality, the result does not change so long as the statements we accept as true for our setup remain true (namely, that A and B are the same distance apart as B is with B’ and that A is moving towards B’ at √2 times B’s speed). For our ID, represented by the variable x, we choose a distance of 2 (again, this is also arbitrarily chosen and does not impact the results).

[]http://imgur.com/a/6g4gy (The diagrams above depict our three test cases).

Test point #1 shows a percent difference in distance between A and B after the ID is used of approximately 3 percent. Test pointed #2 shows a difference of approximately 7.6 percent. Finally, test point #3 shows a difference of a whopping 41.4 percent!

Evidently, as the distance between A and B decreases, the distance gained from B’s use of an ID increases. The distance gained increases exponentially as B approaches B’. The limit of the distance gained as B approaches B’ is equal to x, or the actual distance of the ID itself, while the percent distance gained increases to infinity.

Therefore, the optimal time for B to use an ID without A ever actually reaching B is when A is as close as fucking possible to B. Of course, this is under the assumption that A will not use an ID to reach B. In Scenario II, we can examine what happens when the premises of our setup in Scenario I remain, but A also gains the ability to use an ID during the chase.

[]http://imgur.com/a/m1FsQ A’s most efficient path towards B will still be to move in a 45-degree angle. The dotted lines in the diagram represent a potential ID used by A at any given point during the chase, up until the last bit of remaining distance between A and B is equal to the distance of the ID itself. This point is the critical point at which if A uses an ID, A will instantly close the gap to B and render B’s screen gray. B of course is unaware because B expects to use an ID at the last possible moment in time. A clearly has the advantage if A is also capable of using an ID.


Results From this thought experiment we can see that mathematics answers our questions posed clearly and concisely. The optimal strategy for B is to use an ID right as A approaches it. The optimal strategy for A if A also has an ID is to use it before the distance between A and B becomes less than the distance covered by the ID. It is also probably a good idea for A to hold the ID until the critical point is reached for obvious gameplay reasons – unlike the situations posed in this thought experiment, real gameplay is far from perfect and carries unexpected variables.


Discussion Of course, our thought experiments only depict a specific scenario in which both our premises are true. However, although not included within our limited number of tests above, the optimal strategy for B will almost always be to use an ID when A is chasing B directly (A is moving towards B on the same line B is moving towards the destination or point of safety). The thing B must keep in mind is the critical point – A’s potential surprise ID may well be worth the use of an ID from B preemptively if B determines it is the case that A will definitely score a kill if A closes the gap. Also left out are the numerous interactions that exist in League of Legends – Elise, for example, has a ranged stun that effectively renders her “location” in the scenarios we used above as all the possible points her stun can reach. Other types of ID and dashes accomplish similar feats, with dashes effectively functioning as IDs after they’re time adjusted (travel time of the dash is taken into account) in our scenarios. The actual game that we play is simply far too complex for any simple generalizations to be made consistently, but the generalization exists whenever the situation in an actual game presents itself opportunistically as similar to the situations we examined above. In those situations, the generalizations made by our thought experiments leveraging mathematics can be thought of to be true so long as the similarity between the

bony whimsark1 votes

w h a t i s t h i s

Robrono1 votes

This reads more like a college essay, not a forum post. Good job.

EchoZeero1 votes

Nice thesis. I hope you get your degree. Nurd.

Sir Fuzzi1 votes

There are a lot of situations and a lot of potential reactions. This kind of explanation is awesome and novel, but then they might just save their mobo for that too.

For instance, you might want that early flash to put distance between you and someone with a dash or a mobility boost down. There are also instances in which they've got a skillshot or an ally coming for you. Lastly, it might just be where you need to be that early on to get you out of 'vulnerable' range.

The best reply isn't to justify with math or counter-arguments, but to know what you're assessing and when. For me, I just usually like to pray because jg Shaco is going to appear behind me from invis whether I like it or not-- flash up, or flash down, and that's most of why I die to him. Udyr, too, but I have difficulties with things that are moving in a straight line at me apparently, when it comes to the enemy jungle.

Also-- Library of Babel?

Spyglass1 votes

This seems ... self-apparent to me, but it's nice to show the visuals behind the geometry.

Also, it seems like this would be the default reaction to flash as late as possible in any case, as the player wants to save the ID resource if possible instead of just expending it, and waste as much of the Ganker's time as they can in the process. Additionally, the instant they use their ID, they become more predictable. In a game full of skill-shots that increase a player's threat range based on said predictability, the value of displacement in any form skyrockets.

In short: People are seriously blowing their flash as soon as they see the jungler coming at them?

MathMage1 votes

Percent distance gained is somewhat misleading because most of that percentage increase comes from operating on a smaller base. Absolute distance gained is more closely related to what we want to measure, but it's not exactly what we want to measure, which is: which flash maximizes the distance of the total path player A takes to reach player B?

But we can simply apply that measurement to the same example you proposed and arrive at the same answer: holding flash as long as possible is better. Triangle inequality proves it.

Cerebral Absence1 votes

Wow. Is this a Board Post or a master thesis? ^^ Did only understand 50%, but pretty cool!

It Hertz When IP1 votes

Why is it that I imagine the Korean boards are filled with this kind of post?

More from Gameplay

More by Mãge