Attack chains, math, and stuff


Arcanaville

 

Posted

I'm posting this in the scrapper forum because it seems like scrappers are most likely to be interested in this sort of thing.

Does anyone know if there is a way to prove that a given attack chain is 'optimal' (i.e. maximizes sustained single-target DPS) for a given amount of +recharge? I mean, it should be fairly easy to show that one is better than another, but it would be cool if a given chain could be actually be proved 'the best'.

Also, are there any algorithms for building near-optimal attack chains? My first guess at one (use the highest DPA attack available) turns out to work horribly: sometimes adding +recharge makes the algorithm switch to a different chain with a lower DPS-sustained.

I don't have much experience with higher math (by 'higher' I mean 'higher than calculus'), but I'd be willing to help design some methods like these, if they don't exist already.

Any thoughts?


 

Posted

The optimal chain will unfortunately vary from build to build.

You want the highest DPA attacks you can put together without gaps. I used a recursive algorithm sorted by dpa. However, it takes too much CPU time to go more than 2 or 3 levels deep as brute force isn't pretty. It also gets really complicated to build in all the variables, so I didn't. So proof, no, help point you in the right direction, sure. The best method is probably just use a piece of paper and/or a spreadsheet.

Example: With enough recharge the best chain for Katana uses just three powers (GC, SD, GD). But we already knew that. It also tells us that recharge has to be pretty high for that one.


 

Posted

First thing I do is check out the DPA of all the set's powers unenhanced. Then pick 3-4 of those powers and start fidling with putting them in different orders to find the best one. Next, i calculate what each power needs in seconds to recharge (usually add together activation times (keep in mind Arcanatime), then divide the base recharge by the needed recharge to get %recharge needed. (the powers themselves can get around 100% recharge mind you).

DPS = Amount of damage done in the chain / seconds needed to execute the chain.



Your character does not have capped defense. Depending on your AT the cap is between 175% - 225%. Your defense is not teal in the combat window, it can go higher. STOP SAYING IT IS CAPPED! The correct term is Soft Cap.
I enjoy playing in Mids. I specialize in Melee Characters, other AT's usually bore me.

 

Posted

Quote:
Originally Posted by Linea_Alba View Post
The optimal chain will unfortunately vary from build to build.
I was planning to take the build as a given and come up with methods for find optimal or near-optimal attack chains for the given build.

Quote:
Originally Posted by Linea_Alba View Post
I used a recursive algorithm sorted by dpa. However, it takes too much CPU time to go more than 2 or 3 levels deep as brute force isn't pretty.
Ok, I know what recursive means (from number theory), so I have an idea of what you're doing, but I don't know enough about programming theory to actually construct the algorithm based on this information. Any chance you could explain it in more detail? I do pick things up fairly easily.

Quote:
Originally Posted by _Pine_ View Post
First thing I do is check out the DPA of all the set's powers unenhanced. Then pick 3-4 of those powers and start fidling with putting them in different orders to find the best one. Next, i calculate what each power needs in seconds to recharge (usually add together activation times (keep in mind Arcanatime), then divide the base recharge by the needed recharge to get %recharge needed. (the powers themselves can get around 100% recharge mind you).
I did something like this, except I used a bottom-up approach (taking the recharge as given). I did forget Arcanatime, though.


I'm not really trying to optimize any particular character (which I can do using methods like what Pine suggested) as I am just interested in the problem. It would be awesome if we could come up with a generalized method for constructing attack chains as a tool for players. They wouldn't have to be provably optimal; instead we could just try for other criteria for 'near-optimality' or even just 'good'. (i.e. does not yield a lower DPS if the build improves lol)

When I say 'we' I mean 'me, and anyone who's interested in helping'. I don't have that much background in math or programming, but I do pick math-related things up fairly quickly, but I said that already.


 

Posted

First, figure out your highest DPA power. Next, look at the recharge time on it. After that, figure out how much damage from other attacks you can squeeze into that recharge time, without going too far past it. I think you would have to calculate DPS values for both chains to determine if a pause was better than activating a power while your first attack recharges during the animation.

