Monday, August 25, 2008

MouseHunt Math Quiz #5: Forcefield or Deathbot?

* PROBLEM

There is only one hunting location. You can buy cheese and traps by mail orders only. Goods are magically delivered within a few seconds after placing an order. But you can order goods only at midnight times.

You need cheese equivalent of 10 gold for hunting for a day (regardless of trap).
No minimum order value, but delivery charge of 200 gold per order will be applied, regardless of order value.

Forcefield cost = 500 gold
Deathbot cost = 550 gold
Drillbot cost = 1000 gold

You can use only one trap at a time, but you can switch traps whenver you wish.

The following is revenue for each trap.
Swiss army ~ 20 gold / day
Forcefield ~ 50 gold / day
Deathbot ~ 60 gold / day

Mice do not drop loot and do not steal gold.

In your inventory, you have:
a swiss army trap, 500 gold, but no cheese at all. Now it's midnight time, make a purchase decision now!

* EXAMPLE SCENARIO

You have 500 gold on day 0. Then you order cheese enough for 30 days (300 gold). Now you have no gold left (delivery charge = 200 gold).

On day 30, you have 600 gold (with a swiss army trap, you earn 20 gold per day). Then you spend all your gold for cheese enough for 40 days.

On day 70 (40 days later), you have 800 gold. Then you order a forcefield trap (500 gold) and cheese enough for 10 days (100 gold). Now you have no gold left.

On day 80 (10 days later), you have 500 gold (with a forcefield trap, you earn 50 gold per day).

* OBJECTIVE

Acquire digby drillbot as soon as possible.

* QUESTION

How many days do you need before you can purchase a drillbot?

***********************
* UPDATES

- Please start with: a swiss army trap, 500 gold, but no cheese at all. Please do not continue from the example scenario.
- Each and every order charges 200 gold for delivery, including an order of a trap without cheese
- Bonus question: assume that other things remain the same, but drillbot costs 800 gold (instead of 1000 gold).


***** ANSWER KEY *****

I use Wilbert Ho's format (Hope you don't mind :D)

MAIN QUESTION

Day 0 (START): Swiss/500 gold/No cheese
Buying 30 days' worth of cheese. (0 Gold left)
Day 30 (30d Later): Swiss/600 gold/No cheese
Buying 40 days' worth of cheese. (0 Gold left)
Day 70 (40d Later): Swiss/800 gold/No cheese
Buying the DEATHBOT (550g) and 5 days' worth of cheese. (0 Gold left)
Day 75 (5d Later): DeathBot/300 gold/No cheese
Buying 10 days' worth of cheese. (0 Gold left)
Day 85 (10d Later): DeathBot/600 gold/No cheese
Buying 16 days' worth of cheese. (240 Gold left)
Day 101 (16d Later): DeathBot/1200 gold/No cheese
Buying Digby Drillbot. (0 Gold left)

ANSWER = 101 days.


BONUS QUESTION

Day 0 (START): Swiss/500 gold/No cheese
Buying 30 days' worth of cheese. (0 Gold left)
Day 30 (30d Later): Swiss/600 gold/No cheese
Buying 38 days' worth of cheese. (20 Gold left) ***IT IS TRICKY RIGHT HERE***
Day 68 (38d Later): Swiss/760+20 gold/No cheese
Buying the FORCEFIELD (500g) and 8 days' worth of cheese. (0 Gold left)
Day 76 (8d Later): ForceField/400 gold/No cheese
Buying 20 days' worth of cheese. (0 Gold left)
Day 96 (20d Later): ForceField/1000 gold/No cheese
Buying Digby Drillbot. (0 Gold left)

ANSWER = 96 days.


***** EXPLANATION *****

There are two main decisions that you need to make.

(1) When/what to upgrade?

You can do a quick trial-and-error test and see that an upgrade is necessary for both main and bonus questions. So, an upgrade is necessary to acquire a drillbot sooner.

If you upgrade TOO EARLY (when you have little gold on hand), you will have to order several times and the delivery cost is very expensive. If you upgrade TOO LATE, you will lose an opportunity to harvest much higher earnings from Forcefield or Deathbot.

Timing is the toughest variable that you need to optimize. Did you realize that? lol...

