Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Class Mechanics » Rogues

Closed Thread
 
LinkBack Thread Tools
Old 01/27/11, 9:54 PM   #136
Tini
Glass Joe
 
Tini's Avatar
 
Gnome Rogue
 
Silvermoon (EU)
Great work korner and bsoft, really nice, fun apps.

Though it's really late and I could of course be wrong but doesn't it seem like a small error in the file EpCalculator.java?

    public static double calculateEp(int[] statValues) {
        double result = 0;
        for (Stat stat : Stat.possibleStats) {
            int value = statValues[stat.getIndex()];
            if (stat.getCap() > 0 && value > stat.getCap()) {
                result += value * stat.getPostCapCoefficient();
            } else {
                result += value * stat.getCoefficient();
            }
        }
        return result;
    }
Maybe use something like this instead?
    public static double calculateEp(int[] statValues) {
        double result = 0;
        for (Stat stat : Stat.possibleStats) {
            int value = statValues[stat.getIndex()];
            if (stat.getCap() > 0 && value > stat.getCap()) {
                result += (value - stat.getCap()) * stat.getPostCapCoefficient();
                value = stat.getCap();
            }
            result += value * stat.getCoefficient();
        }
        return result;
    }

Last edited by Tini : 01/27/11 at 10:00 PM.

Sweden Offline
Old 01/27/11, 11:19 PM   #137
bsoft
Glass Joe
 
Night Elf Priest
 
Terenas
Originally Posted by Tini View Post
Great work korner and bsoft, really nice, fun apps.

Though it's really late and I could of course be wrong but doesn't it seem like a small error in the file EpCalculator.java?
That would make more sense, although surprisingly it doesn't seem to change the results as compared with korner's Perl version.

I'll change this and post a fixed version after I'm done with my raid.

Offline
Old 01/28/11, 12:57 AM   #138
bsoft
Glass Joe
 
Night Elf Priest
 
Terenas
I went ahead and posted a new version: 1.1

Fixes include:
  • Better error messages for invalid command-line input
  • Correct EP calculation issue

Offline
Old 01/28/11, 3:03 AM   #139
chipix
Glass Joe
 
Gnome Rogue
 
Stormrage (EU)
Originally Posted by Yurifel View Post
That is exactly what a knapsack problem is. The fact that you have a small enough set of items that you are able to do it by hand does not change this fact.