It seems pretty simple to write a program for. Maybe Mids' should have that as their next built-in feature. If I knew anything about .Net programming, I would volunteer to help write it.


 

Posted

Seems like it would be a fun challenge to try to create a program to accomplish this task. Since I first saw this thread, I've already thought of a number of different methods. For my first one, I tried to improve on the "highest DPA attack available" method you mentioned, by also factoring in what the DPS would be of all if you were willing to have gaps (I was allowing for a situation where you might not have a perfect chain).

To test it out, I created a few fake powers real quick (since I was lazy, only 3), they were (Dam/Anim/Rech): 5/1/3, 42/0.5/2.4, & 50/0.1/8 (internally it uses ArcanaTime instead of the provided animation time). The chain that it computed ended up with a DPS of 38.27 (stopping after it went for at least 60 seconds), and based on the output it about half the time picked a power that was already recharged.

Two major problems with this I realized would be that it'd at least be theoretically possible that it'd opt to wait for a power, when another would have been capable of running in that gap time (although I'm not sure of any powers that'd realistically occur with), and the other side is, like yours, it doesn't actually do any planning beyond one move.


At this point, I think the only real method would be an exhaustive brute force search. There's probably a few tricks to eliminate a few possible combinations to speed up the search, but likely we'll have to search most of the possible combinations. Say, every possible combination of attacks, up to X number deep. The different paths through the tree would be evaluated based on the total damage, divided by the number of seconds it'd take to cast it all the powers (plus any time before it could be run again), resulting in the DPS for a complete chain.

At that point, the chains could just be sorted by their DPS, which'd give us the 'optimal' chain (or chains, if it's short enough that it'd be repeated multiple times in the constraints laid out... although a bit of code could be added to prune those from the results).

A bit later, I'll probably take a crack at implementing something like this, should be fairly fun to do.


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!

 

Posted

Actually I thought of something like that as well. I think I even implemented it, but I was using an excel spreadsheet, and I had to make a lot of fiddly changes to get it to work, so I didn't really trust my results.


 

Posted

Here are the strategies to beat then. (I'm going to quit calling them algorithms, because it makes me sound like a programmer, which I'm not.)

Naive Best Available DPA (NBAD haha)

1. Calculate the DPA of each power. If a power is still recharging, list it as having 0 DPA.
2. Execute the power with the highest DPA. If no powers are recharged, then wait until one recharges.
3. Repeat 1-2.


Best DPA Available (BAD)

1. Calculate the DPA of each power. If a power will finish recharging in t seconds, then list the DPA as D/(A+t). D is the damage the power does, and A is the activation time (taking Arcanatime into account).
2. Execute the power with the highest DPA. If that power is still recharging, then first wait until it is ready.
3. Repeat 1-2.

It should be fairly easy to construct a case where NBAD produces a lower DPS attack chain when extra enhancements are added. I don't know if BAD does this or not.


 

Posted

This discussion reminds me somewhat of the research I did into Dwarf Fortress unit pathing algorithms to EFFICIENTLY find the shortest distance between two points. It is amazing what happens when you have a simple algorithm, then hand it to 200 sprites who are trying to run it all at the same time while updating their paths in real-time to account for their friends getting in their way. Distance between two points, easy as pie, which changed efficiency into the goal.

I'm not sure how relevant it is but I can dig up wikipedia and forum discussion links from that topic if you'd like.


 

Posted

Quote:
Originally Posted by Rayonn View Post
I'm posting this in the scrapper forum because it seems like scrappers are most likely to be interested in this sort of thing.

Does anyone know if there is a way to prove that a given attack chain is 'optimal' (i.e. maximizes sustained single-target DPS) for a given amount of +recharge? I mean, it should be fairly easy to show that one is better than another, but it would be cool if a given chain could be actually be proved 'the best'.

