Some number crunching
#1
Hello Lurkers,

I posted a while ago about my semi-obsession with buying a KSOH from Griswold.
I'm now back to playing Diablo after a (mostly unintentional) break, due in
almost equal amounts to my hard disk's death and the school year starting.

I'm also back to my quest for a KSOH, and after spending most of today shopping,
I thought I'd take another look in The Guide to see if I could figure out what my
chances are, roughly. My character, who I've nicknamed 'shopaholic' is level 29.
I'm hoping that some of your experts can give my calculations a glance and see if
I'm close.

Here's what I came up with:

Given that my char is level 29, the minimum base item qlvl will be 7, and there are 34
possible weapon/armor items that Gris could stock. So there's a 1/34 chance that I'll
get a bastard sword. Sweet.

Next, there's a 16.7% chance that a given magic item will have both a prefix and a
suffix (that directly from The Guide).

Then, there are 24 prefixes in the range of 14-33 (ilvl/2-ilvl+2). It's a little fuzzy
because of the range of Gris's ilvl's, but that's okay with me. So I figure there's a
1/24 chance of getting the "King's" prefix, except that The Guide says the King's
prefix has a double chance. Now, I'm a little unclear on what that double means. I assume
it doesn't just double that particular one, since there are others, so I don't have a
1/12 chance. I assume I have to add all the prefixes that have a double chance onto the
list, and I have a 2 out of however-many-that-is chance. Is that right? If so, then I
have a 1/16 chance of getting the "King's" prefix (2/32).

Lastly, I counted 20 possible suffixes in range.

So, (1/34)*(.167)*(1/16)*(1/20) = 0.00001535

Giving a 1.5 out of 100,000 chance in getting my KSOH. Or, roughly, a 1/66,666 chance. :blink:

I timed myself, and I can visit Gris once every 15 seconds (almost exactly), so thats
4/minute. 66,666 / 4 / 60 = 277 hours to have a decent chance of getting one.

12 solid days of Gris shopping? I have to say that's daunting...

Please let me know if I've read The Guide correctly. Of course I'm hoping that I've
gone astray somewhere and it's really not that bad. I have a nagging doubt that I left
something out and it's actually much worse :(

-mekane

Reply
#2
I'm certainly no expert on the technical aspects of Diablo, but I believe I know one point that may be hurting you.

When Griswold chooses items, the 6 are chosen at a certain iLvl based on a formula, which in turn is based on your character's level.

The first two items iLvl = cLvl - 1, the middle two iLvl = cLvl, and the final two iLvl = cLvl + 1 and cLvl + 2, respectively.

The King's and Haste affixes have qLvls of 28 and 27, respectively. Without knowing the exact conversion from qLvl to iLvl, I can only assume, but it seems to me that your character is not the ideal level, by being too high.
Reply
#3
Quote:Then, there are 24 prefixes in the range of 14-33 (ilvl/2-ilvl+2).

The qlvl range is ilv/2 - ilvl, not ilvl/2 - ilvl + 2. That makes the numbers 14 - 31. Though, this is a moot point since Gris won't generate qlvl's for affixes of more than 30 anyway. You will need to go back and remove any affixes witha qlvl from 31-33 from your calculations though, if there are any.

Quote:I assume I have to add all the prefixes that have a double chance onto the list, and I have a 2 out of however-many-that-is chance. Is that right?

