This post is part of my "dnd.sci" series.

Boy, I have been melting these past few days! It feels weird to consider an AC as a cognitive enhancer.

Back in part one, I made the following predictions:

  • Buying the Pendant of Hope, Hammer of Capability, Plough of Plenty, and Warhammer of Justice +1 will get us enough mana with 55gp to spare.
  • Buying the Pendant of Hope, Hammer of Capability, Amulet of Wounding +2, and Pendant of Joy +4 has a 96.6% chance of getting us enough mana with 57gp to spare.
  • The thaumometer tracks blue items to a \(\pm 1\) tolerance, after adjusting for a 22 point excess in jewelry items.
  • The Thaumometer does not track mana for non-blue items
  • Yellow items fall in the 18-21 mana range
  • Red and green items are sensitive to the item modifier being +2 or better
  • Enchantment gives us no usable information

Pleasure doing business

I was very confident I had the blues and yellows pegged, so I confidently filled my shopping cart and hit the “Conclude Shopping Trip” button.

You got enough mana! You end the day having gained 55gp.

Delightful. Now that honor has been satisfied and I’ve properly passed the test, let curiosity be satisfied as well. I reloaded the page and filled my cart again, this time replacing the yellow items on the list for marginally cheaper green options.

You got enough mana! You end the day having gained 57gp.

Good news, but not terribly informative. How was the data generated?

Wakalix Maketh it Goe!

A magic item is either a Weapon (Sword, Longsword, Warhammer, Battleaxe), Tool (Plough, Saw, Hammer, Axe), or Trinket (Ring, Pendant, Amulet).

I’m an idiot. I identified jewelry, but didn’t think to go back and look at the names again. I even had the right impulse when I noticed the modifiers! How badly is this thing going to bite me?

Every item has an abstraction (Wrath, Prosperity, etc.) assigned to it. Weapons are randomly assigned Weaponish abstractions, Tools are randomly assigned Toolish abstractions, and Trinkets are randomly assigned Weaponish or Toolish or Trinketish abstractions. These abstractions have no effect on other features […]

Ok, I didn’t spot that, but not looking in that direction made sense. The shop tells me the full item name, so I don’t care much for predicting one from the other.

[…] the amount of extra damage [inflicted by a weapon] is equal to mana/10 rounded down. Non-Weapon items are also sometimes assigned modifiers; this is a marketing tactic performed ad-hoc by salesmen with shaky or nonexistent justification, and provides no actual information.

There’s the bite. Modifiers only matter for Weapons. The green items I picked for my risky guess were both Trinkets, which means I gave them too much credit on account of their high modifiers. Plus I didn’t notice the mana scaling with modifier, which I’d probably would have if Trinkets and Tools hadn’t gotten in the way.

  • Red-enchanted items have 1d4x1d4x1d6 mana.
  • Blue-enchanted items have 1d6x1d10 mana.
  • Yellow-enchanted items have 17+1d4 mana.
  • Green-enchanted items have 2x1d20 mana.

Yellows were so tightly clustered I actually got them right. Blues ended up explained by the Thaumometer, so whatever. Greens and reds I’m pissed about. I didn’t notice the generation method, which is whatever, but I didn’t even notice the range being different.

Looking back, the problem is obvious: I didn’t force the plots into the same range. I didn’t know how to do it, and matplotlib seems to be massively inconsistent about it, and the analysis was taking me forever already, but that’s no excuse. Lesson learned: from now on, establish an iron grip on plot range and scale.

You are statistician! You think plot range is “eh, no big deal?”

Redoing the segregated hexbin plot, the contrast is stark.

blue

green

red

yellow

If we forget about the thaumometer and look at color-segregated histograms, distributions were bloody obvious: green looks pretty uniform, yellow is a spike, and both blue and red have this really distinctive hump-tail shape I now know to associate with a product of independent variables.

The Thaumometer was a big success. It works for blue items, and only blue items, and all Trinkets are overestimated by 22 points.

Wakalix’s list is a random sample of items from the same shop we are buying from, so selection effects are not distorting our results. That doesn’t make up for the fact that I wasn’t paying attention at all, and have no clue as to how to handle selection effects going forwards.

How did my predictions do?

  • (CORRECT) Buying the Pendant of Hope, Hammer of Capability, Plough of Plenty, and Warhammer of Justice +1 will get us enough mana with 55gp to spare.
  • (WRONG) I overrated the Amulet of Wounding +2 and Pendant of Joy +4 due to their high modifiers.
  • (CORRECT) The thaumometer tracks blue items to a \(\pm 1\) tolerance, after adjusting for a 22 point excess in jewelry items.
  • (CORRECT) The Thaumometer does not track mana for non-blue items
  • (CORRECT) Yellow items fall in the 18-21 mana range.
  • (WRONG) All Weapon-type items (and only Weapon-type items) are sensible to the modifier.
  • (CORRECT) Enchantment gives us no usable information

Some contributions that caught my eye

  • GuySrinivasan got most things right, which makes me wonder if he had something in mind while looking at the prime factors of thaumometer readings.
  • gjm also did prime factors. Seriously, what are they looking for?
  • gjm found the origins of Wakalix the Wizard.
  • philip_b threw an automatic scikit-learn routine at the problem. He got nowhere, but just knowing that is a tool that exists suggests it works for something. I’m looking forward to playing with it.
  • I seem to be the only one posting code or graphs for this problem, so even if I’m a year late, I’m contributing something useful.