Also, are there any algorithms for building near-optimal attack chains? My first guess at one (use the highest DPA attack available) turns out to work horribly: sometimes adding +recharge makes the algorithm switch to a different chain with a lower DPS-sustained.

I don't have much experience with higher math (by 'higher' I mean 'higher than calculus'), but I'd be willing to help design some methods like these, if they don't exist already.

Any thoughts?
There is no way I'm aware of to prove an attack chain is optimal without resorting to exhaustive search. However, there is a quick way to determine what the upper bound is on an attack chain: in other words, you can calculate the limit for how high the DPS of all possible chains could possibly be. That doesn't mean the optimal chain will reach it: its possible no chain reaches it. But you could have an estimate for how close you could be to the optimal chain, because if you're really close to the upper bound, the best possible chain can be no farther away than that.

Its actually a variation of my PeakDR methodology, for those who remember what that was. The basic principle is this:

1. Take all of the attacks, and sort them in descending DPA order, factoring in Arcanatime.

2. For each attack, list its damage, cast time, arcanatime, and recharge time (with the level of recharge factored in).

3. For each attack, calculate the ratio of arcanatime to cycle time. For our purposes, cycle time will be defined as cast time plus recharge time. There are complications, but that is close enough for now. This value is what I call E, the efficiency of the power. Its the percentage of total time you'd spend firing this attack if you fired it as fast as possible.

4. Starting at the top of the list and working downward, sum up E. Note at what point you exceed 1.0.

5. Find the maximum summation of E that *does not* exceed 1.0. Calculate the Gap between 1.0 and that value; i.e. 1 - Sum(E).

6. Calculate for all attacks the product E * DPA.

7. Sum up this product for all attacks from the top to the attack found in step 5.

8. For the attack found in step 4, which is the attack immediately below the attack found in step 5, calculate E * DPA * Gap.

9. Add step 8 to step 7.

That is the absolute ceiling for DPS for those attacks. No attack chain can exceed that value, and the optimal one will generally come close to it. What's going on is this: the assumption is that the optimal chain will attempt to pack the highest DPA attacks into the time you have available, packing as many of the highest DPA attacks as possible, then filling in the gaps with the next highest, and so on. This cannot always be done efficiently, so optimal chains often fail to reach the calculated estimate.

Steps one through four find the best DPA attacks and how much time they take up when used as a percentage of their cycle time. Step five figures out what the DPS would be if you somehow managed to use your best attack as often as possible, your second best attack as often as possible, your third best attack as often as possible, without any conflicts. This is theoretically possible until you are spending more than 100% of your time attacking, which is obviously impossible. Steps five through eight attempt to prorate the last attack to fill in the fractional amount of time remaining.


This only works when there are no dependencies between the powers, such as dual blades combos, follow up, or Eagle's claw crit boosts. Those kinds of effects add significant complexity to this type of analysis.


My near-optimal algorithm is basically this: always use the highest DPA attack that is recharged. Its a simple rule that generates reasonably good results, and it has the advantage of being an easy rule to follow even when circumstances change. If you memorize an optimal chain, that optimal chain may cease to be optimal if you are subject to recharge debuffs - or buffs. But the "always use the best DPA attack" is something that you can easily figure out ahead of time by figuring out the DPA of your attacks and memorizing that, or just ordering your attacks in descending order in your tray, and that rule is invariant to recharge strength changes.


[Guide to Defense] [Scrapper Secondaries Comparison] [Archetype Popularity Analysis]

In one little corner of the universe, there's nothing more irritating than a misfile...
(Please support the best webcomic about a cosmic universal realignment by impaired angelic interference resulting in identity crisis angst. Or I release the pigmy water thieves.)

 

Posted

One exception I know to that rule is Broad Sword. In a certain range of recharge, the best chain seems to be this:

Head Splitter -> Hack -> Disembowel -> pause -> Hack

In a certain range of recharge, it is better to simply live with the pause than to stick in another, lower DPA attack. But as you said, "near-optimal", which I'll agree with. I also don't know of any other Scrapper exceptions, though it seems likely there are some out there at some level of recharge for some primaries. But they're probably few, and following the simple rule is probably still close to optimal.