For the record, your method is exactly what I use when I reforge (with the added step of "if you are not at hit cap after reforging all possible items to mastery and everything else to hit, pull some of the mastery into hit"...but I assume you're doing that already). My gut tells me that there are probably situations where it won't work perfectly, but in the worst case, it's still going to get you really close.

Edit: For a simple example of a situation that doesn't hold, consider the following two items:

Item A - 150 crit, 150 haste
Item B - 50 crit, 50 mastery
60 hit below cap

Using your algorithm, we would end up with:

Item A - 90 crit, 150 haste, 60 mastery
Item B - 30 crit, 20 hit, 50 mastery

Whereas the optimal reforge would be:

Item A - 90 crit, 150 haste, 60 hit
Item B - 30 crit, 20 haste, 50 mastery

The EP values of these two setups are extremely close (close enough that I don't think I'd spend 2 days running the reforger tool to make sure I was correct, and certainly close enough that I would just as soon do my reforge by hand as I would run the tool with a simplified stat list).
Yes, indeed is knapshack but we have only 1 weight of item (cap hit), so it is the most simplistic knapshack problem ever.

The above situation is solved by your comment (with the added step of "if you are not at hit cap after reforging all possible items to mastery and everything else to hit, pull some of the mastery into hit"...but I assume you're doing that already). And yes I am doing that already also with the option to find the item with mastery that will put me nearest to hit cap. But as you said is very extreme and you will gain 1-2 EP which is ridiculous
So as recap. Great tools guys, but the problem is much much simpler to solve and the tools I believe should point to that direction.

Offline
Old 01/28/11, 3:17 AM   #140
evoslayer
Von Kaiser
 
Orc Rogue
 
Azjol-Nerub
It seems to me that there are a couple of assumptions you can use to make it faster, or at least give the option of following these assumptions.

First, you will never reforge your top EP non capping stat on any non trinket item, for most rogues this is mastery

All items have 2 secondary stats and you will never reforge the higher EP one unless its in a capping situation, this means you only have to check reforging the weaker one, although you will have to check all possibilities on a capping stat

In the current state of things you will also never reforge to anything but mastery haste and hit.

The highest ep in the current state will always be achieved by getting as close to hit cap as possible, I believe going over is more damaging than going under. after you reach that point you reforge to mastery on any item that doesnt have it and haste on any item that does, obviously because of hit cap it is nessecary to check all possible permuations of reforging to and from hit in order to get close to the cap but there is no reason to ever consider permuations where you reforge mastery to anything (even hit because all items with mastery come with a weaker stat which would be the better choice to reforge, or anything to crit or expertise.

Edit.

After I posted this I realized that because quantites of secondary stats on an item vary IE 90 crit and 76 haste or whatever (these can yeild differing amounts of hit and therefore you could get closer to the cap based on which you choose), you actually have to check more permuatations than I thought but It might be nice to write a "Light" Version of the app that could be run more quickly by people with weaker machines, It would very likely be extremely close to optimal

Offline
Old 01/28/11, 4:38 AM   #141
bsoft
Glass Joe
 
Night Elf Priest
 
Terenas
Originally Posted by chipix View Post
Yes, indeed is knapshack but we have only 1 weight of item (cap hit), so it is the most simplistic knapshack problem ever.

The above situation is solved by your comment (with the added step of "if you are not at hit cap after reforging all possible items to mastery and everything else to hit, pull some of the mastery into hit"...but I assume you're doing that already). And yes I am doing that already also with the option to find the item with mastery that will put me nearest to hit cap. But as you said is very extreme and you will gain 1-2 EP which is ridiculous
So as recap. Great tools guys, but the problem is much much simpler to solve and the tools I believe should point to that direction.
What you're talking about is a heuristic, which is certainly possible. Both of our systems are already using a heuristic of sorts to prune the search (certain stats are only ever reforged into other stats - this could hypothetically lead to a suboptimal solution in some edge case that's unlikely to occur).

For Mutilate rogues my Java version already gives an answer in a few seconds a couple of minutes on fast hardware and shouldn't take more than about 30 minutes even on slower hardware. I know that not everyone has a Core i7 but if your machine is fast enough to run WoW it should be fast enough to bust through the options in a reasonable amount of time if you're Mutilate.

For Combat rogues the problem is harder. Indeed there are some nasty cases there (700B is going to take a while for example - around 4 hours on my i7 2600 and possibly days on something slow like a P4). I know that not everyone likes to wait around for that amount of time so maybe there's a trade-off to be had here.

As a CS graduate student I like to see 'optimal' solutions but I understand that sometimes it doesn't make much of a difference in the real world.

Offline
Old 01/28/11, 5:24 AM   #142
KinetiK01
Glass Joe
 
Undead Rogue
 
Dalaran
Is there any reason why bssoft's reforger thinks I have exactly 25 more haste, 26 more mastery, and 2 less hit than I actually do? I do not have any random enchantment items equipped.

Stats with no reforgings (EP = 5713.8):
Hit: 1371
Mastery: 996
Haste: 1178
Expertise: 569
Crit: 545
Stats with current reforgings (EP = 5856.6):
Hit: 1327
Mastery: 1401
Haste: 1236
Expertise: 344
Crit: 351
Stats with recommended reforgings (EP = 5880.2):
Hit: 1331
Mastery: 1629
Haste: 1004
Expertise: 344
Crit: 351
Improvement over current reforgings: 23.6
The disparity was exactly the same before I ran this optimal reforge tool as well. The reported expertise and crit ratings, however, are correct.

Offline
Old 01/28/11, 5:50 AM   #143
Sulphuric
Von Kaiser
 
Sulphuric's Avatar
 
Human Rogue
 
Frostmane (EU)
To bsoft:

I assume you've added xx>mastery in the combat forging calculation, as it's so many options. While your tool works a lot faster, I'm down to ~1 minute by using Korner's 1-threaded version.

So in the end, korner's version will be faster due to the possibility to manually skim down the list as you wish. I'm not too Java-savvy, so couldn't run the script properly, so just went with the web browser one.

But you can safely remove all xx>mastery from the combat calculation, due to it being the lowest valueable stat, which means it'll never be an option to reforge to. Even after the buff in the next patch, it's assumed to be below white hit, and we still don't even reach the spell hit cap as a combat rogue which is fairly valueable (0.1EP below haste, haste being 1.5 and our strongest non-cappable stat).

And in 346+ ilevel gear, it'll be valid to remove haste>xx as well, due to the fact that you can easily reach the expertise cap and land with excess spell hit on that gear level or higher.

Edit: Finished now and -

Loading character info:
Using combat reforgings.
Recommended reforgings:
["Necklace of Strife" 50 Haste to Hit]
["Dragonwreck Throwing Axe" 28 Haste to Hit]
["VanCleef's Boots" 60 Haste to Hit]
["Lightning Conductor Band" 57 Crit to Mastery]
["Wind Dancer's Spaulders" 59 Crit to Hit]
["Wind Dancer's Tunic" 75 Expertise to Hit]
["Fang of Twilight" 38 Crit to Hit]
["Viewless Wings" 50 Crit to Mastery]
["Aberration's Leggings" 91 Crit to Hit]
["Dispersing Belt" 59 Crit to Hit]
["Stormbolt Gloves" 59 Crit to Hit]
["Uhn'agh Fash, the Darkest Betrayal" 38 Crit to Mastery]
["Membrane of C'Thun" 67 Expertise to Mastery]
Which means it was pulling the assassination EP values instead of the combat ones

Last edited by Sulphuric : 01/28/11 at 6:17 AM.

Norway Offline
Old 01/28/11, 6:01 AM   #144
Tomate
Von Kaiser
 
Worgen Rogue
 
Cho'gall (EU)
Hi,
First, thanks for the tool it is really helpful.
I have encounter an issue, it seems to not work well with other localization than English one.

Here is what I've got with this url: (French)
Tomaten @ Cho'gall - Jeu - World of Warcraft
Recommended reforgings:
  ["Scaleslicer" 38 Expertise to Mastery]
  ["Tsanga's Helm" 67 Crit to Haste]
  ["Dragonwreck Throwing Axe" 28 Haste to Hit]
  ["Assassin's Chestplate" 101 Crit to Mastery]
  ["Wind Dancer's Gloves" 67 Haste to Mastery]
  ["Wind Dancer's Legguards" 75 Crit to Hit]
  ["Storm Rider's Boots" 59 Haste to Hit]
  ["Fluid Death" 128 Hit to Mastery]
  ["Poison Protocol Pauldrons" 59 Crit to Hit]
  ["Lightning Conductor Band" 50 Crit to Mastery]
  ["Parasitic Bands" 50 Crit to Haste]
Stats with no reforgings (EP = 5930,6):
  Hit: 1239
  Mastery: 1869
  Haste: 624
  Expertise: 97
  Crit: 1012
Stats with current reforgings (EP = 5930,6):
  Hit: 1239
  Mastery: 1869
  Haste: 624
  Expertise: 97
  Crit: 1012
Stats with recommended reforgings (EP = 6112,0):
  Hit: 1332
  Mastery: 2253
  Haste: 587
  Expertise: 59
  Crit: 610
Improvement over current reforgings: 181.4
Calculation time: 59,26 seconds (checked 6,31M possibilities per second)
But when I enter this url: (English equivalent)
Tomaten @ Cho'gall - Game - World of Warcraft
I've got this result, which is what I expect:
Recommended reforgings:
  ["Scaleslicer" 38 Expertise to Mastery]
  ["Tsanga's Helm" 67 Crit to Hit]
  ["Belt of Nefarious Whispers" 73 Hit to Haste]
  ["Assassin's Chestplate" 101 Crit to Mastery]
  ["Dragonwreck Throwing Axe" 28 Haste to Hit]
  ["Signet of the Elder Council" 50 Haste to Hit]
  ["Wind Dancer's Gloves" 67 Haste to Mastery]
  ["Wind Dancer's Legguards" 75 Crit to Haste]
  ["Fluid Death" 128 Hit to Mastery]
  ["Poison Protocol Pauldrons" 59 Crit to Hit]
  ["Parasitic Bands" 50 Crit to Hit]
  ["Lightning Conductor Band" 50 Crit to Mastery]
Stats with no reforgings (EP = 6328,1):
  Hit: 1279
  Mastery: 2029
  Haste: 694
  Expertise: 97
  Crit: 1067
Stats with current reforgings (EP = 6501,5):
  Hit: 1332
  Mastery: 2413
  Haste: 697
  Expertise: 59
  Crit: 665
Stats with recommended reforgings (EP = 6501,5):
  Hit: 1332
  Mastery: 2413
  Haste: 697
  Expertise: 59
  Crit: 665
Improvement over current reforgings: 0.0
Calculation time: 57,40 seconds (checked 6,52M possibilities per second)

France Offline
Old 01/28/11, 6:10 AM   #145
korner
Von Kaiser
 
korner's Avatar
 
Troll Rogue
 
Азурегос (EU)
Originally Posted by Tomate View Post
Hi,
First, thanks for the tool it is really helpful.
I have encounter an issue, it seems to not work well with other localization than English one.
Original Perl script transforms the received Armory URL to "advanced" view of English Armory, so no matter which language you enter - the tool will use English armory.

@bsoft: The following code implements that in Perl:

$armory_url =~ s/simple$/advanced/i; 			# We need advanced, not simple
$armory_url =~ s|wow/\w\w/character|wow/en/character|;  # English armory only - replace language code with 'en'

@KinetiK01 - The issue is the same as with the original script - Armory does not display added stats correctly sometimes.

Ukraine Offline
Old 01/28/11, 6:33 AM   #146
Seiba
Glass Joe
 
Blood Elf Rogue
 
Ravencrest
Was curious is there any way at all to add in the stats for wind stalker and mistral gear with bsoft's tool?

Offline
Old 01/28/11, 7:00 AM   #147
meneldor
Glass Joe
 
Worgen Rogue
 
Darkspear (EU)
When I run it it reforges my combat rogue stating that it "using combat settings" however it reforges away my exp and haste adding mastery?

When looking around in the java files I see that in the file "Stat.java" you have hardcoded caps and EP-values.
But those stats and EP-values are for assasination spec? From the result I am getting it seems that it does not use combat specific caps and EP-ratings? Is combat not implemented?

For an idea: since it already pulls data from the armory why not pipe them through the Shadowcraft engine to get accurate EP-values?

Using fixed EP-values (usually for BiS T11 gear) that does not take inte account the actual EP-values for that specific character really could be offsetting any proposed gains from the reforging tool due to gear level and spec.

Edit: The same things happens when using the /advanced link to the armory instead.

Loading character info:
Using combat reforgings.
Loading items:
.
.
Stats with current reforgings (EP = 5076,5):
Hit: 1098
Mastery: 902
Haste: 1490
Expertise: 784
Crit: 643
Stats with recommended reforgings (EP = 6120,5):
Hit: 1329
Mastery: 1770
Haste: 877
Expertise: 298
Crit: 643
Improvement over current reforgings: 1044.0
Calculation time: 20,7K seconds (checked 6,22M possibilities per second)

Last edited by meneldor : 01/28/11 at 4:54 PM.

Sweden Offline
Old 01/28/11, 8:26 AM   #148
Inkux
Glass Joe
 
Worgen Rogue
 
Ragnaros
Originally Posted by korner View Post
You can save the following code as reforger.bat at the same folder as executable and run it instead to get proxy support:

set HTTP_PROXY=http://your-proxy-host:80
reforger.exe
Obviously, replace http://your-proxy-host:80 with your real proxy URL (host + port)

For UNIX/MAC users, that file should be named reforger.sh and contain the following:
export HTTP_PROXY=http://your-proxy-host:80
./reforger.pl
Also, executable attribute should be set, obviously ('chmod +x reforger.sh' in shell)


P.S.: Fully multi-threaded version is coming. Got 1.25M calculations/second at 8 core CPU during testing, opposing to 180k with single-threaded version.
what if my proxy has password? any help someone? thx

Chile Offline
Old 01/28/11, 8:33 AM   #149
korner
Von Kaiser
 
korner's Avatar
 
Troll Rogue
 
Азурегос (EU)
Originally Posted by Inkux View Post
what if my proxy has password? any help someone? thx
You can try to enter proxy URL as http://username:password@your-proxy-host:80

Ukraine Offline
Old 01/28/11, 11:35 AM   #150
Hamstring
Glass Joe
 
Worgen Rogue
 
Bloodhoof (EU)
this tool looks really great, the only thing is they give conflicting answers.

the downloadable one using perl gives me this advice;

--- no --- : Terrath's Signet of Balance
--- no --- : Belt of Nefarious Whispers
--- no --- : Signet of the Elder Council
hit -> mst : Softwind Cape
hst -> hit : Dragonwreck Throwing Axe
hst -> mst : Poison Fang Bracers
hit -> mst : Fluid Death
--- no --- : VanCleef's Boots
exp -> mst : Left Eye of Rajh
exp -> hit : Leggings of the Burrowing Mole
cri -> mst : Vicious Gladiator's Shanker
cri -> mst : Throat Slasher
cri -> mst : Stormbolt Gloves
cri -> mst : Assassin's Chestplate
cri -> mst : Mask of Vines
exp -> mst : Mouth of the Earth
cri -> mst : Embrace of the Night

Resulting stats:
hit: 1332
mst: 1575
hst: 992
exp: 337
cri: 662
Resulting EP: 6069.2, 251.599999999999 gained


yet the one that works in my browser gives me;

Recommended reforgings:
["Vicious Gladiator's Shanker" 38 Crit to Mastery]
["VanCleef's Boots" 60 Haste to Hit]
["Softwind Cape" 44 Haste to Mastery]
["Dragonwreck Throwing Axe" 28 Haste to Hit]
["Assassin's Chestplate" 101 Crit to Mastery]
["Throat Slasher" 34 Crit to Mastery]
["Poison Fang Bracers" 44 Hit to Mastery]
["Mask of Vines" 72 Crit to Mastery]
["Leggings of the Burrowing Mole" 64 Expertise to Hit]
["Embrace of the Night" 60 Crit to Mastery]
["Mouth of the Earth" 44 Expertise to Mastery]
["Stormbolt Gloves" 59 Crit to Mastery]
["Left Eye of Rajh" 114 Expertise to Mastery]
["Fluid Death" 128 Hit to Mastery]
Stats with no reforgings (EP = 5425.3):
Hit: 1352
Mastery: 787
Haste: 904
Expertise: 559
Crit: 917
Stats with current reforgings (EP = 5425.3):
Hit: 1352
Mastery: 787
Haste: 904
Expertise: 559
Crit: 917
Stats with recommended reforgings (EP = 5642.1):
Hit: 1332
Mastery: 1525
Haste: 772
Expertise: 337
Crit: 553
Improvement over current reforgings: 216.8
Calculation time: 211.39 seconds (checked 14M possibilities per second)


so i'm totally confused as to why they are conflicting.

if it helps my armory url is; Anthoron @ Bloodhoof - Game - World of Warcraft

edit: never mind, i've just changed the url to advanced in the browser calculator and they now agree.

Last edited by Hamstring : 01/28/11 at 11:58 AM.

Offline
Closed Thread

Go Back   Elitist Jerks » Class Mechanics » Rogues

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimal Reforger Calculator Reeshet Public Discussion 59 07/15/11 7:34 PM