# D&D.Sci Dungeonbuilding: the Dungeon Tournament Evaluation & Ruleset

This is a follow-up to [last ~~week~~ ~~month~~ year's D&D.Sci scenario](https://www.lesswrong.com/posts/JfAZoT5hXWyBPtCZ2/d-and-d-sci-dungeonbuilding-the-dungeon-tournament): if you intend to play that, and haven't done so yet, you should do so now before spoiling yourself.

There is a web interactive [here](https://aphyer1992.github.io/dndsci_dungeon) you can use to test your answer, and generation code available [here](https://github.com/aphyer1992/dndsci_dungeon/blob/main/dndsci_dungeon.py) if you're interested, or you can read on for the ruleset and scores.

RULESET
=======

Encounters
----------

The following encounters existed:

| **Encounter Name** | **Threat (Surprised)** | **Threat (Alerted)** | **Alerted By** | **Tier** |
| Whirling Blade Trap | --  | 2   | --  | 1   |
| Goblins | 1   | 2   | Anything | 1   |
| Boulder Trap | --  | 3   | --  | 2   |
| Orcs | 2   | 4   | Anything | 2   |
| Clay Golem | --  | 4   | --  | 3   |
| Hag | 3   | 6   | Tier 2 and up | 3   |
| Steel Golem | --  | 5   | --  | 4   |
| Dragon | 4   | 8   | Tier 3 and up | 4   |

Each encounter had a Threat that determined how dangerous it was to adventurers.  When adventurers encountered that, they would roll \[Threat\]d2 to determine how challenging they found it.

However, many encounters had two different Threat levels, depending on whether they were alerted to the adventurers or not.  (A dragon that's woken up from its slumber, or a hag who's had time to prepare her nastiest spells, or orcs who have gotten their armor on, are much more dangerous than the same encounters when surprised by the adventurers).

Traps and Golems do not rest and cannot be surprised, but Goblins/Orcs/Hag/Dragon encounters could be drastically more/less threatening.

Encounters were alerted by the adventurers having **sufficiently loud and dramatic** fights in an adjacent room.  If a Dragon heard the adventurers fighting a Golem in an adjacent room, it would wake up - if it heard them fighting Goblins in an adjacent room, it would just ignore the Goblin noises, roll over and go back to sleep.

Pathing
-------

Adventurers always took as short a route as possible to the goal:

![](https://res.cloudinary.com/lesswrong-2-0/image/upload/f_auto,q_auto/v1/mirroredImages/JfAZoT5hXWyBPtCZ2/fi14sjfe0iljnb9oh3it)

So they would enter in Room 1, then go to either Room 2/4, then room 3/5/7 (choosing from the two rooms adjacent to their previous choice) and so on.

At each step, an adventuring party scouts the adjacent rooms (using their sneaky Rogue/their invisible Wizard/their powerful Divination magic) and chooses the less threatening one (accounting for alertness, e.g. an alerted Dragon is more threatening than a Steel Golem but an unalerted Dragon is less threatening).  If two encounters are equally threatening (e.g both paths have Goblins, or one has alerted Orcs while the other has a sleeping Dragon), they will choose at random.

Score
-----

Depending on how well each fight went, it might do more or less damage: a fight with Threat X rolls Xd2 and adds that much to the dungeon's difficulty score.

Each adventuring team sums the difficulties of all encounters they faced to determine the overall score they give.

The tournament score is the average score given of all adventuring teams that entered your dungeon: in your case there are 4 such teams, so if your dungeon has e.g. a total Threat of 15 you will roll 15d2 4 times and average the results.

STRATEGY
========

The important things were:

*   Ensure the adventurers encounter your most threatening encounters.
    *   Adventurers must encounter Room 1 and Room 9, while other rooms can be skipped, so powerful encounters placed in those rooms cannot be avoided.
    *   Since adventurers only look one room ahead, it is possible to use an easy encounter now to direct them in ways that force them into a hard encounter: if Room 2 is easier than Room 4, and Room 3 is easier than Room 5, the adventurers will go that way and be forced to encounter Room 6 even if that is a hard encounter.
    *   You can use this to ensure that your three most threatening encounters (Dragon/Hag/Clay Golem) are always encountered.
*   Ensure that your encounters were alerted where necessary.
    *   Since traps/golems are always alert, you can put them early on in the path.
    *   Your Hag/Dragon need to be placed after sufficiently serious encounters to alert them.

To accomplish this, you lay your dungeon out like this (or the mirror version):

| Clay Golem | Whirling Blade Trap | Boulder Trap |
| --- | --- | --- |
| Orcs | Orcs | Hag |
| Goblins/Empty | Goblins/Empty | Dragon |

*   Adventurers will enter, and immediately must encounter the Clay Golem (which does not need to be alerted).
*   Since the Orcs are more threatening than the traps (Threat 4 for alerted Orcs vs Threat 2/3 for your traps), they will head rightward through the traps.
*   They will then be forced to head downward, through the Hag (alerted by the Boulder Trap) and then the Dragon (alerted by the Hag).

This layout does not rely on the Goblins at all: since the adventurers will never approach the rooms in the bottom left, it does not matter whether they contain Goblins or not.  As such, if you were confident in this layout, it would not cost you any points to accomplish the Bonus Objective and leave out the Goblins.

LEADERBOARD
===========

| **Player** | **Layout** | **Path Taken (threat)** | **Threat**[^7n28t9yk4ze] | **Avg Score** |
| --- | --- | --- | --- | --- |
| Christian Z R (without Goblins) | CWB OOH XXD | C->W->B->H->D (4->2->3->6->8) | 23  | 34.5 |
| **Optimal Play** | **CWB** **OOH** **XXD** | **C->W->B->H->D** **(4->2->3->6->8)** | **23** | **34.5** |
| abstractapplic (with Goblins) | BOG OWH GCD | B->O->G/W->H/C->D (3->4->2->3/4->8) | 20.25[^l626hgw21gn] | 30.375 |
| Yonge (with Goblins) | COG GOB WHD | C->G->W->H->D (4->2->2->3->8) | 19  | 28.5 |
| simon (without Goblins) | CHX OBX WOD | C->O->W->O->D (4->4->2->4->4) | 18  | 27  |
| Yonge (without Goblins) | COX WOB XHD | C->W->X->H->D (4->2->0->3->8) | 17  | 25.5 |
| **Random Play** **(with Goblins)** | **??** | **??** | **~14** | **~21** |
| kave (without Goblins) | DBX OWH XOC | D->B->X->H->C (4->3->0->3->4) | 14  | 21  |
| **Random Play** **(without Goblins)** | **??** | **??** | **~10.4** | **~15.6** |

Congratulations to all players, particularly to **Christian Z R**, who managed to get a perfectly optimal score.  (Condolences to **abstractapplic**, whose original answer was in fact also the optimal one but who later reconsidered away from it).

DATASET GENERATION
==================

The dataset reflected a series of tournaments - each tournament had 4-8 contestants, and 3-4 judges[^04807poe480l] (whose scores were averaged together for each contestant).  

There were two kinds of contestant:

*   Random entrants.
    *   There are 0-4 random entrants (this number started as 1d4-1, and gradually increased to 1d4 as the tournament got more popular).
    *   Each one gets 4+1d4+1d6 random encounters (slanted towards low-tier ones).
    *   If this is >9 encounters, they discard their lowest-tier encounters.  If it is <9 encounters, they leave some rooms empty.
    *   They then distribute these at random through the dungeon, except with a strong tendency to put a strong encounter guarding the treasure in Room 9.
*   Some regular entrants who submitted dungeons with a slant towards their particular specialty:
    *   The Cruel Trapmaster:
        *   He starts with 4 randomly chosen traps (50-50 between Boulder and Whirling Blade).
        *   Adds 1d6+2 random encounters (as with random entrants, these slant towards low-tier encounters).
    *   The Elusive Golemancer:
        *   As she produces more golems, her dungeons have grown more golem-filled.
        *   Began with 1 Clay Golem and 1d6+5 random encounters.
        *   About 10% of the way through the dataset, adds a Steel Golem in place of one random encounter.
        *   Then around 30% of the way through the dataset, adds a Clay Golem in place of another random encounter.
    *   The Dragon Princess:
        *   She began with 1 Dragon and 1d6+5 random encounters.
        *   Around 33% of the way through the dataset, she tamed another Dragon and went up to 2 Dragons.
        *   Around 95% of the way through the dataset, one of her Dragons was mysteriously slain and she dropped back down to 1 Dragon.
    *   The Mountain Chieftain:
        *   He began with 1 Orc, 1d6+2 random encounters, and an unlimited supply of Goblins (he is the only contestant who never needed to submit a dungeon with an empty space in it).
        *   Around 95% of the way through the dataset, his fame grew due to having accomplished some unspecified feat of strength and held a great feast, and he gained 2 additional Orc encounters.
    *   These entrants choose their encounters if they have >9 and lay their dungeons out the same way random entrants do, just using their different pool of available encounters.

None of this was directly important to solving the problem, except insofar as it created a variety of dungeons with different skews in encounters (e.g. dungeons with very large numbers of Goblins/Traps but not much else, or scary dungeons with multiple Dragons/Golems, were more common than would arise from pure randomness).  Some players noticed a jump in average scores in the middle of the dataset (due to the Golemancer and Dragon Princess getting new powerful encounters added around the same time).

FEEDBACK REQUEST
================

As usual, I'm interested to hear any feedback on what people thought of this scenario.  If you played it, what did you like and what did you not like?  If you might have played it but decided not to, what drove you away?  What would you like to see more of/less of in future?  Do you think the scenario was more complicated than you would have liked?  Or too simple to have anything interesting/realistic to uncover?  Or both at once?  Did you like/dislike the story/fluff/theme parts?  What complexity/quality scores should I give this scenario in the index?

  
 

[^7n28t9yk4ze]: Average score will be on average 1.5 times this, with a small amount of randomness. 

[^l626hgw21gn]: Adventurers in this dungeon will encounter the Clay Golem 1/4 of the time, and the Hag 3/4 of the time: ones who go through the Whirling Blade Trap room in the middle will choose to face the Hag instead, and so the only ones to face the Clay Golem will be those who choose first to fight the Orcs in Room 2 rather than the Orcs in Room 4, and then choose to continue to the Goblins in Room 3 rather than the (equally threatening) Whirling Blade Trap in Room 5. 

[^04807poe480l]: There were supposed to be 2-5 judges, with the number increasing gradually as the tournament got more popular: due to a bug at lines 300-303 of the generation code, though, we left out 2 and 5 regardless of round number and just had either 3 or 4 each round.