# D&D.Sci Tax Day: Adventurers and Assessments

*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**
=========

It's that time of year again.  The time when the Tithe Assessment Exactors demand that all adventurers pay taxes on the various monster parts they have hacked off and sold in the past year.   And, more importantly for you, the time when clients begin banging on your door looking for advice on how to minimize their taxes.

This used to be a straightforward, if complex, application of the published tax rules.  But ever since the disaster a few years back (when one of your clients managed to pay 1 silver piece in tax and then receive as a rebate several thousand gold plus the princess's hand in marriage) the Tithe Assessment Exactors have been reluctant to publish the exact tax rules they use.

So when an adventuring team retains your services to help with their taxes, this is going to be a bit more difficult than before.  You don't have a list of the new tax rules: the one thing you do have is a [dataset](https://raw.githubusercontent.com/aphyer1992/dndsci_taxes/refs/heads/main/dndsci_tax.csv) of the taxes that various adventurers have been charged under them.

Your clients have got a list for you of how many monster parts of each kind they sold in the past year - it's too late to change that.  The one thing you can use is that, while their adventuring party has pooled its finances, each of them will be filing their taxes individually.  Perhaps, by cleverly allocating the monster parts among them, you can minimize their overall tax burden compared to other adventurers (and win more business...or at least avoid getting your head knocked off by their hulking barbarian!)

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

*   Your clients have sold the following monster parts in the past year:
    *   4 Cockatrice Eyes
    *   4 Dragon Heads
    *   5 Lich Skulls
    *   7 Unicorn Horns
    *   8 Zombie Hands
*   They need to divide these monster parts among the four of them for tax purposes.
    *   The parts assigned to all four adventurers combined must add up to the totals above.
    *   So you could assign taxes for:
        *   The 4 Cockatrice Eyes and 1 of the Lich Skulls to the 1st adventurer
        *   The 4 Dragon Heads and 1 of the Unicorn Horns to the 2nd adventurer
        *   2 Lich Skulls, 3 Unicorn Horns, and 4 Zombie Hands to each of the 3rd and 4th adventurers.
    *   Or you could assign all the monster parts to the 3rd adventurer, and nothing to any of the others!
    *   But you can't assign more than 4 Dragon Heads, or less than 7 Unicorn Horns.  (That would be tax fraud.)
*   Each adventurer will be charged taxes based on the monster parts assigned to them  (Taxes are measured in gold and silver pieces, with 10sp = 1gp).
*   Your objective is for your clients to get the lowest overall taxes (added across all four adventurers) possible.  To assist with this, you have a [dataset](https://raw.githubusercontent.com/aphyer1992/dndsci_taxes/refs/heads/main/dndsci_tax.csv) of past adventurers, and the taxes they were charged.

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

I'll aim to post the ruleset and results on April 28th: if you need more time, please let me know!

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.