(2) When/how much cheese to buy?

This is my recommended strategy: you should upgrade earlier if the number of orders remain the same.

For instance, you want to try Forcefield in the BONUS QUESTION. At the moment before upgrade, if you have 760-770 gold, you will need to order three more times; 780-890 gold -> order two more times; 900 gold -> you have enough gold to upgrade to FF and buy cheese that generates income of 1000 gold (drillbot 800 gold + delivery 200 gold) in one order. NOTE: If you have 750 gold or less, your progress will not go anywhere! Excel will help you determine these intervals quite quickly :).

In the example, you had better upgrade when you have 760 gold than 770 gold and 780 gold than 850 gold. This is because an early upgrade will give you higher profits from FF but will not cost you more delivery charges.

OK, now you should try 760, 780 and 900 gold for FF route. You need to work back a bit and calculate the day you have 1000 gold on hand.
760 gold -> hunt with Swiss Army for 66 days and earn 1000 gold on day 100.
780 gold -> hunt with Swiss Army for 68 days and earn 1000 gold on day 96.
900 gold -> hunt with Swiss Army for 110 days and earn 1000 gold on day 130.

Do the same thing for DB route:
800 gold -> hunt with Swiss Army for 70 days and earn 1000 gold on day 97.
820 gold -> hunt with Swiss Army for 92 days and earn 1000 gold on day 115.
920 gold -> hunt with Swiss Army for 102 days and earn 1000 gold on day 119.

Bear in mind that if you don't upgrade at all, you need 110 days. You see? 96 days is the optimum point!

That's the bonus question.

For the main question, many people just got lucky because the optimum route does not require you to carry gold until the end.
Here are numbers.
FF route:
760 gold -> hunt with Swiss Army for 66 days and earn 1200 gold on day 105.
790 gold -> hunt with Swiss Army for 69 days and earn 1200 gold on day 102.
940 gold -> hunt with Swiss Army for 104 days and earn 1200 gold on day 128.

DB route:
800 gold -> hunt with Swiss Army for 70 days and earn 1200 gold on day 101.
820 gold -> hunt with Swiss Army for 92 days and earn 1200 gold on day 119.
950 gold -> hunt with Swiss Army for 105 days and earn 1200 gold on day 125.

Bear in mind that if you don't upgrade at all, you need 130 days.


***** SOMETHING COOL *****

Here are some interesting facts:

Profit = Earning - cost of cheese
Trap cost breakeven = Trap cost / daily profit
Delivery cost breakeven = Delivery cost / daily profit

Swiss army
# profit = 10 gold/day
# delivery cost breakeven = 20 days

Forcefield
# profit = 40 gold/day
# trap cost breakeven = 12.5 days
# delivery cost breakeven = 5 days

Deathbot
# profit = 50 gold/day
# trap cost breakeven = 11 days
# delivery cost breakeven = 4 days


The delivery cost is the most challenging part in this quiz. Without it, this problem would have been a piece of cake. Now you know that under certain circumstances you should carry some gold before you upgrade, right? :)

Sunday, August 3, 2008

MouseHunt Math Quiz #4: SuperBrie @ 520 gold apiece

*** THE ARGUMENT (PART A) - DEMAND FROM GNAWNIA HUNTERS

Facts and assumptions
  • Normal brie has 90% attraction rate at the price of 200 gold
  • Super brie has 99% attraction rate at the price of x (variable)
  • average gold earned per mouse in Gnawnia = 400
  • your best trap gives a catch rate = 80%
  • if you successfully attract but fail to catch a mouse, expect that the bait is stolen for sure and average gold stolen (or cheese equivalent in addition to the bait) = 40 gold
  • cheese staleness probability = 30% per hunt that fails attract a mouse)
  • revenue is generated only when you successfully catch a mouse
  • cheese bait cost incurs only when a mouse is successfully attracted
  • cheese staleness cost incurs only when you fail to attract a mouse, 30% of the time
  • steal cost incurs only when a mouse is successfully attracted but not caught

*Normal brie
90% attraction rate -> 10% you fail to attract a mouse; 90%*80% = 72% you catch a mouse; 18% you can attract but fail to catch a mouse. your bait is stolen (and probably something else)

