To answer your question, the problem is to find the best equipment from all items available in game. The reasoning behind this has to do with an economy controller and setting NPC sell prices based upon the gear's usefulness and fluctuating player controlled auction system. Also, some of the enemy designers are using this to gauge monster difficulty based upon optimum scenarios.
With the way the formulas for damage and hit accuracy are formed on a multi-variable curve and based upon situational variables (enemy statistics), there really isn't a static "raw usefulness" for an item. An item that enhances the graphs slope isn't as useful against an enemy that lowers the curves maxima. Essentially, Strength is not greater than Attack, and Attack is not greater than Strength, but the proper combination of both in accordance to the enemy level, Vitality, Evasion, and Defence will create the best outcome. My job is to find the "best combination", or gear set, for a given situation (input from user).
Let's say for example you have an item that has the greatest Accuracy bonus for headgear. You also have an item that has the greatest Accuracy bonus for a body piece. Although Accuracy is needed, it would be useless to wear them both. At level 20, there's a headgear that grants a large Attack bonus, so at level 20, you might wish to wear the Attack headgear and the Accuracy body piece. At level 40, a large Attack bonus body piece becomes available. At this point, it might be prudent to wear the Attack body piece and the Accuracy headgear. These are just two variables that go into an effective combatant, but you can see how one piece's usefulness is actually dependent upon the options available in other equipment slots. All gear is synergistic to each other to create the optimal curve.
Let's take the example further and say that now you are fighting an enemy with incredibly low Evasion. Now, the affect of Accuracy on the curve is less dramatic, and Strength suddenly becomes more prudent. You may completely wish to un-equip the Accuracy bonus gear in exchange for something else. This also helps demonstrate how a situation can change the usefulness of a single piece of gear.
Also, a difficulty of this is that the tool should work across expansions, when variable amounts of gear are added to the game. Although if I need to pre-compute values, I can always just check expected version against current and only do a full recompute when they differ.
I can filter out items that are utterly useless, and I can filter out items that are less useful "in the same way" (eg. Defense 5 vs. Defense 6 or Attack +10 vs. Attack +15) as other items, but really that leaves a great number of items left. I've finished doing some of these filters and have come up with the number of items:
Back - 104
Body - 206
Ear (2 slots) - 250
Finger (2 slots) - 281
Feed - 173
Hands - 193
Head - 226
Legs - 161
Neck - 140
Waist - 130
Primary Weapon - 430
Secondary Weapon - 59
Ranged Weapon - 129
Ammo - 120
This means that a brute force approach to every gear combination would have to parse 1.108x10^36 possible gear sets for sorting (if the numbers don't add up it's because of how secondary weapons stack and are limited in use with dual primary weapons). In other words, you are completely correct, it is a P-class solution, but it's a very big P.
Linear programming might be the way to go. Thank you for that referral, I'll be checking it out. This is precisely what I meant when I said that I'm not particularly up to the expertise required to jump into this, as I have no idea how to communicate properly with a mathematician about this. I was hoping to find the proper heuristic to make this sort possible in a reasonable amount of time (< 2 hours).
Thanks once again for your help, you may have already gotten me onto the right track and I appreciate your interest!