# D&D.Sci Dungeoncrawling: The Crown of Command

STORY (skippable)
=================

Across the world adventurers dive into tombs, mausoleums, and sunken cities in search of treasure.  They clear out orcish keeps, goblin camps and dragon lairs to keep the people safe.  And they meet with lords who wish to hire them to retrieve a certain item from its lost location.

You are one such lord, the rightful heir of the Kingdom of Calantha.  Ever since your family was cruelly cast down from the throne, you have been forced to eke out a miserable existence, with but a few thousand acres of land to call your own, and a couple shabby mansions to live in.  But no more!  Today your work has born fruit, and you have found out at last where the shards of the Crown of Command were buried when your lineage was deposed.

(It was so unreasonable to object to your family's rulership!  Your great-grandfather was the most popular king Calantha has ever had, with 100% approval rating among the populace!  Yes, okay, this might have something to do with the Crown's kingdom-wide mind-affecting properties, but it still seems *unreasonable* for a band of plucky heroes to storm his palace, kill him, break his crown into three pieces, and cast his family into exile).

But now you know where the three pieces were hidden, and you will see your Crown reforged!  Then you will reclaim your throne and rule as a wise and just king!  (Starting, of course, by wisely hunting down and justly executing every descendent of anyone who was involved with the coup against your great-grandfather).

The three pieces were hidden in dungeons across the land: one in the Lost Temple of Lemarchand, one in the Infernal Den of Cheliax, and one in the Goblin Warrens of Khaz-Gorond.  You've been able to find out something about what's defending each of these dungeons, via a mixture of divinations and sending in the last of your dutiful family retainers to scout them out.  (Their loyalty and sacrifice will be remembered.  Not by you personally, though.  You have people for that.)  Now all that remains is to hire three teams of foolish adventurers, tell each one you have lost a 'prized family heirloom' in a nearby dungeon, and offer to pay them to retrieve it!  Simplicity itself!

Unfortunately, money is...a bit tight.  And those greedy adventurers refuse to do anything unless you pay for a 'full party' of 4 of them to enter each dungeon!  Not only that, if things start to look bad they'll run away rather than pressing on to the end!  (They mutter something silly about the risk of awful death.  Isn't that what you're paying them for?)

So it seems you'll have to brush off your mathematics skills, learned when you were a child from your teacher with the help of your whipping boy.  (You weren't allowed to whip him unless you got the math problems right, which was extremely unfair to you but did at least encourage you to develop your skills rapidly.)

With some careful analysis of [past adventures](https://raw.githubusercontent.com/aphyer1992/dndsci-dungeoncrawl/main/dungeon_crawl_corrected.csv), you think you can probably select adventuring teams that will be able to successfully conquer those three dungeons.  Then, at long last, you will have your vengeance!  MUWAHAHAHAHAHAHAHA!  (You need to get this maniacal laughter out of your system now, it wouldn't do to show it while you're hiring the adventurers).

DATA & OBJECTIVES
=================

*   You have 36,000gp to spend.
*   You must hire 12 adventurers (three groups of four) and send one group of 4 to each of three dungeons - the Lost Temple of Lemarchand, the Infernal Den of Cheliax, and the Goblin Warrens of Khaz-Gorond - to retrieve the fragments of your ancestral crown.
*   Your goal is to maximize the probability of succesfully retrieving all three fragments.
*   Six classes of adventurer are available: Fighter, Ranger, Mage, Cleric, Druid and Rogue.  Adventurers are available in levels from 1 to 8.
*   Hiring an adventurer costs 1,000gp x that adventurer's level.
*   So you could hire, for example:
    *   4 Level 3 Fighters (12,000 gp) for each dungeon...
    *   ...or 1 Level 8 Mage and 3 Level 1 Fighters (11,000 gp) for the Lost Temple, 2 Level 5 Rogues and 2 Level 1 Rangers (12,000 gp) for the Infernal Den, and 1 Level 7 Druid and 3 Level 2 Clerics (13,000 gp) for the Goblin Warrens...
    *   ...or any combination of 12 adventurers totaling 36 levels.
    *   The Adventurer's Guild representative shrugs and recommends that you hire the first 12 Level 3 adventurers you see, of whatever random classes strike your interest - you can start with that as a baseline, but you think you can improve on that with the data you have, by selecting the right combination of classes for each dungeon and possibly by sending out some higher-level and some lower-level ones.
*   You have a [dataset](https://raw.githubusercontent.com/aphyer1992/dndsci-dungeoncrawl/main/dungeon_crawl_corrected.csv) from the Adventurers' Guild of past dungeon-crawling attempts, with what adventurers went on a dungeon crawl, what encounters they ran into, and whether they succeeded in looting the dungeon or failed and were forced to retreat.
*   For the benefit of those whose tools make manipulating this data difficult, I've added some derived columns that may be easier to work with.  I do not, however, guarantee that any particular column I've added will be useful or necessary to your analysis.
*   You can trust the adventurers to return the crown fragments if they get them, but they are located at the bottom of the dungeons - for the adventurers to successfully complete the dungeon is both necessary and sufficient for you to receive the corresponding crown fragment.
*   Based on your scouting, the encounters within those dungeons are:
    *   The Lost Temple of Lemarchand (8 encounters deep):
        *   Skeletons -> Poison Needle Trap -> Zombies -> Snake Pit -> Poison Needle Trap -> Skeletons -> Snake Pit -> Ghosts
    *   The Infernal Den of Cheliax (5 encounters deep):
        *   Orcs -> Snake Pit -> Wolves -> Snake Pit -> Unknown
    *   The Goblin Warrens of Khaz-Gorond (10 encounters deep):
        *   Goblins -> Boulder Trap -> Unknown x 8
*   You don't know what the 'Unknown' encounters are - you'll need to either try to figure out from the data you have on past dungeons what they are, or send an adventuring party that can deal with whatever happens to be there.

An answer key and leaderboard will be posted in about a week, most likely on Monday the 15th.

As usual, working together is allowed and encouraged, but for the sake of those who wish to work alone please spoiler-tag (type '>!' at the start of a line) any comments with information on the dataset.

**Edited to add:** the original version of this document gave an inconsistent dataset (hiding some information as 'Unknown' in some columns but revealing it in other columns).  I've corrected that in the links, thank you simon for the heads-up.  The old dataset is [here](https://raw.githubusercontent.com/aphyer1992/dndsci-dungeoncrawl/main/dungeon_crawl_extended.csv) if anyone wants it for comparison purposes, but should be strictly less useful.