Beruflich Dokumente
Kultur Dokumente
Howtodetermineexpectedimprovementcostsandgains
Introduction
Thisdocumentismeantasaguideonhowtoaccuratelycalculatetheexpectedvaluesofthe
costsandgainsofenchantingitemsinDiablo3.Theguidemostlyaddressesambitiousplayers
withalreadyreallygoodgear,suchthatthetimerrequiredforthecalculationissmallcompared
tothetimepotentiallywastedonmaxingoutenchantmentpossibilitiesinthewrongorder.It
introducesandappliesthemathematicaltoolsthatarealsoaprerequisitetoamoredifficult
itemreforginganalysis.
Thefollowingcalculationsrequirethespecificaffixchancestobeknowninordertobe
applicable.Fortunately,theyhavesuccessfullybeendataminedandcanbelookeduph
ere.
Withoutthisgreatachievement,noaccurateanalysisonthissubjectwouldbepossible.
AffixRolls&EnchantingBasics
WhenanitemisgeneratedinDiablo3,acertainnumberofstatscalledaffixesarerandomly
chosenforitfollowingaweightedprobabilitydistributioncomprisedofalleligibleaffixes(which
canbelookedupatd3plannerforinstance)eachwiththeirspecificweightfromthepreviously
linkedtable.Whenanaffixischosen,itisremovedfromthepoolforthisitemandcantroll
twice.Thisalterstheprobabilitydistributionofthesubsequentrollsandmeansthattheentire
sequenceofrollsforallaffixslotsofoneitemisnotasequenceofindependentandidentical
randomprocesses.Thesequenceasawholeinsteadfollowsaweightedhypergeometric
distribution,butusingthecombinedinformationofeligibilityandweightsofeachaffixforeach
item,thepreciseprobabilityofacertainsetofaffixesonacertainitemcanbecalculatedasthe
sumofallthesetspermutationsprobabilities.Thisismostimportantforrerollingitemsasa
whole,butthroughthepresentationofachoicebetweentworolledaffixeswhichcannotbethe
sameduringenchantment,itbecomesrelevanttoenchantmentaswell.Enchantingcan
presenttwoincompatibleaffixes,butnevertwoidenticalones.
Furthermore,affixesareseparatedintwocategories,primaryandsecondary.Theydont
influenceeachotherexceptandthisisimportantifResistancetoAllisrolledasprimary,
singleelementalresistancescannotberolledassecondary.Strictlyitisnotknownandnot
backedupbystatisticaltestingwhetherthesecondaryaffixesarerolledfirstandasingle
resistancerealizationrestrictsallresistance,orprimariesarerolledfirstandanallresistance
realizationrestrictssingleresistances,butthenamingasprimaryandsecondaryaffixes
stronglysuggeststhelattertobethecase,whichhencewillbeassumedtobethecasefrom
nowon.
Thereareseveralinstancesofaffixesinthesamecategorybeingmutuallyexclusive,like
elementaldamagebonusesonbracersandamuletsandweapondamageonweapons.In
thesecases,arealizationremovesnotonlytherealizedaffixitselffromthesetofeligible
affixesbutalsoothersforsubsequentrolls.
Apartfromdecidingwhichaffixesarechosen,thegamealsodecidesthevaluesofeachaffix.
Thesefollowauniformdistribution,meaningthateverypossiblevalueisequallylikely.
Probability&MathBasics
Thischapterisabriefintroductiontothediscreteprobabilitycalculustoolsweneedforthis
analysis.
DiscreteRandomVariables,ExpectedValue
LetXbeadiscreterandomvariablethatmayassumeanyvaluexiwithprobabilitypifora
countable(notnecessarilyfinite)numberofpossiblevalues.
ThenE [X]
= pi * xi istheexpected(oraverage)valueofthatrandomvariable,ifthe
i
sumexists.Itisalsothebarycenteroftheunderlyingprobabilitydistribution.
Benefit&Efficiency
Notatraditionalsubjectofmathematicsbutimportanttoourapplicationtovideogamesisthe
considerationofbenefitandefficiencyofcertainstatincreasesforcertaincosts.
Benefitmeanstherelativeincreaseofaconsideredvaluefunctionduetotheincreaseinthe
stat.FormostsimplestatsinDiablo3,wecantakeDamageandToughnessasthevalue
functionsinquestion,withnotableexceptionsbeingattackspeed,cooldownreduction,
resourcecostreductionandresourcegeneration.Ingeneral,wehaveben
newvalue
oldvalue
1 .
Ifcompetingupgradeswithdifferentbenefitsandcostsaretobecomparedinregardsto
efficiency,therearetwowaystodefineametricforit:
ef f =
ben
cost andef f
1 + ben 1 .
cost
Itisoftendifficulttodistinguishwhichistheproperonetouse,andinfact,notevenclearon
thesubjecttreatedhere(enchanting/rerollingefficiency).Moreonthislater.
Ifanactualbenefitisnotcertainbutsubjecttoarandomvariable,weconsidertheexpected
benefitinstead.
TheCalculation
IntroductoryExample
Wehavetwodiceandstartrollingthem,onlyoneatatime,whilereservingtheother.Wetry
togethighernumbersandafterrollinganotherdie,wecanchoosetokeeptheoldoneorthe
newone,whicheverwasbetter,andrerolltheotherone.Thefirstnumberrolledis4.Whatis
theexpectedbenefitofthenextroll?
ben =
1
6
* (0 + 0 + 0 + 0 +
1
4
2
4)
1
6*4
6 4
* i=
i=1
1
6*4
(6 4)* (6 4+1)
2
2*3
6*4*2
= 1/8 = 0.125
GeneralizationtoBenefit
Wecangeneralizethistoanyuniformrandomvariablewithlowerbounda,upperboundb,
andpreviousmaximum(currentvalueonwhichwetrytoimprove)x0.Ourexamplesimply
usedthevaluesa=1(lowestnumberonadie),b=6(highestnumberonadie)x0=4(initialroll).
ben =
1
(b a+1)* x0
b x0
* i=
i=1
(b x0 )* (b x0 +1)
(b a+1)* x0 * 2
Furthermore,wewanttogeneralizetohaveeligiblevaluesfromatobnotwithafixedstep
sizeof1,butanygivenstepsizes.Aftersometransformation,weget:
ben =
(b x0 )* (b x0 +s)
(b a+s)* x0 * 2
Thelastthingthatisspecificandoughttobegeneralizedinthisformulaishowthevalueis
measured.Inthiscase,wehadtherandomvariableitselfbeingimmediatelyequaltothevalue
functionusedtocalculatethebenefit,whichresultedinhavingx0inthedivisor.Usuallythough,
thevalueisnotaproportionalfunctionoftherandomvariable(theaffixontheitemweare
rerolling),butjustalinearone,meaningthatithasaconstantoffsetwhichdoesnteliminatein
thefraction.Agoodexampleofthiswouldbethecritstats,CriticalHitChanceandCriticalHit
Damage.Bothcontributelinearlytodamage.Thismakesthebenefitofafixedincreaseccb:
bencc =
1+(cc+ccb)* cd
1+cc* cd
1=
1+cc* cd+ccb * cd
1+cc* cd
1=1+
ccb * cd
1+cc* cd
1=
ccb * cd
1+cc* cd
ccb
1
+cc
cd
andexchangingccbwithcdb,ccwithcdandcdwithccforthereversecase(bonusoncrit
damage).
Replacingxo
inthedivisorwiththenewdivisor(cc+1/cd)forcritchancebonusesor(cd+1/cc)
forcritdamagebonusesgivesustheexpectedvalueofthebenefitofrerollingacritstat,i.e.
undertheconditionthatanenchantmentrolloffersthecritstat,whatitsexpectedbenefitwill
be.Togettothegeneralexpectedbenefitofrollingtheenchantmentinthefirstplace,westill
needtomultiplythesofarobtainedbenefitwiththeprobabilityofbeingofferedthemissingcrit
statonenchantmentroll.
EnchantmentProbabilities
Eachtimeweenchant,werebeingpresentedtwononidenticalaffixesfromtheeligiblepool.
Rememberthataffixchancesareweightedaccordingtotheinitiallylinkedtable(notethatthe
weightsareallmultiplesof100,sodividingallofthemby100willmakeactualcalculations
easier).
Whentheenchantmentisrolled,thefirstonecouldbethedesiredaffix,orifthiswasnotthe
casethesecondonecouldbeafterthefirstonebeingeachoftheothereligibleaffixes.
Suppose4eligibleaffixesA,B,C&DwithspecificweightswA
,wB,wC&wDandwTbeingthe
sumofallofthem.WewanttheD.Thetotalprobabilityofitbeingofferedis:
pD =
=
wD
wT
wD
wT
w A *w D
w T * (w T w A )
* (1 +
i=A,B,C
w B *w D
w T * (w T w B )
wi
w T w i )
wD
wT
w C *w D
w T * (w T w C )
* (1 +
1
)
1
i=A,B,C wi
wT
Thesumiteratesonallaffixesinthepoolwiththeexceptionofthedesiredaffixitself,asthisis
alreadyincludedinthefirstsummand.Aspractically,therearemanyeligibleaffixesandmany
ofthemhaveequalweights,itisoftenfeasibletogroupequalweightstogetherandinsteadof
consideringthesetofindividualaffixes,considerthemultisetofaffixweightsinstead,with
multiplicitiesexcludingthedesiredone(whileitsstillincludedinwT
):
pD =
wD
wT
* (1 +
i
mi
wT
wi
Unfortunatelytherearenogeneralsolutionstothisforanitem,astheresultdependsonwhich
otheraffixesarerealizedontheitembeingenchanted,notjustwhichitemitis.Letsconsider
anexamplenevertheless:
Focus/Restraintwithasocket,mainstatandcritchanceenchantingforcritdamage.Eligible
affixesopen:
15weapondamage
40Vitality
10armor,resall*,life%,lph,lps,asi,chd,ad,cdr,rcr
Resallisonlyinifthereisnosecondarysingleresistancerolled.
wTisthen15+40+10*(9or10)=145or155.
Theprobabilitythatoneofthetwopresentedaffixesiscritdamageisthen:
pCHD =
10
{145,155}
* (1 +
{145,155}
1
40
{145,155}
1
15
{9,10}
{145,155}
1
10
) = {14.917%, 13.836%}
Multiplyingthiswiththepreviouslyevaluatedbenefitwouldyieldthecorrectedexpectedbenefit
foroneenchant.Tofinishtheexample,supposewehave50%critchanceand500%crit
damageincludingthecurrentenchantedvalueof35%.Alsoletsassumethereisasecondary
resistancefixed.Thenwegetfortheexpectedbenefit:
ben = 0.14917 *
= 9.836 * 104
Thisiswhatwecancomparetoothervaluesforotherequipmentpartsthatarestillnot
enchantedtotheirmaximumtodecidewhichshouldbeprioritized.
Ifthepricesforenchantingorrerollingcompetingitemsdiffersinarestrainingresource,the
properefficiencymetricoughttobeusedforthecomparisoninstead.
TotalReforgingProbabilities
Whenanentireitemisrerolledratherthanjustoneofitsaffixes,regardlessofwhetherthisis
achievedthroughreforgingorobtainingitanewbyanymeans,thetotalprobabilityofany
desiredaffixconfigurationcanbedeterminedwithacalculationverysimilartothatfor
enchantingasingleaffix,withsomeslightbutimportantdifferences.
Theaffixconfigurationcanbevisualizedasarandomprocessofasmanyconsequentialsteps
asthereareaffixestoconfigure.Becausedifferentpermutationsofthesamecombinationof
affixescanhavedifferentprobabilities,theycantbegroupedtogether.Thetotalprobabilityof
anycertainaffixconfigurationishencethesumoftheprobabilitiesofeachofitspermutations.
Thoseinturnarecalculatedjustlikeenchantmentprobabilities,butwithmorethantwosteps,
andwithincompatibleaffixessubsequentlyexcludingeachothertooratherthanjustidentical
ones.
Thenumberofsummandsthathavetobeincludedgrowsconsiderablyastheoptionof
enchantingintroducesnewdegreesoffreedom.Ingeneral,supposemdesirableprimary
affixesshallberealizedonanitemwithmprimaryaffixslots.Thenoneneedstoconsiderall
subsetsofsizem1ofthesetofdesiredaffixes,andallpermutationsforeachofthesubsets
enhancedbyonevariableposition(whosenumeratoristhecomplementtothestillavailable
desiredaffixescombinedweightinthetotalavailablecombinedweight,andthefollowing
denominatorbecomestheexpectedvalueoftheremainingweightafterthisvariabledraw).If
someaffixesarepredefinedontheiteminquestion,onlytheremainingrandomaffixslotsare
tobeconsidered.Ifoneofthepredefinedaffixesisnondesired,itdemandsandconsumesthe
enchantingoptionandhencerequiresalltherandomaffixesonthatitemtobedesiredones,in
whichcaseonestillhastoconsiderallpermutationsofm1subsetsofthemdesiredaffixes(to
check,therearem1randomaffixslots),butwithoutthevariablewildcardslots.Toprovethe
exhaustivenessofaproposedterm,onemaycheckthatthenumberofconsideredsubsetsof
sizem1fromthesetofsizemisindeedexactlym(becauseanyoneofthemitemsintheset
maybeleftout).Inshort,allbranchesoftherelatedprobabilitytreewhichyieldarealization
thatthroughenchantingcanbetransformedintothedesiredrealizationhavetobetaken
exactlyonceandaddedtogether.Equallyprobablebranchesmaybegrouped.
Example:ObtainingaHellfireAmuletwithcritchance,critdamage,acertainelemental
damage,aslotandadesiredpassive(assuming19passivesfortheclass,e.g.Barb,DH).
10
19
10 * 10
* ( 205*195 * 2 +
10 * 10
)
205 * 165
= 0.4189% = 238.71
1
Inthiscase,sincethevaluesoftheaffixeshaventbeenconsideredyet,thetwocritstatscould
begroupedtogetherastheyhaveequalweight,andifelementalcomesseconditalsoyields
thesamebranchprobability.Elementalfirstgivesahigherchance,however,becauseit
eliminatestheotherelementsfromtheaffixpoolaswellforthesecondpick.Secondaryaffixes
havebeendisregarded.So,onaverage,foraclasswith19passives,oneoutof~238.7
craftedHellfireAmuletswillhaveadesiredpassiveandasetofprimaryaffixesthatcan,
throughenchanting,betransformedinto{critchance,critdamage,elementaldamage}forone
specificelement.
Wecantakethisexampleastepfurtherbyincludingthevaluesandaskingfortheprobability
ofapotentiallyperfectHellfireAmulet(intermsofprimaryaffixes,i.e.notrequiringittobe
ancientandnotposingrequirementsonthesecondaryaffixes).Forthis,bothrolledaffixesare
requiredtoberolledontheirmaximumvalue,sincetheenchantmenthastobeusedto
transformtheprimaryattributeintothethirdmissingaffix.Astheprobabilitydistributionover
possibleaffixvaluesisbelievedtobeuniform,theprobabilityofanyindividualpossiblevalue,
includingthehighestone,isgivenby:px = bsa+s inaccordancetopreviousvariabledefinitions.
ForapotentiallyperfectaffixedHellfireAmuletwehenceget:
5
10 10
0.01
0.005
10 10
10 10
p = 19
* (2 * 205*195 * 10.51+0.01 * 0.10.08+0.005 + ( 205*195 + 205*165 ) *
10*10
+ ( 205
195 +
*
*
10*10
205*165 )
0.005
0.10.08+0.005
0.01
0.20.15+0.01 )
*
5
19
4
* ( 199,875 +
0.01
0.01
10.51+0.01 * 0.20.15+0.01
8
16
4
439,725 + 87,945 ) = 5.793 * 10
= 17, 261.931
Meaningthatonaverage,oneoutofabout17,262craftedHellfireAmuletswillhavetwo
perfectprimaryaffixesfrom{critchance,critdamage,element}whereelementisonespecific
elementyoudesireandausefulpassive.Noneoftheaffixesbenefitsfromtheitemrolling
ancient,butifyouweretoimposethisrequirementaswell,theprobabilityisfurtherdivided
through10,meaningonlyoneoutof172,619amuletsfitsthem.Onasidenote,lookingatthe
conditionalprobabilities,suchanamuletwillhaverealizedcritchanceandelemental82.64%
ofthetimeduetotheprobabilityofcriticaldamagerollingperfectlybeingsolowcomparedto
theothers.
TheHellfireexampleshowshowvariousrequirementsandaspectscanbelogically
incorporatedintoaprobabilityformula:
Mathematicaloperation
Logicalmeaning
Multiplication(a*b)
bothaandb.Connectingrequirements,onlyaccepting
theirintersection.
Addition(a+b)
aorb(inclusiveor).Theunionofthetwocriteria.
Division( ba )
aoutofb.Onlymakessenseifaisasubsetofb,
returnstheratioofthemagnitudesofsubsetaandsetb.
Subtraction(ab)
awithoutb.Onlymakessenseifbisasubsetofa,
returnsthecomplementtobina.
Furthermore,theexamplehighlightstheminisculechancesofperfectgearandthattryingto
obtainitismostlyfutile.Instead,wewanttograsptheprobabilitiesofallrealizations
constitutinganimprovementoverstatusquoandincorporatethosewiththeirbenefit
magnitudesintoexpectedbenefits,muchlikewedidintheintroductoryexample.
BenefitFunctionsforVariousAffixes
Inordertoevaluatethebenefitsofincreasesofcertaincharacterstatsthroughitemaffixes,
theircontributiontothethreevaluefunctions(damageoutput,toughnessandrecovery)have
tobeexamined.UnfortunatelythesecannotbeunifiedasbeatingacertainGreaterRiftlevel
posesrequirementsonbothyourdamagepotentialandyoursurvivability(bothinregardsto
burstdamageandsustaineddamage)whichcannotreallybecompensatedbyeachother.
Dependingonwhetherdyingtoooften(suddenlyorovertime)ortakingtoomuchtimetokill
enemiesiswhatlimitsyourprogress,increasingtherespectivevaluefunctionshouldbe
focused.Thegeneralstructureofthesevaluefunctionsis:
T oughness = H ealth ((incomingdamagemultipliers))
Recovery = ((healingpertime)) ((incomingdamagemultipliers))
D amage = ((damagepertime)) * (generaloutgoingdamagemultipliers)
Thesummandswithinthesuminthedamageformulaare,inreturn,products.Mostofthem
usuallysharealotoffactors,whichmaythenbefactorisedintotheexternalproduct.An
exampleofthiswouldbethemainstatdamagemultiplierthatisacommonfactortoalmostall
sourcesofdamage,theonlyexceptionIknowofbeingDeathsBargain.Itshouldbe
mentionedthatthesevalueandhencethebenefitcalculationscantbeexactbecausethey
partiallyrelyonvariableswhichhavetobeestimated.Aprominentexampleofthisishow
manyenemies(onaverage,weightedwiththeirhitpoints)arehitbyacertainskillorthearea
damageeffectittriggers.Anotherexamplearesingleelementalresistances,theserequire
accurateproportionsoftheincomingdamageelementtypestobeproperlyevaluated,yet
theseproportionsagaincanonlybeguessed.Nevertheless,moststatscanbeexaminedwith
satisfyingprecision.Inthischapter,therelativebenefitsofincreasesinallstatsinregardto
thosevaluefunctionswillbedetermined.Characterlevel70isassumed.Xisalwaysthe
increaseintheexaminedstat.
Strength
StrengthincreasesthecharactersarmorbyoneperpointandthedamageofBarbariansand
Crusadersbyonepercentagepointperpoint,almostnoexceptions.Onlyaminisculedeviation
ifDeathsBargainisused,andpossiblysomeotheroddoldlegendaries.
benT = benR = 3500 +A x +Dex
equip
AM
+Str
SM
benD(Barbarian,Crusader) =
x
100
+Str
SM
WhereAisarmor,AMisarmormultiplier(e.g.fromparagon,ToughasNails),SMisstrength
multiplier(asfromFinery), istheminisculedeviation(maybeneglected).
Dexterity
DexterityworksthesamewayasStrength,onlythatitsdamageincreaseappliestoMonks
andDemonHuntersinstead.
x
benT = benR = 3500 +A +Str
equip
*SM +Dex
AM
benD(DemonHunter,M onk) =
x
100+Dex
Withhomologuevariabledefinitions.ThereisnoDexteritymultipliercurrentlyimplementedinto
thegameasofmyknowledge,hencenosuchvariableappearsintheformula.
Intelligence
IntelligenceincreasesthedamageofWitchdoctorsandWizardsbyonepercentagepointper
point.Italsoincreasestheresistancesagainstallelementsby0.1perpoint.
x
benD(W itchdoctor,M age) = 100 +I
nt
IM
elements
benT ,R =
( 350+(R
i
elements
)
IM
o,i +Int* 10 )*RM
( 350+(R
i
wi
wi
)
IM
o,i +(Int+x)* 10 )*RM
WhereRo,iarethetotalresistancestoelementifromothersourcesthanIntelligence,before
multipliers.IMisIntelligencemultiplier(GruesomeFeast),RMisResistancemultiplier(e.g.
MantraofSalvation),wiarethespecificweightswithwhichelementiistobeconsidered.
Evaluatingtheserequiresestimatingtheproportionsofincomingdamageelementsagainst
eachother.Ifanelementalimmunityamuletisused,theweightforthatelementcanbesetto
0,whichisequivalenttosettingtheresistanceagainstthiselementtopositiveinfinity.
Iftheresistancesagainsteveryelementareverysimilar,thedefensivebenefitcanbe
approximatedby:
benT ,R I nt+ 10 x(R + 350 )
IM * o RM
Sincethepossiblesourcesfordeviatingsingleresistancesarerestrainedtothelimited
secondaryaffixesongear,whereasIntelligenceasasourceforcommonresistancetoall
elementsgrowswithparagonlevel,theactualbenefitwillapproachthisvalueathigherlevels.
ForRo,the(mean)ResistanceagainstallelementsfromothersourcesthanIntelligence,any
meanvaluecanbeusedsincethepremiseofthesinglevaluesnotdifferingmuchfromeach
othermakesthedifferencesbetweenvariousmeanmetricsminiscule,andusinganelaborate
meanmetriceliminatesthepracticabilityofaneasyapproximation,tothepointwhereonemay
aswellusetheexactformulainstead.Forthesakeofcompletenesshowever,thebest
standardmeantobeusedonthisoccasionistheHarmonicmean(optionallywithweightsfor
theelements),andtheoverallbestpossibleevaluationforthemeanResistanceis:
w
Rmean = wii 350
350+Ri
AllthosedefensivelybeneficialpropertiesofIntelligenceareequivalenttoResistancetoAll
Elements,exceptfortheinvolvementofanIntelligencemultiplier.
Armor
ThisisequivalenttothedefensiveaspectofDexterityandStrengthsincethosealsoincrease
armor,justthatastrengthmultiplieronlyaffectsarmorfromStrengthandnotfromitemaffixes.
benT ,R = 100x+A
AM
Here,Aisthetotalarmorfromallsources(Dexterity,Strength,items)beforemultipliers.
ResistancetoAllElements
SeeIntelligence.Thistimehowever,resistancesdonthavetobedividedintotheirIntelligence
andotherparts,respectively.Instead,theentiretyofIntelligenceafteranymultipliercansimply
beincludedinthecurrentresistancevalue,onlyresistancemultipliersstandseparate.
elements
benT ,R =
( 350+Ri*RM )
i
elements
wi
( 350+(R +x)
RM )
i *
Again,theapproximationforsimilarvaluesofeachsingleelementalresistanceisapplicable
underthiscondition:
benT ,R 350 +Rx
mean
RM
WithRmeandenotingtheircommonmeanvalue,thebestmetricforwhichcanbefoundunder
Intelligence.
Vitality
EachpointofVitalityincreasesmaximumlifebeforetheLife%multiplierby100.Therealsois
asmallconstantamountofmaximumlife(beforethemultiplier)of316atlevel70.
Unlikeallpreviousdefensivestats,VitalitydoesnotapplytoRecoveryinthefullextentasit
appliestoToughness:Vitalityonlyincreasesthosecomponentsofhealthrecoverywhichare
linkedtoafractionofmaximumhealthasopposedtoafixedamount,hencethereturnon
Recoveryissignificantlydiminished.
Vitalityalsodoesntaffectdamageimmediately,onlyindirectlythroughafewlegendaryitem
affixes.ThemostnotablecaseofthisisHeartofIronbeinganintegralparttoallThorns
Crusaderbuilds,thereforeitsincludedhere.
x
benT = V it+3.16
x
benR =
ratef lat
V it+3.16+ rate (1+Lif e%)
%*
benD(Heartof I ron) =
T o +W D* W DM
T DM
it+
r HoI
WhereVitisVitality,rate_flatistheamountoflifeyouregainpersecondindependentofyour
maximumlife(fromLPS,LPHetc.),rate_%isthetotalrateatwhichyouregainapercentage
ofyourhealthin%/sec(fromhealingpotionsandabilitieswith%healsnotethatwhenthisis
0,theformulabecomesinvalidandthebenefitforRecoveryfromincreasedVitalityis0
instead),Life%isanypercentagebonustoyourmaximumlife(fromaffixesandparagon)asa
decimalfraction,T_oisflatThornsdamagefromothersources,WDisweapondamage,
WDMisweapondamagemultiplier(howmanytimesyourweapondamageyouapplypertime
indamageoutputafterall),TDMisyourthornsdamagemultiplier(howmanytimesyour
thornsdamageyouapplypertimeindamageoutputafterall),andr_HoIisthe
VitalitytoThornsconversionrateofyourHeartofIronasadecimalnumber(i.e.from2.5to3,
notin%).
Life%
SimilarlytoVitality,Life%asastatprimarilyonlyaffectsToughnessandonlyextendsabenefit
toRecoveryif%ofmaxlifehealingispresent.Asofmyknowledge,thereisnosourceoftotal
lifetodamageconversionimplementedatthecurrentstate,soLife%isapurelydefensive
stat.
benT = 1+Lifx e%
x
benR =
ratef lat
1+Lif e%+ rate (V it+3.16)
%*
KeepinmindLife%isadecimalfractionwhereasrate_%isin%/sec.
CriticalHitChance&Damage
Anydamageoutputthatisbasedonweapondamageprofitsfromcriticalhits,whileany
thornsrelateddamagedoesnot.Criticalhitsarepurelyoffensive.
benD,cc = cc+ 1 + xT D*T DM
cd W D*W DM
benD,cd = cd+ 1 + xT D*T DM
cc W D W DM
*
NotethatunlikeintheHeartofIrondamagebenefitformula,weapondamagemultiplierhere
doesnotincludetheaveragecriticalhitdamagemultiplier.Thethirdsummandinthe
denominatorindicatestheratioofnetthornsdamageoutputtonetweapondamageoutput
andisusuallyeitherverybig(Thornsbuild),sothebenefitofcritgetscloseto0,orverysmall
(weapondamagebuild),inwhichcasethisthirdsummandcanbeneglectedandthebenefitof
critgetsclosetoc1+x 1 .Hybridbuildsareveryuncommon,butthisformulaallowstocalculate
c2
benefitsforthemnevertheless.
LifeperSecond
Lifepersecondisapassive,unconditionalandcontinuouswayofregeneratinglife.Itonly
benefitsRecovery,inawaythatisstraightforward:
x
benR = regenpersecond
Wherethedenominatoristhesumofalltheliferegenerationratespersecondfromallsources
includingLPSwithoutthenewamountx.LPH*hitspersecondisonesummand,asisany
healingeffect,theaverageintakefromhealthorbs,healingpotions,etc.
LifeperHit
SimilarlytoLPS,LPHisapurelyregenerativestatistic.Itsactualincreasetonominalhealth
regenerationperseconddependsonthecharactersactualhitspersecond.Assuch,it
practicallyonlycontributestotherecoveryofbuildswhichmakeuseofagenerator/normal
attackasopposedtowaitingforcooldownsandonlyattackingwhentheirdamageskillisup.In
thelattercase,thebenefitofLPHdependsmoreontheactualcooldownoftheabilitybutcan
begenerallyconsideredtobeclosetononexistent.Hencethefollowingformulaisforbuilds
thatdohaveanormalattackanddoattackcontinuously.
benR = LP H+ regenfxromothersources
AttacksperSecond
Weapondamage
Thebenefitofweapondamageisentirelyoffensiveasoflevel70duetothecomplete
disablingofLifestealeffects.Inaccordancetopreviousvariabledefinitions,wehave:
benD = W D+ TxD*T DM
W DM (1+cc cd)
*
Similartocriticalhitstats,thisbenefitgetscloseto0inThornsbuilds,wheretheThorns
DamageandtheThornsDamageMultipliermakethedenominatorverylarge.ForWeapon
buildsontheotherhand,thesecondsummandinthedenominatorcanbeeffectivelytreated
as0,suchthatthebenefitisthensimplyalmostWxD .
Theonlyanomalywiththecalculationofweapondamagebenefitsisthattheabsoluteincrease
amountitselfisnotstraightforwardtocalculate,sinceaweapondamageaffixconsistsofboth
alowerandanupperbound,whichbothareuniformrandomvariables.Theeffectofweapon
damagecaneasilybetreatedusingtheexpectedvalue,foragivenpairofminandmax
damagethisissimplymin+max
,thearithmeticmeanofthebounds.Duetothelinearityof
2
expectation,weapondamageamountsfromdifferentsourcescanbeaddedtogetherthisway
aswellwithoutanyproblems(treadingweapondamageasarandomvariable):
n
E [W Dtotal ] = E [W Di ] =
i=1
1
2
mini + maxi
i=1
Thismakesitrathersimpletoevaluatethemaximumbenefitthatcanbeobtainedbyiteratively
enchantingweapondamageonagivenitemusingtheabovebenefitfunction,asthehighest
valuexisthesumofthedifferencesbetweenhighestandcurrentminimumandmaximum
damage,dividedbytwo.
Forexample,assumeaweapondamagebuildwherethecurrentweapondamageonthe
weaponis18002000,andweapondamageisalsorolledononeancientringas90170,such
thatitcouldbeincreasedupto105210.Thentheaveragecurrentdamageis
1800+2000+90+170
= 2030 ,anditcouldbeincreasedbyupto105+210290170 = 27.5 .Sincethebuildis
2
focusedonweapondamage,thepotentialbenefitis27.5/2030=0.01355=+1.355%.Thiscan
becomparedtothepotentialbenefitofenchantingothernonperfectaffixesonthatring
insteadtoseewhichoneshouldbechosen.
However,whilethepotentialandtheexpectationbehaveregularly,itisimportanttonotethat
theexpecteddamageitselfisnotauniformrandomvariablelikealltheotheraffixstatsweve
analysedsofar,butratherthesumoftwouniformrandomvariables.Assuch,whilethebenefit
functionisindeedcorrect,theenchantmentprobabilitiesformulaedonotapplyhere,asthey
weredefinedforuniformlydistributedstats.
Withmeanvaluesclosertothecenterofthedistributionbeingsignificantlymorelikelythan
thoseattheboundaries,theexpectedcoststoraisethemtotheupperlimitaregreaterthanif
thedistributionwasuniform,makingtheefficiency(notthepotentialbenefit)ofenchanting
weapondamagelowerthantheenchantmentprobabilityformulawouldsuggest.
Inshort,thismeanstheequationshereanswerifweapondamageshouldbeenchantedona
givenitem,butnotyetwhencomparedtootheritems.
Problems
TheEfficiencyDilemma
Apersistentproblemremainswhichefficiencymetricistheproperonetouseforenchanting/
rerollingitemsinDiablo3.Thenatureofthisproblemwillbeillustratedinthefollowing.
Therearetwodifferingwaystointerpretenchantingthesameidenticalitem:
Expectedcostandbenefitofobtainingitwiththedesiredaffixconfiguration.Theaffix
setprobabilityisincludedinthecostbymultiplyingthecostwiththeprobabilitys
multiplicativeinverse(expectedvalueofageometricdistribution).(Highercost,higher
benefit)
Expectedcostandbenefitofobtainingitwithanyaffixconfiguration.Theaffixset
probabilityisincludedinthebenefitbymultiplyingthebenefitwiththeprobability.
(Lowercost,lowerbenefit)
Crucially,sincebothinterpretationsdescribetheverysameoperation(rerolling/enchantingthe
verysameitem),wedemandbothtoyieldthesameefficiencyvalue.Thisisonlytrueforthe
ratioformula.
Ontheotherhand,letscompareoneupgradewithcostequaltothesumoftwoother
upgrades,suchthatforthesamepriceonecouldeitherobtainthefirstoneorthetwoothers
together.Ifthefinalresultofthevaluefunctionisequalforbothcases,thenwewanttheir
efficienciestobeequalaswell,andconversely,iftheirefficienciesareequal,thenlikewisewe
wanttheirvaluefunctionresultstobeequal,too.
Supposewehaveoneupgradecosting2andprovidinga(relative)benefitof3,andtwo
upgradeseachcosting1andprovidingabenefitof1.Thenatthecostof2,gettingeitherthe
firstortheothertwowillyieldafinalmultiplierof4:1 + 3 = (1 + 1) * (1 + 1) = 4
Usingtheratiometric,option1hasanefficiencyof3/2whileoptiontwohas1/1,eventhough
theiroutcomeisthesameandhencetheirefficienciesshouldbethesame,too.Usingtheroot
metric,wegetef f 1 = 1 + 3 1 = 1 + 1 1 = ef f 2 = 1 ,sotheequalityisonlytruefortheroot
2
formula.
Thisleadstotheefficiencydilemma:Neitherefficiencymetricissatisfyingallcriteriaweimpose
onit,warrantingthequestionwhetheradifferentmetrichastobefoundwhichdoes,andifso,
whichitis,orthereareerrorsinourassumptions,andifso,whichtheyare.
Fortunately,thisissuecanbelargelyevadedinDiablo3.Whatwecansaywithoutdoubtis
thatefficiencyisabivariatefunctionofbenefitandcost,withapositivepartialderivative
towardsbenefit,andanegativepartialderivativetowardscost.Atequalcost,theoptionwith
thehighestbenefitishencealsotheonewiththehighestefficiency.Normalizingour
interpretationtotheactofrerollingoncemeanswedoconservetheequalityofcostsacrossall
options.ThiswasalsothemethodshownintheFocus/Restraintexampleintheprevious
chapter,thechanceoftheaffixconfigurationwasincludedinthebenefit,notthecost.
CurrentlyinDiablo3,reforgingorenchantingalegendaryitemcoststhesameamountof
DeathsBreath,ForgottenSoulsandactcachematerials,regardlessoftheitembeing
reforged/enchanted,sothecostisindeedequalandbenefitscanbecomparedinstead.
Thereareafewexceptionstothis:
Craftedlegendaryitems.Thosearecheapertocraftanewratherthanreforgingthem.
Hellfireamulets.Itisfastertoobtaintheingredientstocraftnewonesthantocollect
thebountymaterialstoreforgethem.TocomparethecostofaHellfireamulettothatof
reforgingalegendary,theircosthastobetranslatedtoexpectedamountoftime
requiredtoconductthereroll,whichwillbedifferentandhencerequiresanefficiency
metrictocompare.
Somelegendaryitemsverycommonintheircategory.Insomeborderlinecases,itmay
requirelesstimeinvestmenttoobtaintheDeathsBreathsandordinarymaterialsto
upgraderareitemsofthesamecategoryordrawfromKadalauntiltheitemisobtained
again.Thecostsinsuchcasescanalsobequantifiedusingtheexpectedvalueofthe
underlyinggeometricdistribution(tryinguntilyougettheitemonce,1/p)andtranslated
totimeinvestment,sothecostiscomparabletothatofreforginginprinciple,butstill
requiresaproperefficiencyfunction.
Horadiccachelegendaryitems.Similartocraftedones,itsfastertofarmthemdirectly
asopposedtoreforgingthem.
Apartfromthesecases,thebenefitdilemmacanbesuccessfullycircumventedthroughcost
normalization.
Inthosecasesthough,orwhenindoubtingeneral,Itentativelysuggestusingtheratio
formulauntilthedilemmaisresolved.
MultipleMethodsofAcquisition
Whilereforgingmaybethepreferedmethodofattemptingtoacquirenewversionsofa
desiredlegendaryitem,itisnottheonlyone.Whilecompletingbountiestogainthematerials
requiredforreforging,onealsocollectsDeathsBreathsandBloodshardsinlowerquantities.
Aftereverythinghasbeenenchantedtothemaximum,thoseDeathsBreathscanbeusedto
upgraderareitemsinsteadandBloodshardscanbeusedonKadalatoattempttoobtain
desireditemsthroughothermeans.
Becauseunlikereforging,upgradingandgamblinghavedifferentcostsfordifferentitems,
comparingtheserequiresaproperefficiencyfunction.
Sincetheresourcesforacquiringnewversionsoftheequipmentinmultiplemethodsare
obtainedatdifferentratesgreaterthan0,benefitsandefficienciesforimprovingyour
equipmentviaallavailablemeansistobecompared.Thetoolsprovidedpreviouslycanbe
straightforwardappliedtoanyacquisitionmethod,whichgrantsanefficiencyrankingof
improvinganyofyournonperfectequipmentparts,foreverymethodindependently.
Asmallproblemfromthisindependentconsiderationoccursforexamplewhenoneitemis
clearlythebestoptiontobeimprovedviaonemethod,butonlybyaslimmarginthebestviaa
secondmethod.Inthatcase,itwouldgenerallybeadvantageoustousethesecondmethod
ontheclosecontestorandonlyusethefirstmethodonthatbesttoimproveitem,becausethe
efficiencyatwhichthefirstmethodtranslatesresourcestoequipmentpowerwillfallofffasterif
thesecondmethodsapspotentialforimprovementbybeingappliedontheverysameitem,
whereasifthesecondmethodisappliedtothecontestorinstead,itoperatesatanonly
marginallylowertranslationefficiencyandallowsthefirstmethodtooperateatasignificantly
highertranslationefficiencyforalongertime,henceyieldingbetterresultsinthelongrunby
deviatingfromthelocaloptimum.
Suchgloballyoptimaldeviationsfromlocaloptimathroughdistributiveresourceallocationcan
notbeaccountedforifeachresourceisconsideredindependently.Mathematicalmethodsto
accountforsuchinteractionsinamoreunifiedapproachneedtobedeveloped.
ClosingStatements
Thisdocumentisstillunfinished.Someaffixesbenefitfunctionsarestillmissing.Beyondthat,
thescopeofthisdocumentmerelyscratchesthesurfaceofthetreatedtopic.Myintentwith
thisearlyreleaseistointroducepeopletoandgetthemengagedwiththeinteresting
mathematicalbackgroundofDiablo3.Ihopethisencouragesotherstodealwiththesubject,
andthatitmaygetatheorycraftingcommunitygoingthatissofar,consideringthetremendous
numberofplayersDiablo3has,relativelysmall.
IdliketoclarifythatIdontclaimthisworktobewithouterror,andwouldliketoencourage
inquirywhereveraspectsrequireacloserlooksogoaheadandaskanyquestionsthatcome
up,Imawarethisarticlemaybedemandingattimes.
Makesuretoleavecommentsandquestionsintheredditreleasethread.
Changelog
20160602initialrelease
20160603addedweapondamagebenefit