A CLI to simulate games of Egyptian Ratscrew, including potentially game-breaking strategies as listed below. If you want to know which strategies win under which conditions, you can also view the paper this repository was built for here: https://scholarspace.library.gwu.edu/concern/gw_etds/5425kb44d?locale=en
To simulate new strategies in the Egyptian Rafter game, follow these steps:
- Clone the repository
- Run
bundle installto install the required dependencies.
To run the simulation, use the following rake task with your desired options:
rake game:simulate [options]--playercount=[num players]: Specify the number of players in the game.--probablistic=[true|false]: Enable or disable probabilistic game behavior.--specialplayers=[list of players]: Provide a comma-separated list of special players (no spaces). See the list of available special players below.--gameiterations=[numgames](optional): Set the number of game iterations. Default is 100,000.--winpercentage=[0-100](optional): Set the win percentage threshold. Default is 75, only relevant ifprobablistic=true.--burnamount=[numcardstoburn](optional): Specify the number of cards to burn. Default is 1.
Strategies::QUALITATIVE::ALL_FACES: Slap on every card played after any face card is played.Strategies::QUALITATIVE::JACK_THROUGH_KING: Slap on every card played after J-K is played.Strategies::QUANTITATIVE::TWOCARD: Slap on every card after 2 cards have been played.Strategies::QUANTITATIVE::THREECARD: Slap on every card after 3 cards have been played.Strategies::QUANTITATIVE::FOURCARDStrategies::QUANTITATIVE::FIVECARDStrategies::QUANTITATIVE::SIXCARD
Note: The difference in --playercount and number of special players listed will be filled in with reflexive players.
rake game:simulate -- --playercount=4 --probablistic=true --specialplayers=Strategies::QUALITATIVE::ALL_FACES,Strategies::QUANTITATIVE::THREECARD --gameiterations=100 --winpercentage=90 --burnamount=2