Last active
August 20, 2020 23:21
-
-
Save CatTrinket/235ea5def9f024e0bab5de9fa0d92d3c to your computer and use it in GitHub Desktop.
The expected amount of time it takes to complete the art wing of the museum in Animal Crossing: New Horizons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date, timedelta | |
from fractions import Fraction as F | |
def tries_before_next(already_collected): | |
"""How many more real pieces you'll need to buy on average to get the next | |
new one | |
""" | |
chance_new = F(43 - already_collected, 43) | |
chance_new = chance_new * F(4, 5) + F(1, 5) | |
return 1 / chance_new | |
def main(): | |
# How many real pieces you'll need to buy to get all unique ones | |
pieces_total = sum(tries_before_next(n) for n in range(43)) | |
# How many visits that'll take, at an average of 1.4 real pieces/visit | |
visits = pieces_total / F('1.4') | |
# The date that gives, assuming one visit per two weeks | |
approx_date = date.today() + timedelta(days=round(visits * 14)) | |
print( | |
f'{float(pieces_total)} pieces, {float(visits)} visits, ' | |
f'ETA {approx_date}' | |
) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment