# D&D.Sci: Whom Shall You Call? [Evaluation and Ruleset]

This is a followup to [the D&D.Sci post](https://www.lesswrong.com/posts/vrB8xYK8pFPmP5ts8/d-and-d-sci-whom-shall-you-call) I made twelve days ago; if you haven’t already read it, you should do so now before spoiling yourself.

[Here](https://h-b-p.github.io/d-and-d-sci-WSYC/) is the web interactive I built to let you evaluate your solution; below is an explanation of the rules used to generate the dataset (my full generation code is available [here](https://github.com/H-B-P/d-and-d-sci-WSYC/blob/main/gen.py), in case you’re curious about details I omitted). You’ll probably want to test your answer before reading any further.

* * *

Ruleset
=======

(Note: to make writing this easier, I’m using standard D&D dice notation, in which “3+4d8” means “roll four eight-sided dice, sum the results, then add three”.)

Ghost Generation
----------------

### Traits

Ghosts have nine traits which can affect the price of an exorcism: Intellect, Corporeality, Sliminess, Hostility, Grotesqueness, Deviousness, Perversity, Paradoxicality, and Unholiness, each a positive integer with a max of 100. Of these, the PPEK only measures the first five.

For the typical ghost (kind of; see next section), these traits are generated per the below table:

| **Trait** | **Generator** |
| --- | --- |
| Intellect | 1d80 + min(1d20, 1d20) |
| Corporeality | 1d60 + 1d20 + min(1d20, 1d20) |
| Sliminess | \\[Corporeality\\]/5 + 1d60 + min(1d20, 1d20) |
| Hostility | 1d80 + min(1d10, 1d10) + 1d10 |
| Grotesqueness | min(1d20, \\[Hostility\\]/5) + \\[Corporeality\\]/10 + 1d10 + 1d60 |
| Deviousness | \\[Intellect\\]/10 + 1d10 + 1d80 |
| Perversity | 1d60 + min(1d40, 1d40) |
| Paradoxicality | 1d100 |
| Unholiness | 1d60 + 1d40 |

### Categories

A ghost is either a Wisp, Spirit, or Horror. Wisps, when generating each trait, roll three times and pick the lowest result; Spirits roll once; Horrors roll three times and pick the highest.

43.3% of ghosts are Wisps, 19.3% are Spirits, and 37.4% are Horrors.

Exorcism Prices
---------------

The cost of an exorcism varies randomly in a triangular distribution from 50% to 150% of the mean.

### Phantom Pummelers

The Pummelers, as the name suggests, tend to solve problems with their fists. They are aided slightly by Corporeality (they have ways to drag enemies into the physical plane, but find life somewhat simpler when they get to skip that step), hindered greatly by Sliminess, and impeded by Perversity and Unholiness.

$$
E(PP) = 610 - 6*corp + 41*slim + 12*perv + 8*unho
$$

### Wraith Wranglers

The Wranglers believe in talking things out, seeing their task as gently helping ghosts to pass on. Their ideal client has high Intellect, low Deviousness, low Paradoxicality, and - most importantly - low Hostility.

$$
E(WW) = 521 - 5*inte + 39*host + 15*devi + 17*para
$$

### Spectre Slayers

The Slayers are overwhelmingly powerful but hamstrung by conscience. High Intellect makes things much harder for them; Grotesque and Hostile targets make their job slightly easier to bear; Deviousness helps their victims figure out how best to play on their sympathies.

$$
E(SS) = 902 + 53*inte - 5*host + -4*grot + 11*devi
$$

### Entity Eliminators

The Eliminators are capable, but bad at finishing blows (to an extent which leads the Slayers to accuse them of toying with their prey). Sliminess, Deviousness, Paradoxicality and above all Perversity enable their enemies to take advantage of this deficiency.

$$
E(EE) = 351 + 7*slim + 26*perv + 17*devi + 13*para
$$

### Demon Destroyers

The Destroyers are hard to defy or reason with, but easy to make uncomfortable. Grotesqueness is a ghost’s best defense against them; Hostility and Perversity also make them squeamish; Unholiness, by contrast, places them on reassuringly familiar ground.

$$
E(DD) = 505 + 45*grot + 12*host + 5*perv - 5*unho
$$

### Mundanifying Mystics

The Mystics mostly ignore their quarry, endlessly and expensively recycling their reliable rituals to purge occult influences. Unholiness gives said rituals something to latch onto, and makes their task somewhat easier; no other trait affects them.

$$
E(MM) = 4000 - 18*unho
$$

Strategy 
=========

The constraints on your decisionmaking bind less stringently than it might seem. The Eliminators – while decent all-rounders – are never the best pick, so you can freely choose the Slayers over them; there are only three ghosts for which the Pummelers are an optimal choice, so their limitation hangs loose; the Destroyers are comfortably worth their call-out fee when used right. As such, you’re actually free to pick the best exorcist group for each ghost, with average prices for each (rounded to two decimal places) shown in the table below:

| **Ghost** | E(MM) | **E(SS)** | **E(PP)** | E(EE) | **E(DD)** | **E(WW)** |
| --- | --- | --- | --- | --- | --- | --- |
| A   | 3396.81 | 1901.26 | 2056.66 | 2068.50 | 2693.44 | 2502.37 |
| B   | 3384.41 | 2025.80 | 2564.99 | 2216.15 | 3002.25 | 1628.38 |
| C   | 2788.92 | 4682.77 | 3789.21 | 4470.75 | 4277.74 | 4646.54 |
| D   | 3396.16 | 2963.71 | 2214.36 | 2139.74 | 1793.43 | 1863.84 |
| E   | 3346.41 | 3168.96 | 3180.84 | 2471.86 | 2386.68 | 1839.22 |
| F   | 2770.17 | 5456.68 | 4027.43 | 4580.40 | 4364.48 | 4477.89 |
| G   | 3402.09 | 2463.63 | 1744.99 | 2025.34 | 1331.52 | 1846.44 |
| H   | 3327.61 | 3917.90 | 1909.04 | 2332.50 | 2014.39 | 2967.68 |
| I   | 3093.94 | 5072.78 | 2742.22 | 3279.22 | 2415.87 | 2255.53 |
| J   | 3396.45 | 2727.51 | 2480.05 | 2191.72 | 1895.43 | 1907.17 |
| K   | 2809.01 | 3676.95 | 4459.54 | 4479.50 | 4458.01 | 4661.17 |
| L   | 2767.51 | 4462.52 | 4317.31 | 4604.58 | 4985.45 | 5235.91 |
| M   | 3392.06 | 1797.53 | 1833.77 | 2084.84 | 2348.37 | 3878.10 |
| N   | 3285.46 | 3739.93 | 1713.36 | 2425.50 | 3093.76 | 2477.91 |
| O   | 3357.81 | 2320.11 | 3471.58 | 2461.64 | 2656.85 | 1858.46 |
| P   | 2764.89 | 4546.32 | 4977.14 | 4735.62 | 4517.41 | 5485.83 |
| Q   | 3359.70 | 2823.81 | 2708.56 | 2297.15 | 2686.88 | 1629.20 |
| R   | 2770.93 | 4748.16 | 4358.62 | 4588.80 | 4277.49 | 4682.19 |
| S   | 3350.61 | 1587.07 | 2482.33 | 2283.41 | 3070.74 | 4142.74 |
| T   | 2763.45 | 5513.31 | 4223.69 | 4624.58 | 4550.39 | 5375.08 |
| U   | 3397.50 | 2317.79 | 1682.92 | 2048.13 | 2276.45 | 3021.81 |
| V   | 3393.12 | 1667.81 | 3380.63 | 2274.20 | 1493.38 | 2140.71 |
| W   | 3397.97 | 2660.47 | 2252.42 | 2130.52 | 1820.46 | 2103.76 |

Reflections 
============

The intended goal of this challenge was to exhibit the ways in which absent columns can complicate and obfuscate a problem. For each exorcist, average cost is a simple linear function of a handful of features. But half of those features were missing, and had meaningful correlations with those that weren’t; this distorted the linearity and independence of remaining features’ effects[^1mf8s90toc1], and forced irrelevant features back into play (Hostility has 0 coefficient when calculating Eliminator prices; it only matters to an Eliminator insofar as it’s evidence of ghost type, which itself only matters as evidence of other features; but removing Hostility from your Eliminator price model still makes it legitimately less predictive).

What the scenario *actually* ended up exhibiting was how weak and manageable these obfuscating effects can be, and that a good-enough first-order approximation can be the best way to reach a perfect answer. Congratulations to simon, aphyer, and new (?) player Jonathan Paulsen for successfully steamrolling the problem with Linear Regression; condolences to Yonge for reaching a slightly worse answer by using a more nuanced modelling approach after successfully detecting nonlinearities in feature effects; and apologies[^8mx79d2pnp9] to anyone expecting a harder challenge (I *also* thought this one would be more difficult than it was!). Feedback on this point, and on all other points, is greatly appreciated.

Scheduling
==========

I find myself occupied by work, and distracted by other projects: I *may* run a game starting 2nd August, but don't count on it. (Please feel free to snipe me if you’d like to take next month’s slot!)

[^1mf8s90toc1]: Things which aren’t there, and yet continue to meaningfully influence events by indirect and arcane mechanisms . . . seems like a metaphor for something, doesn’t it? 

[^8mx79d2pnp9]: In my defense, I did confirm that using simple models resulted in systematic mis-estimations; unfortunately I didn’t think to check that relying on these mis-estimations would ever lead to a suboptimal decision. I'll know better next time.