You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Noëlle 606f4019aa
Simulator complete
1 year ago
README.md Simulator complete 1 year ago
potato_game.py Simulator complete 1 year ago

README.md

Simulator for Potato, a one-page RPG

See https://twitter.com/deathbybadger/status/1567425842526945280 for details.

Potato is a single-player, one-page RPG where you play as a halfling, farming and harvesting potatoes while the Dark Lord amasses his forces elsewhere in the world.

You have three scores: DESTINY, POTATOES, and ORCS. Each round, you roll d6 to determine which type of event you experience: a day in the garden, a knock at the door, or a darkening of the world.

For the first two, you then roll a second d6 to determine how your scores change; the third event makes it cost more potatoes to get rid of orcs. (At the beginning of the game, you can spend 1 potato to reduce your ORCS score by 1.) If any score reaches 10, the game ends with that score’s ending; if DESTINY and ORCS reach 10 in the same round, ORCS wins, and if DESTINY and POTATOES reach 10 in the same round, you get a multi-win. (ORCS and POTATOES can never reach 10 in the same round.)

When the simulator has simulated the requested number of games, it will report its results: the number and percentage of wins for each score type, and the mean and median number of rounds it took to win a game.

Game Options

-v, --verbose       Print detailed information about each game.
                    This gets very long; probably don't use it if
                    you're asking for a large number of games!

-n, --numruns [N]   The number of games to simulate. Default: 10000

-m, --multiwin      Announce on the console when a game ends in a
                    multi-win. This can lead to a lot of output.

-i, --instructions  Print these instructions.

Mutually Exclusive Options:

-a, --alt           Use Wanderer's algorithm for determining when
                    to spend potatoes to reduce orcs. This spends
                    a potato if ORCS could win this round and
                    POTATOES could not, OR if ORCS is greater than 
                    one and a 1d10 comes up less than the ORCS
                    score. It will only spend a potato if there
                    are enough potatoes to spend.

-p, --potatoper [N] Use the Potato-Per algorithm for determining
                    when to spend potatoes to reduce orcs. This 
                    spends a potato when the ratio of POTATOES to
                    ORCS rises above a certain amount, modified by
                    the POTATOES cost to reduce ORCS by 1. It will
                    only spend a potato if there are enough 
                    potatoes to spend.
""")