From what I remember (it's been a while since I looked at this), yes, that is correct.

Quote:Without knowing the exact conversion from qLvl to iLvl, I can only assume, but it seems to me that your character is not the ideal level, by being too high.

Completely wrong.

edit:

Mekane - Did you also check that all those affixes can occur on a sword? As any that cannot do not need to be factored into your equation.
"What contemptible scoundrel stole the cork from my lunch?"

-W.C. Fields
Reply
#4
Hi mekane.
I believe that your way how to count final probability is right, but when I looked at it, I got different arguments:

POSSIBLE BASE ITEMS:

Armor -> Leather armor - FPM = 11 items
Axes -> Broad, Battle, Great = 3 items
Bows -> Composite - LWB = 5 items
Clubs -> Flail, Maul = 2 items
Helms -> Helm - Great Helm = 4 items
Shields -> Large - Tower = 4 items
Swords -> Broad - Great = 4 items
-----------------------------------------------------
Total 33 possible items in qlvl range 7 - 30


POSSIBLE PREFIXES: - (D) means double chance to be picked

Platinum (D), Mithril (D), Meteoric (D) = 3
Soldiers (D), Lords (D), Knights (D), Masters (D), Kings (D) = 5
Brutal (D), Massive (D), Savage (D) = 3
Crystal, Diamond, Garnet, Ruby, Cobalt, Saphire, Obsidian = 7
Lightning = 1
----------------------------------------------------------
Total 19 possible prefixes


POSSIBLE SUFFIXES:

Giants, Titans, Sorcery, Precision, Vigor, Heavens = 6
Slaying, Gore = 2
Blood, Vampires = 2
Speed, Haste = 2
Bashing = 1
Ages = 1
-----------------------------------------------------------
Total 14 possible suffixes


Chance that Gris pick Bastard = (1/33)
Chance for prefix and suffix = (1/6)
Chance for Kings prefix = (2/30)
Chance for Haste suffix = (1/14)
---------------------------------------------
Totally its (1/41580) = 0.00002405 what means 7 days 5 hours and 15 minutes of shopping.


POSTSCRIPT:

Why you calculate with "of Haste" only ? What about "of speed" ? Voila - its double chance for equal sword now.
And what about Broad sword? I know, it has smaller DMG. There is a difference 4 - 8 between best DMG Basty and worst DMG Broad. But it could be still OK, no? And that Broad sword can be Haste or Speed as well. Finally, maybe you could use even Flail. I know, fighting animals with club its annoying, but when you have nothing better, Kings/Haste (Speed) flail comes quite handy.

So its:
2*0.00002405 for Kings/7 frames Bastard sword
4*0.00002405 for Kings/7 frames sword
6*0.00002405 for Kings/7 frames one handed weapon

Reply
#5
Quote:Completely wrong.

Explain?
Reply
#6
Quote:Explain?

You stated that his character was too high a clvl to be ideal. The clvl range that can drop a KSOH is 28 - 50. His character is clvl 29. So... completely wrong.
"What contemptible scoundrel stole the cork from my lunch?"

-W.C. Fields
Reply
#7
Quote:You stated that his character was too high a clvl to be ideal. The clvl range that can drop a KSOH is 28 - 50. His character is clvl 29. So... completely wrong.

Sorry, I meant that his character was too low of a clvl to have ideal chances.

I looked up the qlvl to ilvl conversion, and it's as follows:
Range of qlvl for base item: ilvl/4 to ilvl
Range of qlvl for prefixes and suffixes: ilvl/2 to ilvl

Haste as a suffix has a qLvl of 27, and King's has a qLvl of 28, so he could theoretically reach level 55 before the former would not be able to be given out by Griswold. There are affixes that would not be offerable at a higher level still are possible at this point.

For example, a Helm has a qlvl of 8. At level 29, this is still a possibility. However, at a higher level, Griswold would stop offering any magical helms, making it slightly more likely that he will offer a KSOH. As for an affix example, "of the Wolf" has a qlvl of 15, which is offerable to his character at level 29. At level 33 (due to rounding and variations in the qlvl of Griswold's slots), this will no longer be able to be offered at all.

That's my interpretation of what I've read in JG.
Reply
#8
Quote:I believe that your way how to count final probability is right, but when I looked at it, I got different arguments:

Totally its (1/41580) = 0.00002405 what means 7 days 5 hours and 15 minutes of shopping.

Thanks for checking my math, Sekel. I appreciate it. I forgot that the max ilvl is 30, so that does narrow it down a bit. Also, I forgot to use the prefix/suffix charts in Jarulf's Guide that were ordered by lvl instead of type, which might have saved some time.

The answer to why I only included haste and bastard sword is that I'm obsessed! I already HAVE a king's broad sword of speed (which is a fine weapon). The point is I won't rest easy until I find a King's Bastard sword of Haste :) (crazy, yes.)

Anyway, good news. I shopped pretty much all day and I actually got one! Woohoo! It's got a +dam of 157, which is okay, but it's got a 99% +hit. Almost perfect!! I was excited about that...

And, I switched to shopping with my level 33 character, since I noticed that the 4 extra levels would knock off a few of the lower level base items and prefixes. So Alamara was right in saying that 29 wasn't the optimal level. It was just the MINIMUM level so be able to buy one...

Thanks for your help all. LennyLen, I appreciate the support. (By the way, the reason I had the +2 was because of the last Gris slot where ilvl = clvl+2. I was unclear on that, sorry).

Well, now I guess I'll have to leave Griswold alone and show my new sword to Lazarus.

-mekane
Reply
#9
The maximum ilvl for premium items at Griswold is capped at 30. This mean that ilvl/4 cannot possibly be higher than 7. From clvl 29 to clvl 50, he will offer the exact same range of base items on his premium items.
Reply
#10
Quote:You stated that his character was too high a clvl to be ideal. The clvl range that can drop a KSOH is 28 - 50. His character is clvl 29. So... completely wrong.

By drop do you mean purchase? If so, your website contradicts the statement that the clcvl range that can drop a KSOH is 28-50. I followed the logic on your webpage and it seems valid to me. I'm pretty much a numbskull when it comes to this whole ilvl stuff though. Which do you believe is correct? If you didn't mean purchase please disregard this post.

*Edit* Funny thing happened the game after I turned 27. Griswold had a kings/haste maul for sale. He is such a tease.
Reply
#11
Sekel's post is completely correct, but imcomplete. The final probabilty is for ONE slot only, and griswold will sell you six. Additionally, at clevel 29 with the different ilvl for each slot, there may be a slight difference in probability for some slots. For now, we will just assume 0.00002405 for each slot.

For six slots, the probability for him to sell a KSOH (in a game) is:

1-(1-0.00002405)^6 = 0.001443 (or statistically 1 in 6930 games).

But don't get your hopes up. The probability to ACTUALLY have this item for sale in 6930 games is:

1-(1-0.001443)^6930 = 63.2%

So even if one hundred people shopped 6,930 games, only 63 of them would actually see a Kings Bastard Sword of Haste for sale. Once again, however, there is a "but". There is a fact that no one has mentioned, which makes virtually all of this completely pointless - the price cap! There are dozens of items Griswold will generate which will be discarded because they violate the price cap. Most notable are many awesome full plate mails with a suffix (excluding ages I believe). Furthermore, sometimes this cut-off is dependent upon the actual VALUES of the affixes chosen. For example, a Lord's Great Sword of the Heavens (81/12) is 100 gold short of the price cap. This means that it is possible to buy this item ONLY with those exact stats. With any other stat (inlcluding 82/12), it is too expensive. Now, a Lord's Great Sword of the Heavens can spawn with 60 different unique values (81-95 paired with 12-15). Since only the lowest possible is below the price cap, if this item is generated at griswold, only 59/60 times it will have to be regnerated (as opposed to every single time, or 60/60). At least, that what is assumed, but we don't have any information about that. This effect is even more prominent at Wirt. Just try calculating the price of an emerald tower shield of the tiger with varying values. 47% emerald is only possible with the lowest amount of life, 41. 46% is possible up to 44 life. 45% is possible up to 48 life, and so on. Same thing goes for various ruthless/merciless long battle/war bows of the heavens.

There is no information as to what happens when an item is discarded because of price cap, but probably the slot in question simply generates another item. The problem then is when this happens (since another item is generated) it essentially has the same effect as if there were *7* slots in that particular game. And what if he generates two items that are two expensive, now he has generated virtually 8 slots worth of items - which will increase the probability of him selling the sword. The problem is how often can you say he generates an item that is too expensive? And if he generates an item that will be below the price cap with some values, but not with others, what is the ratio between them?

Since that ratio of keeping/discarding an item is dependent upon the quality of the affixes selected and because it is unique for any item that the cap falls in between the price range, it is extremely difficult to calculate the affect of the price cap on probability at town shops. Believe me, if there were a way, I would have done it already.

It is also worth noting that Griswold will NEVER use an ilvl of more than 30, which that there is no difference between shopping at clvl 31-50.

Edit: Ok, Nystul beat me to the punch on the last part.

For those interested, if you include the effect of the price cap, the problem because conditional probability, and is very complicated. Technically it affects more than just having to regenerate the item, but the actually probability of the sword iteself, so it no longer is 0.00001405 per slot. I am working with a professor on some conditional probabilty for monster generation, so if I can apply it to shopping I will report about it and may even get motivated to make a calculator for it.
--Lang

Diabolic Psyche - the site with Diablo on the Brain!
Reply
#12
Quote:The maximum ilvl for premium items at Griswold is capped at 30. This mean that ilvl/4 cannot possibly be higher than 7. From clvl 29 to clvl 50, he will offer the exact same range of base items on his premium items.

This would depend on whether the ilvl is capped before or after dividing by four. I would have guessed that it would be after, but I haven't examined the code itself and you seem to be pretty sure, so perhaps not.
Reply
#13
Quote:By drop do you mean purchase?

Oops, yeah. I'm so used to calculating these things for in the dungeon rather than in town that I'm always refering to purchases as drops.;)

Quote:Which do you believe is correct? If you didn't mean purchase please disregard this post.

The essay on my site has the correct range. When I stated 28 - 50 above, I forgot to take into account the slots where ilvl = clvl + 2.

Quote:This would depend on whether the ilvl is capped before or after dividing by four. I would have guessed that it would be after, but I haven't examined the code itself and you seem to be pretty sure, so perhaps not.

It is capped before the division.
"What contemptible scoundrel stole the cork from my lunch?"

-W.C. Fields
Reply
#14
Quote:There is no information as to what happens when an item is discarded because of price cap, but probably the slot in question simply generates another item.

Yes, it will simply create a completely new item until it succeeds. I don't think there is an escape route so technically it could loop for ever but the ammount of items below the cap should make that highly improbable. On the other hand, in Hellfire, there is a cap on the number of loops which means the game can actually end up with items above the cap (it simply offers the last item in the loop regardless of price). On the other hand, hellfire has the addition of checking of the item is more expensive than other items of the same type you have or something like that, don't record the details, they should be in the Guide.
There are three types of people in the world. Those who can count and those who can't.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)