"That's because Werner can't do maths." - BunnyAnomaly
"Four hours in, and I was no longer making mistakes, no longer detoggling. I was a machine." - Werner
Videos of Other Stupid Scrapper Tricks

 

Posted

Speaking from programming experience (mind it has been many years, and I've not kept up with any of it so my value in actually designing it is zero), a program could be designed to take a set of variable inputs and designate the most likely combination based on a given timer. The way I'm seeing it, have the code request "Input Variables," which would be based on a set of identifiers.

  • Attack Name:
  • Recharge:
  • Arcanatime:
  • DPA:

Ask for the attack name to identify it in a memory dump with the associated items. Programmed they would each have a primary identifier and a sub identifier (like A1, A1.R, A1.A, A1.DPA). After each Attack que, it will ask "Additional Attacks? Y/N", type Y, enter; it will prompt the next attack and be dumped into memory as identifier A2 (etc). Do this for all attacks in the Primary (Or secondary, depending on the AT) that you want accounted for in the calculations.

Once all attacks have been entered, it will prompt "Begin Timer?" This will initiate a timer with ...say, 30 second timer (this seems enough to run most possibilities), and a secondary clause. The program would be coded to begin a string that asks "Highest DPA divided by Arcanatime with Recharge Modifier 0. Begin Recharge" This would trigger the highest damaging attack and pit it's recharge into a separate timer that, while active, will give the attack a value of "1". Program will then ask "Highest DPA, divided by Arcanatime, with Recharge Modifier 0. Begin Recharge" Now, as the timer ticks, two attacks will have a "1" value, when their recharge is completed, the "1" will be removed and it will be available for the next prompt. Repeat this process until either A.) Timer runs out, or B.) A single attack has been executed three times. When done, output string data Attack Names. A value of three attacks is enough to cover that the chain has begun looping over itself, and you can devise based on pending output where the chain begins and ends.

This then poses the question of sets like Dark Melee and Claws where other attacks may supersede things like Siphon Life and Follow Up that you would actually /want/ in the chain. This is probably best corrected by adding an additional question when you input an attack. "Does this contain +Heal or +Dam, Y/N" so that when the power is input, selecting yes will add 100 to the DPA to insure that the attack is run first in the chain (this should, in most cases, be a sufficient additive, and if not, should put the attack into spot 2 in the DPA run). This doesn't readily solve the issue though.

I put concern in using base values for the input attacks as some areas like Smite may not get contributed twice (immediately, or in the right area) that can mislead the most optimal chain, but at the same time this is giving you the greatest base chain that you can eliminate from based on increasing recharge. So a dual run might be optimal, and could actually be coded into the program to run two chains. The first one based on the input values, and the second that performs a 200% Reduction on recharge to give a more likely High End chain.


Quote:
Originally Posted by Arcanaville
Warning: crazy space limit reached. Please delete some crazy and try again.

 

Posted

Quote:
Originally Posted by John_Printemps View Post
Speaking from programming experience (mind it has been many years, and I've not kept up with any of it so my value in actually designing it is zero), a program could be designed to take a set of variable inputs and designated the most likely combination based on a given timer. The way I'm seeing it, have the code request "Input Variables," which would be based on a set of identifiers.
  • Attack Name:
  • Recharge:
  • Arcanatime:
  • DPA:

Ask for the attack name to identify it in a memory dump with the associated items. Programmed they would each have a primary identifier and a sub identifier (like A1, A1.R, A1.A, A1.DPA). After each Attack que, it will ask "Additional Attacks? Y/N", type Y, enter; it will prompt the next attack and be dumped into memory as identifier A2 (etc). Do this for all attacks in the Primary (Or secondary, depending on the AT) that you want accounted for in the calculations.

Once all attacks have been entered, it will prompt "Begin Timer?" This will initiate a timer with ...say, 30 second timer (this seems enough to run most possibilities), and a secondary clause. The program would be coded to begin a string that asks "Greatest Value of DPA divided by Arcanatime with Value 0. Begin Recharge" This would trigger the highest damaging attack and pit it's recharge into a separate timer that, while active, will give the attack a value of "1". Program will then ask "Greatest Value DPA, divided by Arcanatime, with Value 0. Begin Recharge" Now, as the timer ticks, two attacks will have a "1" value, when their recharge is completed, the "1" will be removed and it will be available for the next prompt. Repeat this process until either A.) Timer runs out, or B.) A single attack has been executed three times. When done, output string data Attack Names.

This then poses the question of sets like Dark Melee and Claws where other attacks my supercede things like Siphon Life and Follow Up that you would actually /want/ in the chain. This is probably best corrected by adding an additional question when you input an attack. "Does this contain +Heal or +Dam, Y/N" so that when the power is input, selecting yes will add 100 to the DPA to insure that the attack is run first in the chain (this should, in most cases, be a sufficient additive, and if not, should put the attack into spot 2 in the DPA run).

Overall this wouldn't take much running power as a base C++ executable, transitioning that into a friendly and simple user interface for anyone to use? No clue on that, I just get the back end of it.
I wrote a program to do exhaustive search a long time ago. Exhaustive search takes a surprisingly long time even for 60 second and 30 second chains. I tried to bound search scope with heuristics, but those started to get more complicated than the searching algorithm itself, and I decided at the time I didn't need to know the optimum chain that badly.

One of the heuristic checks though was something I thought would eventually speed things up a lot, except I never got around to finishing the code for it. Basically, it was a loop detector. If you're looking for the best 30 second chain, there's no point in looking at the chain A->B->C->A->B->C->A because the powers just keep repeating. That chain is just A->B->C. So A->B->C->A->B->A is a valid search item, but A->B->C->A->B->C is not. That part of the tree could be pruned.

Furthermore, I tried to see if this rule made sense, and under what circumstances. If you think about it, if A->B->C->A->B->A is a good chain, when why isn't A->B->A->B an even better chain? In the above chain C is following A and B, but A is also following A and B. Assuming recharge is not the issue, it cannot be true that A is the best choice sometimes and C is the best choice at others when confronted by the same situation. So the rule I was trying to create algorithmicly was this one: once you've decided to pick X in a certain situation, you are required to pick X whenever that same situation recurs. However, that turned out to be a sticky thing to code algorithmicly, due to the complexity of defining "situation" in a way that would work. It has to be based around the limits of recharge, but its not necessary that the same situation involves identical time to recharge. It could be different, but still close enough to make the powers become available on the same schedule.

It was specifically at that point that I decided I didn't need to know that badly. I've already written *two* simulators. I wasn't all that crazy about writing a third.


[Guide to Defense] [Scrapper Secondaries Comparison] [Archetype Popularity Analysis]

In one little corner of the universe, there's nothing more irritating than a misfile...
(Please support the best webcomic about a cosmic universal realignment by impaired angelic interference resulting in identity crisis angst. Or I release the pigmy water thieves.)

 

Posted

Quote:
Originally Posted by Arcanaville
My near-optimal algorithm is basically this: always use the highest DPA attack that is recharged.
In practice, that's probably by far the best thing to do... but where's the fun in that?

I'm, more so, interested in this as an initial step in a much larger endeavor- a project that'd actually be able to take a character with a specific build and then throw them into various situations, and produce various results based off of it- i.e. what'd be the lower bound of a Scrapper with a specific build being able to solo a Rikti Pylon, or on average, how averaging over X number of simulations, what are the chances, as well as average completion time, of an arbitrary character soloing an 8-man group of lvl 54 Rikti. Such a program would need to have a very thorough understanding of your character, the in-game's AI, the mobs powers/resistance/etc, and the fundamentals of the game's mechanics.


Wouldn't be insanely useful, but it'd be fun to tinker with... it could even spawn a whole meta-game of it's own, such as who could design the most ridiculous build to do some random challenge (or, even, who could build the WORST character!).


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!

 

Posted

Quote:
Originally Posted by John_Printemps
This then poses the question of sets like Dark Melee and Claws where other attacks may supersede things like Siphon Life and Follow Up that you would actually /want/ in the chain.
I was also thinking about these, and for the method I was thinking about, the Follow Up situation would be fairly easy to deal with... it'd add some extra complexity, you'd add a few exta fields to power struct (base damage, damage buff amount, how much it buffs the following damage, and how long), and slightly tweak the function that rates each chain to take those things into account.

The Siphon Life situation is a bit harder, since it's extra benefit isn't damage related. Some sort of value-based judgement would have to be made wrt that... could just artificially inflate the damage like you suggested, or just assume you don't need to be using it constantly, and only as needed. Of course, that still leaves ones like Divine Avalanche, DB combos, the whole mess that'd be KM, and several others (Assassin's Strike + Placate? ugh!).

... TIME FOR FUN!


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!

 

Posted

Quote:
Originally Posted by John_Printemps View Post
A value of three attacks is enough to cover that the chain has begun looping over itself
I have several toons with an attack chain of this form (based on the numbers I map this pattern to):
12321242
You'll note that attack #2 occurs four times in the chain. I doubt this is typical of the highest DPS chains, but it's typical for some of my mid range chains.

Quote:
Originally Posted by John_Printemps View Post
This is probably best corrected by adding an additional question when you input an attack. "Does this contain +Heal or +Dam, Y/N" so that when the power is input, selecting yes will add 100 to the DPA to insure that the attack is run first in the chain (this should, in most cases, be a sufficient additive, and if not, should put the attack into spot 2 in the DPA run). This doesn't readily solve the issue though.
I agree that it doesn't solve the problem. It does make sure that these attacks get used as often as possible, but that won't necessarily be optimal. For instance, it might not find Smite -> Midnight Grasp -> Smite -> Siphon Life, because there are survivability chains that spam Siphon Life faster, like Siphon Life -> Smite -> Boxing.


"That's because Werner can't do maths." - BunnyAnomaly
"Four hours in, and I was no longer making mistakes, no longer detoggling. I was a machine." - Werner
Videos of Other Stupid Scrapper Tricks

 

Posted

Quote:
Originally Posted by Kitsune Knight View Post
In practice, that's probably by far the best thing to do... but where's the fun in that?

I'm, more so, interested in this as an initial step in a much larger endeavor- a project that'd actually be able to take a character with a specific build and then throw them into various situations, and produce various results based off of it- i.e. what'd be the lower bound of a Scrapper with a specific build being able to solo a Rikti Pylon, or on average, how averaging over X number of simulations, what are the chances, as well as average completion time, of an arbitrary character soloing an 8-man group of lvl 54 Rikti. Such a program would need to have a very thorough understanding of your character, the in-game's AI, the mobs powers/resistance/etc, and the fundamentals of the game's mechanics.


Wouldn't be insanely useful, but it'd be fun to tinker with... it could even spawn a whole meta-game of it's own, such as who could design the most ridiculous build to do some random challenge (or, even, who could build the WORST character!).
One day, when I decide I want to take on the huge workload required, I have an idea for evaluating attack sets and defense sets by doing exactly that: creating a model that requires that combination to both survive and defeat a scaling critter group. The complexities are huge. But it factors in a few things we currently do not: overkill on offense, for one thing. Optimal chains actually aren't necessary the optimal way to defeat a group of targets. A more accurate AoE model for another, and a proper survivability model that factors in decreasing incoming damage. I fiddled with that in my scrapper comparison simulator, but that was a very simplified linear model.

At that point, you're now simulating the actual game and not just its mechanics.


[Guide to Defense] [Scrapper Secondaries Comparison] [Archetype Popularity Analysis]

In one little corner of the universe, there's nothing more irritating than a misfile...
(Please support the best webcomic about a cosmic universal realignment by impaired angelic interference resulting in identity crisis angst. Or I release the pigmy water thieves.)

 

Posted

Quote:
Originally Posted by Arcanaville View Post
One of the heuristic checks though was something I thought would eventually speed things up a lot, except I never got around to finishing the code for it. Basically, it was a loop detector. If you're looking for the best 30 second chain, there's no point in looking at the chain A->B->C->A->B->C->A because the powers just keep repeating. That chain is just A->B->C. So A->B->C->A->B->A is a valid search item, but A->B->C->A->B->C is not. That part of the tree could be pruned.

Furthermore, I tried to see if this rule made sense, and under what circumstances. If you think about it, if A->B->C->A->B->A is a good chain, when why isn't A->B->A->B an even better chain? In the above chain C is following A and B, but A is also following A and B. Assuming recharge is not the issue, it cannot be true that A is the best choice sometimes and C is the best choice at others when confronted by the same situation. So the rule I was trying to create algorithmicly was this one: once you've decided to pick X in a certain situation, you are required to pick X whenever that same situation recurs. However, that turned out to be a sticky thing to code algorithmicly, due to the complexity of defining "situation" in a way that would work. It has to be based around the limits of recharge, but its not necessary that the same situation involves identical time to recharge. It could be different, but still close enough to make the powers become available on the same schedule.

I'd snip more, but this is actually all relevant to what I'm thinking; and I think what you said kind of goes back to my edited-in concern on my other post so we're looking closely at the same issue.

I do think that we may be looking at the same issue on two different levels of complexity, though. I'm going back to a program code from my C++ courses' second week. Input four equations with different values for all eight integers, solve each, and output the data based on highest to lowest. Albeit this is questioning some additional steps (recharge markers and the like), but I don't see that ultimately taking a .5/s process and making it move up to more than 15-20 seconds, maybe 40 at best, 60 seconds at absolute worst (post timer end, for data compiling).

I do see the inherent fault in base values for recharge causing an abnormal spit-out of data. But, say, an obtainable quantity that is most likely required for an average high-end chain would be ~250% Recharge (100 in the attack, 150 Global). Input the base values, have the program immediately alter the value upon input and save that value as the input value for that field so that when the "chain timer" runs, it doesn't waste additional time in that phase.

Adding the recharge in to eliminate the likelihood of an undesired attack repeating itself would prove the best potential scenario. If Power #1 recharges in 4.5 seconds, and animates in 2.1, flag, find next power, #2 animates in 1.2, recharges in 1, flag, find next power, #3 animates 2.17 seconds, recharges in 3. This scenario, the code will catch that Power 2 is now recharged, is the best potential choice, and choose it. By this point, Power #1 will now be recharged, and selected (which is desired), and you start popping into the best chain, eventually timing out the system so that you get 1 > 2 > 3 > 2 Repeat (Which, in this model, is Midnight Grasp > Smite > Siphon Life > Smite). This does bring up a small concern though (as sort of mentioned before). Some rare occasions an attack may be superior and not get caught correctly in the chain without a modifier that would correctly place it's value in the processing. Siphon Life is the only one offhand that I can think of, though. I thought Follow Up might be a concern too, but it's DPA is sufficient to keep it above some of it's lower tier'd counterparts. It would not, however, hurt to add some kind of modifier that would provide a more appropriate value to those few powers based on their importance/overall benefit.

Quote:
Originally Posted by Werner View Post
I agree that it doesn't solve the problem. It does make sure that these attacks get used as often as possible, but that won't necessarily be optimal. For instance, it might not find Smite -> Midnight Grasp -> Smite -> Siphon Life, because there are survivability chains that spam Siphon Life faster, like Siphon Life -> Smite -> Boxing.
Based on the goal of finding "the most optimal", no these situations wont include mid-range or high-end survival chains, but at the same time it's not entirely impossible for this to be extended in a scenario that would include these potentials. In fact, adding an additional input into the questionnaire portion to ask for Recharge % to reduce input base percents by, which should give the most likely mid-range chains (but this is more assumption than contemplated possibility and may just turn back around into what Arcana was talking about, and getting something that is close, but not necessarily the best, even for a mid-range goal).

As for a scenario like with Siphon > Smite > Boxing? Exclusion of any attack that can't be reduced to 2-3 seconds from the input field, and this would most likely produce that so long as everything else it would worry about it eliminated (which is actually only Midnight Grasp). This is more a pre-thought by the user, and does not ultimately output the desire of shoving everything in and expecting your specific desire; but then again this is asking for a Ferrari when you can only afford a Pinto.


Quote:
Originally Posted by Arcanaville
Warning: crazy space limit reached. Please delete some crazy and try again.

 

Posted

Quote:
Originally Posted by Arcanaville View Post
My near-optimal algorithm is basically this: always use the highest DPA attack that is recharged.
This is the algorithm/strategy that I called 'naive' in the above post.
I see your point, though, that it still works if the environment changes, so I guess it's 'naive' not like 'naive set theory' but in the sense of 'best response to unfamiliar conditions'.

And here's the counter example I promised:

Three attacks, call 'em H, J, and K

H: D=50, A=0.5s, R=4s
J: D=20, A=1.5s, R=3s
K: D=10, A=2s, R=3s

where D = damage, A = Arcanatime, and R = recharge time.

Unenhanced, the chain seems to be
H->J->K
with a 0.5s gap before it can be repeated.

DPS = 80/4.5 = 17.77777...

Watch what happens if you enhance the recharge on J, without changing anything else. For the sake of argument, let's enhance it by 100%, even though that's a stupid use of your slots.

Ok, actually that wasn't what I expected. It takes a bit to display cyclic behavior, but ends up on the same chain.
Except that, rather bizarrely, there's a 1 second gap between J and K. This means that the chain now takes 5s, cutting the DPS down by 10%, and leaving the best attack sitting ready in the tray for 10% of the time, waiting to be used.
I'm pretty sure the non-naive version (which considers waiting for high-DPA powers to recharge instead of using slower ones) would not do this.

EDIT: I think just about everyone posted something while I was figuring that out. it may not even be relevant anymore.


 

Posted

Quote:
Originally Posted by Werner View Post
I have several toons with an attack chain of this form (based on the numbers I map this pattern to):
12321242
You'll note that attack #2 occurs four times in the chain. I doubt this is typical of the highest DPS chains, but it's typical for some of my mid range chains.
In the build I've been drawing up for by KM/Inv (brute), the best chain I could find for next-to-no global recharge had Quick Strike doing the plurality of the damage. It was something like 40% of the total.


 

Posted

For those interested, here's the code of the program I wrote that was based on what I call DIWF (DPS If Waited For)... although I wrote it in Google's Go language (its started to become my preferred language for any non-GUI tasks... lol), but it should be easy enough to understand if you know any C-like language, since I don't do anything fancy.

Interestingly enough, Go's website allows you to enter code in the browser and it'll compile it, run it, and display the output, so you don't need to install the Go compiler to test my stuff out. You could tweak the attacks (or add more!), and change the length of the simulation and test it out on their site.

Edit: One thing I thought of: Should recharge time also be arcanatime-ized?


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!

 

Posted

If I understand your code correctly, it looks like you're having a power start recharging as soon as it *starts* executing, but I'm pretty sure it starts recharging once it finishes.


 

Posted

Quote:
Originally Posted by Rayonn View Post
If I understand your code correctly, it looks like you're having a power start recharging as soon as it *starts* executing, but I'm pretty sure it starts recharging once it finishes.
Damn, you're totally correct. I didn't even to look at my code to be sure

I'll edit these two posts when I paste a corrected version.

Edit: New version @ http://pastebin.com/2P1hMgz6


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!

 

Posted

I don't see what you changed.


 

Posted

Ugh, must have copied the wrong address. I'll fix that later, once I get back to my computer.

---
It's fixed now. I apparently didn't know how the update function worked (I assumed if you edited it, then clicked 'update', the next page would have the updated version! )


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!