# D&D.Sci Alchemy: Archmage Anachronos and the Supply Chain Issues Evaluation & Ruleset

This is a follow-up to [last week's D&D.Sci scenario](https://www.lesswrong.com/posts/sex8PDjnnqZgzCt5c/d-and-d-sci-alchemy-archmage-anachronos-and-the-supply-chain): 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_alchemy) you can use to test your answer, and generation code available [here](https://github.com/aphyer1992/dndsci_alchemy/blob/main/dndsci_alchemy.py) if you're interested, or you can read on for the ruleset and scores.

RULESET
=======

There are two steps to brewing a potion:

### STEP 1: MAGICAL POTENCY

Any ingredient that doesn't exist in the mundane world is Magical, while any ingredient that exists in the mundane world is not:

| **Magical** | **Not Magical** |
| --- | --- |
| Angel Feather | Badger Skull |
| Beholder Eye | Beech Bark |
| Demon Claw | Crushed Diamond |
| Dragon Scale | Crushed Onyx |
| Dragon Spleen | Crushed Ruby |
| Dragon Tongue | Crushed Sapphire |
| Dragon's Blood | Eye of Newt |
| Ectoplasm | Ground Bone |
| Faerie Tears | Oaken Twigs |
| Giant's Toe | Powdered Silver |
| Troll Blood | Quicksilver |
| Vampire Fang | Redwood Sap |

The first step of potion-brewing is to dissolve the magical potency out of the Magical Ingredients to empower your potion.  This requires the right amount of Magical Ingredients: too few, and nothing magical will happen and you will produce Inert Glop, while too many and there will be an uncontrolled Magical Explosion.

If you include:

*   0-1 Magical Ingredients: 100% chance of Inert Glop.
*   2 Magical Ingredients: 50% chance of Inert Glop, 50% chance OK.
*   3 Magical Ingredients: 100% chance OK.
*   4 Magical Ingredients: 50% chance OK, 50% chance Magical Explosion.
*   5+ Magical Ingredients: 100% chance Magical Explosion.

If your potion got past this step OK, move on to:

### STEP 2: DIRECTION

Some ingredients are used to direct the magical power into the desired resulting potion.  Each potion has two required Key Ingredients, both of which must be included to make it:

| **Potion** | **Key Ingredient 1** | **Key Ingredient 2** |
| --- | --- | --- |
| **Barkskin Potion*** | Crushed Onyx | Ground Bone |
| **Farsight Potion** | Beholder Eye | Eye of Newt |
| **Fire Breathing Potion** | Dragon Spleen | Dragon's Blood |
| **Fire Resist Potion** | Crushed Ruby | Dragon Scale |
| **Glibness Potion** | Dragon Tongue | Powdered Silver |
| **Growth Potion** | Giant's Toe | Redwood Sap |
| **Invisibility Potion** | Crushed Diamond | Ectoplasm |
| **Necromantic Power Potion*** | Beech Bark | Oaken Twigs |
| **Rage Potion** | Badger Skull | Demon Claw |
| **Regeneration Potion** | Troll Blood | Vampire Fang |

**Well.  Sort of.  See the Bonus Objective section below.*

Some ingredients (Angel Feather, Crushed Sapphire, Faerie Tears and Quicksilver) aren't Key Ingredients for any potion in the dataset.  Angel Feather and Faerie Tears are nevertheless useful - as magical ingredients that don't risk creating any clashing potion, they're good ways to add magical potential to a recipe.  Crushed Sapphire and Quicksilver have no effect, including them is entirely wasteful.

If you've gotten through Step 1, the outcome depends on how many potions you've included both the Key Ingredients of:

*   0 potions: with nothing to direct it, the magical potential dissolves into an Acidic Slurry.
*   1 potion: you successfully produce that potion.
*   2 or more potions: 
    *   Sometimes (1/n of the time, where n is # of potions you included) a random one of the potions will dominate, and you will produce that one.
    *   The rest of the time, the clashing directions will produce Mutagenic Ooze.

So, for example, if you brew a potion with:

*   Dragon Spleen, Dragon Scale, Dragon Tongue and Dragon's Blood:
    *    You have included 4 magical ingredients, and the Key Ingredients of one potion (Fire Breathing).
    *   50% of the time you will get a Magical Explosion, 50% of the time you will get a Fire Breathing Potion.
*   Badger Skull, Demon Claw, Giant's Toe, Redwood Sap.
    *   You have included 2 magical ingredients, and the Key Ingredients of two potions (Rage and Growth).
    *   50% of the time you will get Inert Glop, 25% of the time Mutagenic Ooze, 12.5% of the time Growth Potion, and 12.5% of the time Rage Potion.
*   Dragon's Tongue, Powdered Silver, Angel Feather and Faerie Tears:
    *   You have included 3 magical ingredients, and the Key Ingredients of one potion (Glibness).
    *   100% of the time, you will successfully brew a Glibness Potion.

STRATEGY
========

For best success, you needed to:

*   Include Crushed Onyx and Ground Bone, the Key Ingredients for...the desired potion.
*   Not include both Key Ingredients of any other potion.
*   Include exactly 3 Magical Ingredients.

This was made trickier by the fact that you had only 4 Magical Ingredients available (Demon Claw, Giant's Toe, Troll Blood and Vampire Fang), and that Troll Blood and Vampire Fang were the Key Ingredients of a Regeneration Potion (and hence you could not include both of them).

Nevertheless, you could get a 100% success rate by:

*   Including Crushed Onyx and Ground Bone (Key Ingredients).
*   Including Demon Claw and Giant's Toe (Magical Ingredients that don't make another potion with one another)
*   Including **one** of Troll Blood and Vampire Fang (third Magical Ingredient).
*   **Not** including Badger Skull (makes Rage Potion with Demon Claw) or Redwood Sap (makes Growth Potion with Giant's Toe).
*   **Not** including both Beech Bark and Oaken Twigs (Key Ingredients of...the wrong potion).
*   You could include Crushed Diamond or Quicksilver if you wanted, but it's wasteful and has no effect.

BONUS OBJECTIVE
===============

There was a secret bonus objective hidden in the dataset.  It could not be found purely with math on the dataset, it required you to think about the ingredient names and the patterns you were seeing.

On examination of the Key Ingredients of each potion, most potions had Key Ingredients that seemed in some way vaguely metaphorically linked to the potion's effect:

*   The Key Ingredients of a Farsight Potion are Beholder Eye and Eye of Newt (both are eyes, to help you see).
*   The Key Ingredients of a Fire Breathing Potion are Dragon Spleen and Dragon's Blood (both parts of a fire-breathing dragon).
*   The Key Ingredients of a Growth Potion are Giant's Toe and Redwood Sap (both from things well known for growing large).

There were two apparent exceptions to this, however.

*   The Key Ingredients of a Barkskin Potion **appeared to be** Crushed Onyx and Ground Bone.
*   The Key Ingredients of a Necromantic Power Potion **appeared to be** Beech Bark and Oaken Twigs.

This was not, in fact, true.  

The Key Ingredients of a Barkskin Potion are in fact Beech Bark and Oaken Twigs, and the Key Ingredients of a Necromantic Power Potion are Crushed Onyx and Ground Bone.

Archmage Anachronos is not trying to brew a Barkskin Potion.  He is trying to brew a Necromantic Power Potion in order to conduct a Dread Necromantic Ritual during the upcoming magical conjunction.

Not wanting to reveal this, he's swapped around 'Barkskin Potion' and 'Necromantic Power Potion' in his records of results, telling you that every recipe that actually produced a Barkskin Potion produced a Necromantic Power Potion and vice versa.

**simon** realized this, I don't think anyone else figured it out independently (as opposed to seeing his comment mentioning it).

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

Archmage Anachronos's algorithm for deciding which ingredients to use is as follows:

*   20% of brews are experiments.  He grabs 1d6+2 random ingredients to test together, but if they seem too expensive he reconsiders and grabs a different 1d6+2 ingredients (causing a bias in his experiments towards both smaller numbers of ingredients and cheaper ingredients).
*   80% of brews are attempts to make a specific potion.  He chooses a random potion to try to produce.  Then he picks a random recipe that he has successfully made that potion with in the past, and repeats that recipe.  (He does not have a good enough recollection to try a recipe that's had high odds of success at brewing that potion in the past, he'll try any recipe that has ever brewed that potion).

The main relevance of this algorithm to players was that some combinations of ingredients, especially ones that could produce potions and **especially** ones that could produce multiple different potions, had been brewed many more times than would happen under pure randomness.

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

This scenario was intended to be relatively straightforward, and bearing this out we had several perfect scores:

*   **simon** fully deciphered the algorithm, got a 100% success rate and also solved the Bonus Objective.
*   **abstractapplic** and **Lorxus** also both got a 100% success rate at brewing 'Barkskin Potion', but did not independently solve the Bonus Objective until they saw **simon**'s solution to it.
*   **Unnamed**, **Yonge**, and **qwertyasdef** all got a 50% success rate:
    *   **Yonge** and **Unnamed** looked at past brewing and tried Crushed Onyx, Demon Claw, Ground Bone and Vampire Fang (50% to succeed, but low on magic).
    *   **qwertyasdef** instead used Crushed Onyx, Demon Claw, Ground Bone, Quicksilver, and Troll Blood based on an analysis of which available ingredients often appeared in 'Barkskin Potion', but had the same result of 50% success due to low magic.

Congratulations to all players!  Particular congratulations to **simon** for figuring out the Bonus Objective!  Maniacal cackling to all other players!

REFLECTION & FEEDBACK REQUEST
=============================

The goal I was shooting for with this scenario was to reward people for actually paying human attention to patterns, rather than just hoping for \[YOUR FAVORITE ALGORITHM HERE\] to solve all your problems for you.

The Bonus Objective was obviously written to require out-of-context thought.  I also tried to set up the scenario to be amenable to thinking about what patterns might mean even with relatively little math: bearing this out, it looks like **Lorxus** managed to get a perfect score with relatively little in the way of complicated methods/tools just by e.g. thinking about what it might mean that including lots of ingredients led to Magical Explosions and including few ingredients led to Inert Glop (and documented his thought process very well, thank you **Lorxus**!).

How did this feel from the player end?

As usual, I'm also interested to hear more general 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?  Do you have any other feedback?