Solver

Apr 12, 2010 at 11:48 PM

I wonder what do you mean by "solve priorities". Is it you're going to implement automatic algorythm to try all possible spell priorities to find the best one for current stats setup? I tried implementing such tool, but was stopped by the lack of time.

The question is, how to shorten the list of priority sets from maximum theoretical n! to something more fittable. Yes, you can indeed shorten the list by excluding things you don't want to use (like Chain Lightning), but problem stays. I didn't thought up anything better than trying all permutations one by one. I'm very inerested in how are you going to solve this problem.

This is, for example, function I used for switching from one permutation to another.

void next_order(int* o){
    int k = spell_num-2;
    while(o[k]>o[k+1])
       --k;
       int t = k+1;
       while ((t<(spell_num-1))&&(o[t+1]>o[k]))
          ++t;
       int i = o[k]; o[k] = o[t]; o[t] = i;
       int j = 0;
       while(k+1+j < (k+spell_num)/2){
          i = o[k+1+j]; o[k+1+j] = o[spell_num-1-j];
          o[spell_num-1-j]=i;
       }
   }
}

Coordinator
May 21, 2010 at 11:23 AM

No your code just cannot work as it just takes way way too long, the more priorities you add it is possible to have a situation where your code would take several years to get a result. What is required is to use a computational technique called Genetic Algorithms (search on google for info). What this does is to using clever maths to dramatically reduce the numbers of simulations that are required to hone in on the solution.

The idea is to be able to try out lots of possibilities eg: finding the best priority list, taking a list of gear and working out a BiS list, etc. The first step was to split the sim calculation code into a separate module where you can simply throw a data set at the model and get a single dps result.

Then you can use a computational technique such as a Genetic Algorithm to try out various combos and see what gives the best dps result.