Bryce Allen 591ac4bdeb refactor expected value calculations
Output should be the same as before refactor, except for max cap
reward for quests. The fix for using carving god on tail carves
in the cap calculation was only applied to the
print_monsters_and_rewards copy of the code. It should be less than
the previous value by the differece between min and max for tail
carve.
2015-03-20 19:15:26 -05:00
2015-03-19 23:21:08 -05:00
2015-03-15 09:51:05 -05:00
2015-03-18 20:02:01 -05:00

= Monster Hunter scripts

This repository contains scripts for calculating probabilities and expected
values for rewards and carves in Monster Hunter games.

== Dependencies

Tested using Python 2.7, might work with 2.6. Uses sqlite3, which is part of
the standard library now but I'm not sure it's always compiled in by default
in all Python distributions (e.g. for Windows or Mac OS X).

== Example usage

For a list of quests providing the specified monster part:

 ./mhrewards.py "Zinogre Jasper"

This gives expected values for the item from different sources, including
quest rewards, carves, capture, and shiny drops. An expected value of
8% means that on average, you would get 8 of the item from 100 quests. Note
that this is different from the probability of getting at least one, which
will be lower and is a pain to calculate when there can be different number
of rewards. It also takes into account Carving and Luck skills. The main
value shown assumes no food or armor skills. For Carves the extra values
listed on the right are for felyne skills Carver Lo, Carver Hi, then armor
skills Carving Master and Carving God. For quest rewards the extra values
are for food/armor skills Lucky Cat/Good Luck and Ultra Lucky Cat/Great Luck.
The totals at the end list the range from no skills to the best skill. For
capture rewards the extra values are for armor skills Capture Expect, Master,
and God.

For more manual calculations, mhprob.py can be used directly. The quest
"Plain Dangerous" in 3U has 2 fixed rewards in A, one in B. Diablos hardhorns
have a 5% chance:

 ./mhprop.py 5 2 3 69
 ./mhprop.py 5 1 1 69

For great luck, you would replace 69 with 90. The output includes both expected
value and probability of getting at least one.

== Math

Monster hunter rewards can be modeled using the Binomial distribution. The most
popular method I've seen online is to calculate the probability of getting at
least one. I prefer to use expected (mean) value, which is easier to calculate
and provides a more intuitive quantity. For
more information see the
link:http://en.wikipedia.org/wiki/Binomial_distribution#Mean_and_variance[Wikipedia article].
Description
Source for generating https://mhapi.info
Readme 9.6 MiB
Languages
HTML 82.2%
Python 16%
EJS 1%
JavaScript 0.7%