I think you misunderstood what I was saying, or I was unclear. Redbeard, above, was talking about deciding what action to take "now", based on figuring the whole optimal sequence of actions from "now" until the end of the fight. This is like those amazing chess players who can see 20 moves ahead, and my response was that I don't believe players don't make decisions that way in this game. I think that they mostly just look at their cooldowns, their resources (mana/rage/energy/ruinic power/combo points/runes), their own health, the health of the boss, etc... I doubt most players think more than 10-15 seconds ahead, aside from waiting for key abilities to cool down.
I would think that the best, and possibly easiest way, would be to allow someone to set their abilities in a list for their priority.
Something simple like:
Or whatever....then have the simulation taking into account mana, regen, etc, etc...and start at the top "Is Ability A available?" If yes, then do <Ability A>, then go down the list. If the cooldown, or duration of the ability isn't up yet, then the answer would be "no" and it would go down to the next ability.
Cycling through these until OOM or the "fight" is "over".
it's the best way I can think - with an Affliction spec, it's now us Warlocks do things - start with the initial series of spells, then refresh things as they come up, rinse, repeat.
You can display associated threat levels after each rotation, etc, if you know the values....but your comment about how we don't do that type of evaluation (unless I misunderstand) while fighting, isn't wholly true. Something weird happens, and I find I'm about to take aggro from the tank (or whatever), I'm changing my rotation to lower my threat (as an example)....
I believe what you're describing fits my model above. You could create "Priorities" for
* Staying under tank threat
* Keeping your health above 60% via healthstone/drain life
* Keeping your important debuff(s) up (i.e., you keeping your malediction-amplified curse up may be more important than doing damage)
* Keeping your mana above 50% via lifetap/dark pact
* Doing damage
I fail to grasp why the priority system has to be so complicated? Are you attempting to avoid creating custom conditionals for a subset of player abilities? In simulationcraft there is a class hierarchy to model player actions: Action, Spell/Attack, RogueAttack/ShamanAttack/ShamanSpell/etc, Sinister Strike, Rupture, Stormstrike, Lightning Bolt, etc. Each level represents a place to code more specific functionality and options. Yes, there are some actions that require sophisticated conditional logic, but most are pretty straight-forward.
I made a very early design decision in simulationcraft: I accepted the fact that I would not be able to own this code forever. I accepted the fact that I would likely need some help with the coding and a TON of help with oversight. This means that readability had to be my number one goal. It has cost me: It has hurt my performance. It has limited my flexibility. In some rare cases I've accepted a model that is not quite 100% accurate.
I believe that this priority system needs to be more complicated than what you're using for simulationcraft for two reasons
1) I'm dealing with multiple players, attacking (eventually) multiple targets. If warlock A, B, and C need to collectively keep curses of elements and shadow up, and warlock A puts elements up, casting curse of elements becomes vastly less important for all three warlocks until the debuff starts to expire.
2) I want to model the death knight class properly. I don't believe that the concept of NOT spending a rune on ability A now, because ability B (a better choice) will be ready in the near future, can be modeled by anything less complex than what I have above. For example, if I currently have one unholy and one frost rune, and a blood rune cooling down in 2 seconds, I can either cast obliterate (consumes 1u1f) or take an autoattack swing and cast death and decay in 2 seconds (uses 1b1u1f).
If I have a simple list of abilities, and ask each one, in order of priority, if it's ready to use, there are two possible scenarios:
A: death and decay is a higher priority than obliterate
* Ask death and decay if it's ready (NO)
* Ask obliterate if it's ready (YES)
* Cast obliterate
B: obliterate is a higher priority than death and decay
* Ask obliterate if it's ready (YES)
* Cast obliterate
I believe that the simplistic list of abilities in priority order will NEVER cast death and decay, regardless of whether it's a better or worse spell than obliterate in a given situation.
3) I want to avoid forcing users to plug in a rotation they read somewhere on these forums, because that information is based on incomplete theorycrafting. There's no doubt that using spreadsheets for analysis is useful, but it fails to take many factors into account that I am attempting to model.
As far as usability is concerned, one of the perks of using Java and Netbeans is I can throw together a slick "Create custom attack rotation" wizard in about 10% of the time it takes me to code up the mechanics of choosing an attack. No coding will be required in my software, unless you want to perform an optimization of some sort, where you run many simulations, adjusting parameters as you go. Even then, the code would only be making the adjustment, and telling the simulation to generate a new set of results.
What am I trying to say? Don't create something so complicated that you scare off people who love WoW, but only have limited coding experience. Some of the most helpful contributions from the EJ community to simulationcraft have not been in the form of new code, but rather code reviews.
Oh..... and I like your sig. Heh.
I'm just making sure I have a model that fits every class well and MOST player behavior well, in the context of multiple raiders in multiple parties attacking multiple targets. Anything less complete has already been done, and is thus not worth doing again.