# D&D.Sci Dungeonbuilding: the Dungeon Tournament

*This is an entry in the 'Dungeons & Data Science' series, a set of puzzles where players are given a dataset to analyze and an objective to pursue using information from that dataset.*

[*Complexity Rating*](https://www.lesswrong.com/posts/6QfatwCcmuaDBNeDv/d-and-d-sci-scenario-index)*: 3/5*

**STORY**
=========

The Dungeon Tournament is held regularly, calling dungeon creators from around the kingdom to create the most challenging dungeon for adventurers to battle through.  The winner is crowned with glory (plus they receive a large dungeon-building grant, and are often hired to design labyrinths, pyramids, mazes, tombs, and many other dungeons).

The current competitors, however, have no conception of how to employ Data Science to optimize their dungeons!  After gathering data on the past dungeons and how they were scored, you entered the tournament, confident in your victory and the attendant glory and improved career prospects.  You planned a terrible dungeon, forcing adventurers through a deadly gauntlet of traps and ferocious monsters.

Unfortunately, managing the various monsters you need to stock a dungeon turned out to be more difficult than you expected.

Your dragons got into a fight that smashed one of your golems, and ended with one of the dragons leaving and flying away to sulk.

Your goblins have broken half of your traps while trying to play with them.

Your hag...hasn't done anything wrong exactly, but whenever you check in on her she cackles at you in a very unsettling way while muttering ominously at you[^az4l0h1suhj].

You barely have enough encounters left to fill every room in your dungeon, much less to fill them with carefully-chosen challenging encounters.  The adventuring teams that will be exploring your dungeon for the competition[^rpjt4u3e9j] pass by the disaster area around your workshop and snigger at you.  All you can do is hope that clever use of the [data](https://raw.githubusercontent.com/aphyer1992/dndsci_dungeon/refs/heads/main/dungeon_output_player.csv) can let you recover and avoid your dungeon being a complete disaster.

[**DATA**](https://raw.githubusercontent.com/aphyer1992/dndsci_dungeon/refs/heads/main/dungeon_output_player.csv) **& OBJECTIVES**
==================================================================================================================================

*   You need to fill your dungeon with encounters.  By convention, the competition dungeons must be laid out in a 3x3 grid as follows, with adventurers entering in the top left and working their way through to the treasure in the bottom right: 
    
    ![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/c39b6943f1fac0707ecdf50362472479c87dbda9b7b3a7fa.png)
    
*   You've numbered the rooms 1-9 here to keep track of the layout of each dungeon in your dataset.  However, you haven't seen the adventurers clearing dungeons in the past, and you don't know exactly what path they will take through the dungeon or which encounters they will encounter in what order.  They will not necessarily clear all encounters, and will not necessarily clear them in the order 1-9.
*   You have the following encounters to distribute among those rooms (no more than one encounter per room):
    *   1 Boulder Trap
    *   1 Clay Golem
    *   1 Dragon
    *   2 Goblins
    *   1 Hag
    *   2 Orcs
    *   1 Whirling Blade Trap
*   For example, you could choose to submit this arrangement: 
    
    ![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/38366f49766411aec09fea03c6f2fdf822f9fdbd5701c5ef.png)
    
*   Here, adventurers would start by entering Room 1 with the Boulder Trap in the top left, and work their way (by some route) through to Room 9 with the Whirling Blade Trap in the bottom right, and finish there.
*   You can summarize this answer as 'BCD/GGH/OOW'.
*   Your objective is for your dungeon to get the highest Score possible, based on the difficulty ratings given by the adventurers that explore it.  To assist with this, you have a [dataset](https://raw.githubusercontent.com/aphyer1992/dndsci_dungeon/refs/heads/main/dungeon_output_player.csv) of past dungeons, and what ratings they were given.

**OPTIONAL HARD MODE**
======================

You **cannot stand** these Goblins being around.  They break everything.  They steal everything.  They smell awful.  They constantly make terrible, terrible jokes.[^vi5dkiiejad]  And they aren't even all that big a threat to adventurers!  Is there no way you could make do without them?  Or at least make do with **fewer** of them?

To pursue this bonus objective, use fewer Goblins in your submission.  Since you only have 9 encounters available to begin with, you will need to leave a room empty for each Goblins encounter you leave out.

You'd rather put up with these Goblins for a bit longer than embarrass yourself in the Dungeon Tournament, though: only leave them out if you think you can do that with minimal effect on your performance in the Tournament!

**SCHEDULING & COMMENTS**
=========================

Since we're in the holiday season, I expect many players (and also myself) to be busy, and so I'm leaving substantially more time for this scenario than usual so that anyone who is e.g. out for holidays can still have time to try it. I'll aim to post the ruleset and results on January 6th.

As usual, working together is allowed, but for the sake of anyone who wants to work alone, **please spoiler parts of your answers  that contain information or questions about the dataset.  **To spoiler answers on a PC, type a '>' followed by a '!' at the start of a line to open a spoiler block - to spoiler answers on mobile, type a ':::spoiler' at the start of a line and then a ':::' at the end to spoiler the line.

[^az4l0h1suhj]: "The bane of the mountains, the princess's hand.  The loyal protector all at her command.  Her lovely, her darling, oh now where are you?  Are you gone?  Are you lost?  No, you're boiled in a stew!"  At this point you made a hasty retreat, because you did not like the way the Hag was eyeing you while talking about boiling you in a stew. 

[^rpjt4u3e9j]: Four different adventuring teams have signed up as judges to run this tournament's dungeons; thankfully, Dungeon Tournament officials will be healing your monsters and resetting your traps between adventuring teams, so you won't have to worry about that. 

[^vi5dkiiejad]: "My uncle Gobbo has no tongue!"  "How does he talk?"  "...Terrible!  Ahahahaha!"  And you don't even want to mention the one about the Mind Goblin.