PER HUNT figures:
revenue = 72%*400 = 288 gold
cheese bait cost = 90%*200 = 180 gold
cheese staleness cost = 10%*30%*200 = 6 gold
steal cost = 18%*40 = 7.2 gold
profit = 288 - 180 - 10.8 - 7.2 = 94.8 gold

*Super brie
99% attraction rate -> 1% you fail to attract a mouse; 79.2% you catch a mouse; 19.8% you can attract but fail to catch a mouse.

PER HUNT figures:
revenue = 79.2%*400 = 316.8 gold
cheese bait cost = 99%*x = 0.99x gold
cheese staleness cost = 1%*30%*x = 0.003x gold
steal cost = 19.8%*40 = 7.92 gold
profit = 316.8 - 0.99x - 0.003x - 7.92 = 308.88 - 0.993x gold

To make SuperBrie as economically attractive as Brie,

94.8 gold = 308.88 gold - 0.993x
A superbrie is worth x = 215.59 gold in the eyes of an economically rational Gnawnia hunter.


*** THE ARGUMENT (PART B) - DEMAND FROM BURROUGH HUNTERS

In Burrough, you need radioactive blue cheese in order to be successful, especially at the Mousoleum.

You can have Radioactive Blue cheese (RB) in three ways:
1) A curd potion (collected as a loot in the lab by steel mice or bionic mice) + 30 SB can be converted to 30 RB.
2) A curd potion + 5 normal brie + (300 gold/pc of normal brie) can be converted to 5 RB.
3) Collect a RB as a loot (extremely rare).

Making RB from normal brie:
5 RB = 5 Normal brie + 1500 gold + 1 potion ..........(1)

Substituing: 1 Normal brie = 200 gold in (1):
5 RB = 1000 gold + 1500 gold + 1 potion
5 RB = 2500 gold + 1 potion
30 RB = 15000 gold + 6 potion ..........(2)

Making RB from normal brie:
30 RB = 30 SuperBrie + 1 potion ............(3)

(2)=(3):
15000 gold + 6 potion = 30 SuperBrie + 1 potion
15000 gold + 5 potion = 30 SuperBrie
500 gold + 1/6 potion = 1 SuperBrie

This is to say that one piece of SuperBrie should be worth at least 500 gold in the eyes of an economically rational Burrough hunter. The curd potion is a rare object though. If a potion is worth more than 60 gold apiece, then the current regulated price ceiling of 510 gold at the market place interferes the market equilibrium somehow.

Let's say a potion is worth 120 gold. Then, an economically rational Burrough hunter can pay up to 520 gold apiece for SuperBrie!


*** THE ARGUMENT (PART C) - AGGREGATE DEMAND

Since SuperBrie is in unlimited supply - you can donate as much as you want to get SuperBrie, only demand will determine the price of SuperBrie.

In the old days before the Mousoleum was discovered, the needs for radioactive blue cheese is not high. This makes SuperBrie prices go more towards 215.59 (Gnawnia) than towards 520 (Burroughs).

Why SuperBrie was traded at 300 gold per piece a few months ago?

Because about 70% of cheese demand accounts for Gnawnia hunts!
70%*215.59 + 30%*520 = 306.913 gold

How about now? I think 40% of cheese demand accounts for Gnawnia hunts!
40%*215.59 + 60%*520 = 398.236 gold

So, this is why SuperBrie is traded at 400 gold apiece right now.


*** YOUR TASK

Your task is to:
- Criticize reasoning of the argument. Why do you agree or disagree?
- Attack or support other people's arguments in this thread POLITELY.
- Suggest a better method to estimate a reasonable price of SuperBrie (if possible)

I am looking for replies with:
- logical and analytical reasoning (validity, limitation, implied assumption, etc)
- economic sense as well as mathematical sense
- objectivity and clarity of your critical/analytical standpoint

A plus: suggest a reasonable price of SuperBrie. Make assumptions as appropriate and show your calculations.

Some tips:
- there are points that were overlooked in the argument. Think about some other factors that might affect the argument, or scenarios to which the argument might not apply.
- there is no right or wrong answer. But it is important that you rationalize your thinking process well.
- think along the logical flow of the argument carefully. I have made some fallacies here and there, intentionally!