Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- HUNT_PER_ACTION = 3
- MIRROR_REWARD = 108
- FINAL_REWARD = 1638 * 2
- HUNT_LOSS = 10
- WOUND_ACTIONCOST = 3.0 / 4.5
- ATTEMPTS = 100000
- LEVEL = 11
- HUNT_GOAL = (LEVEL * (LEVEL+1))/2
- CHANCE = .3
- total_ppa = 0.0
- total_monies = 0.0
- total_hunt_actions = 0
- total_actions = 0
- for i2 in xrange(ATTEMPTS):
- eff_ppa = 0.0
- hunt = 0
- actions = 0.0
- hunt_actions = 0.0
- wound_actions = 0.0
- while(True):
- hunt += HUNT_PER_ACTION
- actions += 1
- if hunt >= HUNT_GOAL:
- hunt_actions += 1
- if random.random() <= CHANCE:
- break
- hunt -= HUNT_LOSS
- wound_actions += WOUND_ACTIONCOST
- monies = (FINAL_REWARD + MIRROR_REWARD * actions)
- total_monies += monies
- total_hunt_actions += hunt_actions
- total_actions += hunt_actions + actions + wound_actions
- print total_monies / total_actions
- print total_monies / ATTEMPTS
- print total_hunt_actions / ATTEMPTS
- print total_actions / ATTEMPTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement