Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Blogs » Math of the Lich King

Rate this Entry

Optimal Gemming and the Chaotic Meta Requirement

Posted 11/15/10 at 4:02 PM by Hamlet
Updated 11/15/10 at 5:05 PM by Hamlet
(Prelim: as usual with my WoWmath posts, I'll try to summarize the results at the end for people who don't care about the mathematical arguments. Skip to "Conclusions" if you don't want to read the whole thing.).

 

Contents

[top]Introduction


As most of people have noticed by now, the requirements for the Chaotic meta gem (+3% to crit bonus) on Cataclysm beta is now "more blue gems than red gems." This is awkward to say the least, especially given the new Cataclysm stat system in which each spec has a primary stat (which is significantly better than all secondary stats) heavily favors red gemming over all other colors. Chaotic is a particularly important meta because it's the only one that provides a substantial DPS bonus. This post is about how to optimally socket gems in various colored sockets to obtain the best possible stats while meeting the Chaotic requirement.

I'm putting aside the question of whether it's worth it to use a Chaotic at all (for some classes, it may be best to use a weaker meta gem with a less onerous requirement so you can use more red gems in your normal sockets). I'm also assuming for now that it's always optimal to match socket colors to obtain socket bonuses, because the alternative analysis is extremely complicated. The results of this post will wind up making it easier to eventually address both of these issues, however.

A few other assumptions used here:
--Red is the best gem color for every class.
--No specified preference between blue and yellow; I'll deal with both possibilities (they are not symmetric since the meta requirement affects blue only).
--The difference in value between blue and yellow is smaller than the difference between red and either blue or yellow. Equivalently, an orange gem is better than a blue them, and a purple gem is better than a yellow gem. The point is, it's always better to pick up another half-gem worth of red, even if you have to swap blue to yellow or vice versa.
--No caps are present that put an upper limit on how many gems of a certain color you can use.


[top]Math


[top]Maximum Amount of Red Gemming


Assume you have N sockets total: R red, B blue, Y yellow, and P prismatic. We are eventually going to fill these N sockets with 2N half-gems: r red, b blue, and y yellow. The purpose of thinking in half-gems is that those are the smallest unit in which you can allocate the itemization points from your gems. The goal is to maximize r (the third assumption above guarantees this), and then afterwards to maximize either b or y, depending on which secondary stat is better for you.

NB: the meta requirement is _not_ that r must be less than b. If you socket a pure red gem, you get 2 red half-gems worth of stats but it only counts as one red for the meta requirement. For example, if you have 5 sockets total, with 2 red and 3 green gems in them, you then have r=4, b=3, y=3, but the meta requirement is still satisfied. We will see below that using pure red gems is key to optimizing the gem setup.

First observation: r must be less than N.
Proof: if you have r red half-gems, you must have x pure red gems and (r-2x) purple/orange gems for some x. Therefore you have (r-x) red gems for purposes of the meta requirement. The maximum number of blue gems you can have is (N-x): if everyone that's not red is blue, then you have (r-2x) purple gems from above, as well as (N-r+x) as yet unallocated gems. Since you have (r-x) red gems and can have at most (N-x) blue gem, N must be greater than r to satisfy the meta.

That's a good start; we have an upper bound on how much red you can socket. But depending on socket colors, you may not be able to get that high.

Consider yellow sockets. They can hold pure yellow, orange, or green gems. Which is preferred? Your intuition might be that orange is preferred, since we like red gems the best, but the answer is in fact that green gems are the ideal way to fill yellow sockets. One way to see this is to remember that we can only compare different gemming options if they maintain "meta parity"; i.e. they have at least as many blue gems as red gems. Put concretely: say we have two gems left to fill (assume the rest of our gear is already done optimally), one yellow and one prismatic.
--If we put a pure yellow gem in the yellow socket, the prismatic socket can't have a red gem, because that violates meta parity. The best it can have is a purple (remember our assumptions, a purple is better than a second yellow). So, in total, we get one red half-gem in our two sockets.
--If we put an orange gem in the yellow socket, we need a blue or green them in the prismatic to maintain parity. Again, only one red half-gem in our two sockets.
--But if we put a green in the yellow socket, now we can put a pure red them in the red socket, giving us two red half-gems in our two sockets (which, as we proved above is the maximum possible).

So putting a green in a yellow socket is the only way to maintain our goal of averaging one red half-gem per socket overall. To do this though we need a pure red gem to pair with each green gem. This is only possible insofar as we have red or prismatic sockets available. So, looking over our sockets as a whole:

A) If R+P >= Y, then socket Y green gems, one in each yellow socket, and Y pure red gems in red/prismatic sockets. Socket purple everywhere else (save for one pure blue or green gem to satisfy the "less than" requirement). This will give you r=N-1 red half-gems, which as we proved above is the maximum possible.

B) If R+P < Y, then socket R+P pure red gems in all of your red/prismatic sockets, and R+P green gems in yellow sockets (any other use of the red sockets is manifestly suboptimal). You are now left with B blue sockets and (Y-R-P) yellow sockets open. Proceed to the following lemma:

Lemma: If R=P=0, r must be less than (N-Y/2).
This proof is left as an exercise to the reader (I might edit it in later). Basically, try out every possible way of filling yellow sockets--you'll find that without red sockets to pair up with them as above, yellow sockets cannot be filled at a more red-saturated rate than one red-half gem per two sockets. The result is that you cannot have more than r=B+Y/2 red half-gems, which also equals N-Y/2.

Put simply, the result is that yellow gems which do not have red gems to "pair off" with can only be filled at half efficiency.

Applying the lemma to the situation in B above, we obtain the general result:

Second observation: r must be less than (N - (Y-R-P)/2).
Note that this constraint is only stronger than the previous one if Y>R+P.

Putting this all together:
Result: The number of red half-gems r in an optimal socketing arrangement is:
N - \frac{\max[(Y-R-P),0] - 1}{2} (rounded down).

The method of obtaining this optimal amount of red should be evident from the discussion above, but I'll outline it in the conclusion as well.


[top]Total Gem Stat Allocation


So far I haven't specifically addressed the relationship between blue and yellow, or how to find b and y. It's a relatively simple matter once we're done with r though. And once we know it, we can obtain an important result: exactly how much we're paying for the Chaotic meta requirement.

Use the same two cases as above:

A) R+P >= Y. Now every yellow socket is filled with a green gem, and Y red/prismatic sockets with pure red gems, as above. We have B blue and R+P-Y red/prismatic sockets remaining. If we prefer blue, we can fill all of the remaining sockets with purple, save for one pure blue. That gives us final gem quantities:
r=N-1, y=Y, b=(N-Y+1).
If we prefer yellow, we can fill all of the remaining red/prismatic sockets with pure red, enough green to match them (+1), and the remainder purple. That leaves us:
r=N-1, y=R+P+1, b=(N-R-P)=B+Y. We can summarize the result as:

N-1 red half-gems.
Y yellow half-gems.
B+Y blue half-gems.
R+P-Y+1 choice of yellow or blue.
(2N total half-gems, check).

B) R+P < Y. Now every red/prismatic socket is filled with a pure red gem, and R+P yellow sockets with green gems. All remaining blue gems must be filled with purple. The yellow gems must be split evenly between green/orange (with one or two extra green for our "less than" requirement). There is no choice between blue and yellow. The result is:

N-(Y-R-P+1)/2 red half-gems.
Y yellow half-gems.
(N+B+1)/2 blue half-gems.


[top]Cost of the Chaotic Requirement


Now, without any meta requirement at all, we'd socket pure red in R+P sockets, purple in B sockets, and orange in Y sockets. The resulting allocation is:

2(R+P)+B+Y = N+R+P red half-gems.
B blue half-gems.
Y yellow half-gems.

Result: the number of red half-gems I pay for the Chaotic requirement is:
1) if R+P >= Y: R+P+1.
2) if R+P < Y: (Y+R+P+1)/2.

Similarly, we can compute the shift between blue and yellow gems using the above lists. I won't spell it out here for reasons of length, because the effect is very small and much less significant than the effect of red gems. For the most part, all of the red half-gems "paid" must be turned into blue.

If you know the difference in value between a red half-gem and a blue half-gem for your class (i.e. the difference between 20 Int and 20 hit rating), you can use this result to know whether the Chaotic benefit is worth the red gems turned into blue.


[top]Socket Bonuses


In case A above (R+P >= Y), we've the maximum N-1 red half-gems possible. Therefore we know that there is no potential benefit to ignoring any socket bonuses.

What about case B? It might be worth it to ignore yellow socket bonuses to reach the maximum amount of red. Essentially, if we have two yellow sockets, we can either fill them with orange/green, or with red/green. The latter exchanges one socket bonus for one red half-gem.

So the option to give up a socket bonuses works out roughly the same here as it usually does--it's the tradeoff between one red half-gem and one socket bonus. The only thing to note here is that it's only worth considering if you have unpaired yellow sockets.


[top]Conclusions


Here is a formula for gemming optimally to meet the Chaotic requirement:
1) Put one green gem into a yellow socket, and one red gem into a red or prismatic socket. Only socket red and green gems in pairs--in other words, keep the amount of each that you socket in this step balanced.
2) Repeat step 1 until you run out of either yellow sockets or red/prismatic sockets (again, keeping the number of red/green that you socket equal).

If you ran out of red/prismatic sockets first in step 2 and still have yellow sockets left:
3A) Socket a purple gem in all remaining blue sockets.
4A) Socket a green gem in one remaining yellow socket.
5A) You should now have only yellow sockets left. If the number of open yellow sockets is odd, socket one yellow or green gem (depending on which stats are best for your class).
6A) You now have an even number of yellow sockets open. Socket half of these (round up) with green.
7A) Socket the remaining yellow sockets with either red or orange gems, depending on whether the socket bonuses are worth it for your class. End.

If you ran out of yellow sockets first in step 2, or you ran out of red/prismatic and yellow sockets simultaneously:
3B) Socket one blue or green gem in a blue socket (depending on which stats are best for your class).
4B) If blue gems are better for your class than yellow gems (for example, if hit rating is better than haste/crit/mastery), OR if you have no red sockets left, skip to step 6B. Otherwise, continue to step 5B.
5B) Continue as you did in step one, socketing red/green gems in pairs (with the greens going into blue sockets now) until you run out of red/prismatic sockets for red gems.
6B) You should have only blue or only red sockets left. Socket purple gems in all of them. End.


Finally, here is a rule of thumb for determining whether a Chaotic meta is worth it at all:
1) Count the number of red and prismatic sockets in your gear. Call the total X.
2) Imagine that the Chaotic requirement is that you have to swap out all of your X pure red gems (that you would ordinarily have) for X purple gems. If that trade would be worth it, use Chaotic and follow the above steps. If not, gem normally and use a different meta.
Posted in Math
Comments 8 Email Blog Entry
Total Comments 8

Comments

Old
Adoriele's Avatar
[edit] Ignore me, had my equalities reversed.
Posted 11/15/10 at 4:26 PM by Adoriele Adoriele is offline
Old
Step 3B should read "blue or green (depending on which is better).

In theory someone (probably leveling) could have no Blue sockets and 50% or more Red plus Prismatic. In that case the 3B gem should go into a prismatic slot (or if you are too cheap to buy a belt buckle, into a red slot).
Posted 11/15/10 at 4:58 PM by Erdluf Erdluf is online now
Old
Hamlet's Avatar
Hmm, yeah. That's kind of an annoying case. Technically I'd have to reword steps 1 and 2 to make sure you don't fill up all your sockets.
Posted 11/15/10 at 5:04 PM by Hamlet Hamlet is offline
Old
Cdin's Avatar
I was working on it in your original format. I think it's a little easier to understand then your conclusion, but then again that may be because I've been thinking about it for an hour.

1) Let R be min (number of red+prismatic sockets , blue+yellow sockets - 1 ).
2) Put R red gems into red/prismatic sockets.
3) If there are still red/prismatic sockets left over, put purple in them.
4) Let Y be Min(R+1, yellow sockets)
5) Put Y green gems into yellow sockets.
6) Put R-Y+1 blue gems into blue sockets -- Meta requirement now satisfied.
7) For each remaining pair of blue/yellow sockets, socket one blue and one orange gem.
8) If yellow are left, fill with half green and half orange, favoring Green if odd number. If blue are left, fill with purple.

The only time it brakes down as far as I can tell is if you have all red sockets which is highly unlikely. You also won't be able to have a perfectly balanced meta requirement if you have zero blue sockets and and odd number of yellow sockets that total more then your Red/Prismatic sockets.
Posted 11/15/10 at 5:10 PM by Cdin Cdin is offline
Old
Cdin's Avatar
@Erdluf

I see how Hamlet's logic has an issue there, but in reality that situation would only be problem if you had all red sockets. Otherwise you would want to use a yellow socket to count as your +1 Blue.

I think the logic I posted accounts for your problem.
Posted 11/15/10 at 5:17 PM by Cdin Cdin is offline
Updated 11/15/10 at 5:24 PM by Cdin
Old
I posted an algorithm for this on my site. I think it comes out to the same results as yours, but I think mine is a little easier to follow.

Requirements for Cataclysm Chaotic Meta-gem
Posted 11/18/10 at 9:33 PM by GSH GSH is offline
Old
Hamlet's Avatar
At least at a brief glance, both of the above two methods are isomorphic to mine, except in that they don't contain the content of my 4B and 5B--selecting between blue and yellow in the event that you have leeway. Now is this arguably unimportant, since reforging will probably make the decision completely moot. Maybe a general gemming/reforging guide shouldn't bother with that part.

Other than that, I think none of the 3 posted options is particularly simpler than the others (they're nearly identical); I was just more wordy and tried to avoid using math expressions explicitly.
Posted 11/19/10 at 2:03 AM by Hamlet Hamlet is offline
Old
The current design has been reconsidered, so we're planning to revert gems that now require more blue than red gems back to their original requirements. Such a change can't be accomplished via a hotfix though, so we'll have to wait to revert these in a future patch.

MMO-Champion BlueTracker ~from blue post
Posted 11/24/10 at 12:37 AM by Akastair Akastair is offline
 
Total Trackbacks 0

Trackbacks