This is a follow-up to last week's D&D.Sci scenario: 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 you can use to test your answer, and generation code available here if you're interested, or you can read on for the ruleset and scores.

Note: the web interactive calculates average survival rates/values using Monte Carlo with small sample sizes.  The figures in the leaderboard are more accurate.

THE RULESET

The underlying ruleset was a resource-management minigame played behind the scenes for each fort.

Players were not expected to reconstruct the entire ruleset - rather, the minigame existed in order to create interesting multivariate effects in the output dataset.

Each fort plays 12 rounds of this minigame to determine survival and value.  (After this, a fort either dies, shuts down, or grows sufficiently to take in new migrants/raise children/etc, at which point its starting dwarves no longer matter.)

SITE GENERATION

A site has a biome (chosen at random from the four available) and a Coal Level given by 1d4-1.

There are seven ores (the six mentioned in the dataset, plus Adamantine, which is buried too deep to be prospected for in advance).

Each ore has an independent 40% chance of being present in any site.

Any site where (# of ores found by prospecting + Coal Level) is less than 4, or any Tundra site where it is less than 5, does not get settled.  As such, all forts have at least that much coal/ore in them.

RESOURCES

The main underlying mechanic is one of resource management - there are a variety of different resources involved, and high-value forts are those that manage to navigate the production chain to create high-value finished goods.

ResourceValueProduced By
Food0.1Farmer, Brewer
Wood0.5Woodcutter
Coal1Miner
Ore - Copper1Miner
Ore - Tin1Miner
Ore - Iron3Miner
Ore - Silver3Miner
Ore - Gold5Miner
Ore - Adamantine15Miner
Finished Goods - Wood4Crafter
Finished Goods - Copper5Smith
Finished Goods - Tin5Smith
Finished Goods - Bronze10Smith
Finished Goods - Iron10Smith
Finished Goods - Silver10Crafter
Finished Goods - Gold20Crafter
Finished Goods - Steel20Smith
Finished Goods - Adamantine60Smith

WARRIORS, WOODCUTTERS AND BIOME

A fort is subject to many threats from the outside, ranging from the occasional goblins and mandrills of the Plains to the dreaded Elephants of the Jungle.

None of these things can destroy a fort on their own.  When threats from outside are too serious to deal with, the dwarves seal the gate, set up some traps with whirling serrated blades and huge menacing spikes, and wait for them to go away.  The use of Warriors is not directly to keep these threats from destroying your fort - rather, it's to allow your fort to keep access to the outside.

While you have access to the outside:

  • Farmers produce much more food (sunlight and wide open spaces make more food than caves).
  • Woodcutters can cut down trees (pretty clear).
  • Food and Fuel can be bought (at admittedly high prices) from wandering merchants.

While you don't have access, your Woodcutters are useless, your Farmers less useful, and you cannot buy emergency Food or Fuel.

Each turn, you determine the Threat Level of your biome:

BiomeThreat LevelTrees
Tundra75% 0, 25% 21d4-1
Plains11d6
Light Forest1d21d6+3
Jungle1d499

If you have a # of Warriors >= the Threat Level, you have exterior access that turn.  If # Warriors < Threat Level, you are stuck inside that turn.

If you have exterior access, Woodcutters each cut 2 Trees, up to a limit of the # of Trees available in your biome this turn, and you gain 1 Wood per tree cut.  If you don't, Woodcutters are useless.

MINERS, COAL AND ORE

Each ore type has a different Depth - how far below the surface it tends to be found.

The more Miners you have, the deeper you can dig, and the more ores you can find.

OreDepth (# Miners Needed)Yield
Copper11d4 Copper Ore
Hematite21d3 Iron Ore
Tin31d3 Tin Ore
Silver31d3 Silver Ore
Magnetite41d6 Iron Ore
Gold51d3 Gold Ore
Adamantine71 Adamantine Ore

Each round, you receive the Yield of each ore present in your fort that you can mine deep enough to reach.

If Adamantine is present in a fort, it has a Thickness of d20+1.  Every time Adamantine is mined, that Thickness is reduced by 1.  If it ever reaches 0, you have Delved Too Deep, and...well...let's just say that no fort that does this ever survives.

Each Miner also has a chance of (10% * Fort Coal Level) to produce 1 Coal.

SMITHS, CRAFTERS AND FUEL

These professions create finished goods.  Finished goods are the highest-value things you can make, but most require multiple inputs, needing both ore and some kind of fuel.

  • Each Smith can do one of the following:
    • Turn 1 Adamantine Ore and 1 Fuel into Adamantine Finished Goods (worth 60).
    • Turn 1 Iron Ore and 2 Coal into Steel Finished Goods (worth 20).
    • Turn 1 Iron Ore and 1 Fuel into Iron Finished Goods (worth 10).
    • Turn 1 Copper Ore, 1 Tin Ore and 1 Fuel into Bronze Finished Goods (worth 10).
    • Turn 1 Copper Ore and 1 Fuel into Copper Finished Goods (worth 5).
    • Turn 1 Tin Ore and 1 Fuel into Tin Finished Goods (worth 5).
  • Each Crafter can do one of the following:
    • Turn 1 Gold Ore and 1 Fuel into Gold Finished Goods (worth 20).
    • Turn 1 Silver Ore and 1 Fuel into Silver Finished Goods (worth 10).
    • Turn 1 Wood into Wood Finished Goods (worth 4).
  • Fuel:
    • Wood can be used as fuel.
    • Coal can be used as fuel (though your dwarves will use wood first, as coal is more valuable both as a resource and potentially for making steel).
    • If neither of those are available, but you have exterior access (see Warriors), you can buy Fuel at a cost of 3 value of finished goods/Fuel.  (This is not very profitable, but is better than smiths and crafters sitting idle).

FARMERS, BREWERS AND FOOD

Each round, each dwarf in your fort eats 1 Food.  Your fort begins with 1 round worth of Food (meaning that e.g. your 13-dwarf fort could actually manage with production of 12 Food/round).

Two professions produce Food:

  • Farmers produce 10 Food/round if you have exterior access, but 4 Food if you do not.
  • Brewers produce 4 Food/round regardless of exterior access.  However, having alcohol to drink also makes your dwarves work harder: if your fort has at least 1 Brewer, each dwarf has a 10% chance per round to enter a strange mood and work twice as hard (counting as 2 dwarves of their profession).  If you have no brewers, your listless, alcohol-deprived dwarves will not do this.

If you do not have enough Food at the end of a round, but do have exterior access, you can buy Food at 3 value of finished goods/Food.  This is an extremely high price (reflecting the risks and costs of merchants launching speculative expeditions to your fort), but the alternative is for your fort to collapse of starvation.

STRATEGY

Once you know how the rules work:

  • Survival strategy is pretty simple:
    • Have enough Brewers/Farmers (and possibly Warriors to help the Farmers) to feed your fort.
    • Do not have so many miners you hit adamantine (7 Miners will always reach adamantine every round, but if you have a Brewer lower numbers of Miners can still hit it with alcohol-induced hard work.  With that said, 5 miners are very unlikely to dig enough Adamantine to destroy your Fort, and 4 miners are astronomically unlikely.
  • Profit requires more effort:
    • Have Miners to hit whatever ores are present.
    • If available coal isn't enough, have Woodcutters (and Warriors to let them get outside) to cut trees and fuel things.
    • Have Smiths (for Iron/Bronze/etc) and Crafters (for Gold/Silver) to produce high-value finished goods.

In your fort, ideal strategy was:

  • 3 Miners.  Since your fort contained many shallow ores, but not Magnetite or Gold, and not much Coal, more miners had very limited value.  You don't know whether adamantine is present, but shouldn't try to dig for it anyway - it adds risk, and you have a lot of value available from smithing and crafting the ores you're getting just at Depth 3.
  • 2 Woodcutters.  Since you are mining lots of ore, you will need lots of fuel - and since your Coal Level is low, you won't be getting it just from mining.
  • 2 Warriors.  In a Light Forest, this is what's required to guarantee you external access for wood.
  • 1 Farmer and 1 Brewer.  With guaranteed external access, these will feed your fort while also giving you the chance at some bonus actions.
  • 3 Smiths and 1 Crafter.  With 3 different smith-based ores but only silver for Crafters, a third Smith produces a bit more value than a second Crafter.

LEADERBOARD

N.B: performance here was Monte-Carlod rather than calculated.  There is some ambiguity in ordering re. how you prioritize a small reduction in safety vs a substantial increase in profit - depending on how risk-averse/risk-loving you are, you could choose to rank GuySrinivasan lower or Alexander Ledovsky higher.

PlayerExpeditionSurvival RateAverage Value
Optimal Play3 Miner, 2 Warrior, 2 Woodcutter, 1 Farmer, 1 Brewer, 3 Smith, 1 Crafter100.0%599.3
simon4 Miner, 2 Warrior, 1 Woodcutter, 1 Farmer, 1 Brewer, 3 Smith, 1 Crafter100.0%*531.2
gammagurke4 Miner, 2 Warrior, 1 Woodcutter, 1 Farmer, 1 Brewer, 2 Smith, 2 Crafter100.0%*520.7
Treeslaughtered (abstractapplic)4 Miner, 2 Warrior, 2 Woodcutter, 1 Farmer, 1 Brewer, 1 Smith, 2 Crafter100.0%*508.4
GuySrinivasan5 Miner, 2 Warrior, 1 Woodcutter, 2 Farmer, 1 Brewer, 1 Smith, 1 Crafter99.3%452.4
Noosphere895 Miner, 1 Warrior, 4 Farmer, 2 Smith, 1 Crafter100.0%321.8
Magh Loduhr (Yonge)6 Miner, 1 Warrior, 4 Farmer, 1 Smith, 1 Crafter100.0%302.0
Alexander Ledovsky6 Miner, 1 Warrior, 1 Farmer, 2 Brewer, 2 Smith, 1 Crafter90.8%386.9
King Urist McAnvil13 random dwarves grabbed from the town square90.3%209.7
Entirely Random PlayA random distribution of 13 dwarves73.9%120.6

*These allocations in theory have a non-zero risk of Delving Too Deep with a string of very lucky/unlucky alcohol-fueled Mining, but in practice the odds are negligible (I believe on the order of 10^-8).

Players all did a good job of identifying how to survive, with no fort risking starvation, and no fort having 7 Miners.  There was more variation in how well players produced value, with the top players coming very close but not quite hitting the optimal allocation.  The most notable thing that got missed was the depth of available metal ores and how it made bringing fewer Miners reasonable - every submission brought at least 4 Miners, and many went up higher.

Congratulations to all players, particularly to simon (1st) and gammagurke (2nd), who came very close to optimal but most notably brought only 1 Woodcutter each (meaning that quite a bit of money went to buying wood to keep their Smiths and Crafters running), and to abstractapplic (3rd), who brought 2 Woodcutters but went low on Smiths and high on Crafters.  

(abstractapplic gained 10 Dwarf Points for their fort's suitably Dwarfy name, but lost 10 Dwarf Points for looking at a fort with four different types of shallow metal deposit and declaring that they were going to make money by crafting things out of wood like some kind of pansy Elf.  Our Dwarf Point Leader is therefore Yonge.)

I also see we've got some new players - congratulations to you as well!  I hope you enjoyed the scenario - if you did, the D&D.Sci tag contains a list of past scenarios, and you can subscribe to that tag to get notifications when new ones are posted (abstractapplic and I try to make sure this happens around once a month).

FEEDBACK REQUEST

As usual, I'm interested to hear 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 too complicated to decipher?  Or too simple to feel realistic?  Or both at once?  Do you have any other feedback?

Thanks for playing, and I hope you had fun!

New Comment
10 comments, sorted by Click to highlight new comments since:

Reflections on my attempt:

It looks like I was basically right. I could have done slightly better by looking more closely at interactions between features, ore types especially; still, I (comfortably) survived and (barely) proved my point to the King, so I'm happy with the outcome I got.

(I'm also very pleased by the fact that I picked up on the ore-based-vs-wood-based distinction; or, rather, that the ML library I've been building automatically picked up on it. Looks like my homebaked interpretability tools work outside their usual contexts!)

Reflections on the challenge:

Another excellent entry, and a hard act to follow. The jokes landed, the premise was fun but coherent, and the scenario was challenging yet tractable.

Having multiple quantitative success metrics was a fascinating choice. To be honest, I think there was some missed potential here; if the best strategy wasn't simultaneously survival-optimal and money-optimal, there could have been some interesting tension from players deciding their blood-to-treasure exchange rates. I'll have to try and work something like that into a future game.

the ore-based-vs-wood-based distinction

 

I'm curious as to what exactly you found there.  Ore-based vs wood-based production wasn't really an intended distinction - rather, ore and wood were intended to be used together.  I added woodcrafting as an afterthought late in development (when Crafters were performing very poorly due to only having two craftable ores), and it still isn't a major source of income.  Even in your SHAMEFULLY ELFISH fort, your Crafters spend most of their time on Silver, and only make things out of wood when poor mining yield/alcohol-fueled crafting frenzies make them run out of silver.  The intended distinctions were:

  • Wood-based vs Coal-based fuel - you need one or the other, with Wood becoming more important the less coal you have.
  • Precious vs nonprecious metals - you need Crafters to work gold and silver, but Smiths to work iron/bronze/etc.

Having multiple quantitative success metrics was a fascinating choice. To be honest, I think there was some missed potential here; if the best strategy wasn't simultaneously survival-optimal and money-optimal, there could have been some interesting tension from players deciding their blood-to-treasure exchange rates. I'll have to try and work something like that into a future game.

There were two goals on my end from this, one of which succeeded and one of which did not:

  • Providing multiple levels of success.  
    • The aim was to make 'stay alive' a relatively easy goal that most players could accomplish with a little work.
    • 'Maximize value' was meant to be a harder goal that required more effort.  
    • I'm reasonably happy with how this went - most players hit 100% survival, and everyone found some effects (e.g. Farmers).
  • Providing a relatively clean environment where effects stood out, as a window into deeper mechanics that players could use to help understand the world-model.  This is a bit fuzzy, and didn't actually end up happening, so I'll flail at a couple vague examples of what I mean and hope I can convey it:
    • Several people noticed that there were two ways a fort could die ('starving' and 'digging too deep'.)  Some people noticed that Digging Too Deep happened a lot with 7 miners, fairly often wih 6, and rarely with 5 (I think simon was the most explicit here).
    • A thing that could have been noticed but wasn't was that all of the Digging Too Deep forts had either 7+ miners or 5-6 miners plus at least one Brewer.  No fort with e.g. 6 Miners and no Brewer ever Dug Too Deep.
    • If players had noticed that, I think it could have been a very powerful window into game mechanics: it could have pointed very strongly both to 'brewers help other dwarves work harder' and to 'hitting explicit thresholds of # Miners is important'.  The 100% nature of 'survive/die', and the complete lack of any way a fort could die other than the two above, made the data for this clearer than anywhere else in the dataset.
    • Similarly, Warriors were important for exterior access.  This had a clear and visible effect on survival via Farmers: again, simon gave the most detail here, successfully realizing that 3 Farmers/Brewers were needed to feed your fort, but 2 could work so long as at least 1 was a Farmer and you had 2 or more Warriors.
    • This also affected Woodcutters - Woodcutters are a very important role, but looked weak in the dataset because of their need for exterior access.  However, the effect of Warriors on Woodcutters only affected Fort Value, and this effect was mixed up with the ability to buy wood, the need for ore & crafting professions as well for wood to have an effect on value,  different values of different ores, adamantine screwing with values, etc.
    • I was hoping that the more visible Warrior-Farmer effect could help provide insight into 'warriors help you do stuff outside' - doing similar survival analysis in other biomes could have revealed that 1 Warrior was sufficient in Plains, 2 in Forest or Tundra, and lots in Jungle, and poking into the interaction of 'enough warriors' with other professions could have explained Woodcutters.

I'm curious as to what exactly you found there.

Briefly: I told my learner "assume there are two sources of income for Light Forest forts; assume they are log-linked functions of the data provided with no interactions between features; characterize these income sources."

The output graphs, properly interpreted, said back:

  • The larger source of income benefits greatly from Miners, benefits from the presence of every ore (especially Haematite), likes coal, and benefits from having one Smith.
  • The smaller source of income benefits from Woodcutters, benefits from having two (but not more) Warriors, hard-requires at least one Woodcutter and Warrior in order to be viable, actively dislikes Coal, doesn't care about ores (except Copper for some reason), and strongly benefits from Crafters.

(In reviewing my graphs in retrospect I also see a small bump in performance for both sources associated with having exactly one Brewer; I missed that the first time because it looked like noise and I'd assumed Brewers only mattered to the survival half of the challenge.)

This wasn't 100% right, and missed some important detail, but given the bad assumptions I built it on - an additive model with a lot of interactions sprinkled on top would have been a better match - I'm pleasantly surprised by how closely it matches (a valid interpretation of) ground truth.

  • The larger source of income benefits greatly from Miners, benefits from the presence of every ore (especially Haematite), likes coal, and benefits from having one Smith.
  • The smaller source of income benefits from Woodcutters, benefits from having two (but not more) Warriors, hard-requires at least one Woodcutter and Warrior in order to be viable, actively dislikes Coal, doesn't care about ores (except Copper for some reason), and strongly benefits from Crafters.

 

Ah, I see!  That is a meaningful interpretation of reality, but rather than 'ore-based vs wood-based' I'd phrase it as a distinction between:

  • Staying inside and mining.  Benefits from all ores, and miners.  Makes only a few finished goods (smelting only with coal) but still benefits from higher coal level and one or two dwarves to smelt. 
  • Also getting outside and getting fuel.  Needs warriors to get you outside, benefits a lot from woodcutters as well, smelts whatever ores are available and crafts wood if it's left over.

Just a quick comment of encouragement. I haven't played and might not play them live or comment, but I still find these scenarios really cool and enjoy reading both the write-ups and how close the players come! It's also great that you're building the backlog because it gives great opportunity to try the older puzzles at my own pace. Great work! Keep it up, you and everyone playing :D 

Appreciated, thank you!

Well, I did okayish for a first time player, but I didn't get to the top. Not an unexpected result however.

Question, why do you Monte Carlo win rates rather than calculate them?

Calculating survival and value numbers is straightforward in some cases (e.g. 6 Miners plus a brewer has a readily calculable chance of digging too deep.)

It's much harder in other cases. Your submission, for example, is very hard to calculate expected value for - you need to buy some of your fuel...and you have exterior access half the time but not the other half...and in order to get your first bit of money with which to buy the first fuel your miners need to hit at least one coal...running a simulation for this is much easier than trying to calculate it.

I suppose I could have explicitly calculated some numbers that were easy and Monte Carlod the ones that were hard, but the second reason to Monte Carlo it is that I'm lazy and Monte Carloing everything is much simpler. In order to create the dataset I already needed to write code to simulate a fort, and once I have that code it's very easy to just say 'okay, now run it 100k times with these inputs.'

Well done on your performance - even if not the top performance, you both guaranteed survival and beat the King on value, so you clearly made some good progress!

Yay 100% survival chance with no analysis whatsoever. I just opened up the web interactive and guessed (3x farmers and warriors because food and fighting are essential, 2x woodcutters and miners for good resource supply, and 1x of everything else to cover all the bases). (368.3 value)

I've finally found a way to spoiler my comments or posts: Use the :::spoiler tag and I can spoiler comments.

Question, does anybody use this technique for spoilers?