Yahtzeeql – Yahtzee solver that's mostly SQL
a year ago
- #Python
- #Yahtzee
- #Game Simulation
- Create a Python virtual environment named 'yahtzee-venv' and activate it.
- Install dependencies from 'requirements.txt' and run tests with './test.sh'.
- Execute 'yahtzee.py' with various strategies like 'random', 'random_greedy', 'all_yahtzee', 'prob', and 'prob_with_difficulty'.
- Use '--runs' to specify the number of games to simulate, '--interactive' for manual category selection, and '--show-plot' to visualize score distribution.
- Generate a SQLite database with 'build_prob_db.py' containing tables for all rolls, roll transitions, and expected values for strategies.
- Average scores for strategies: 'random' (84.5), 'random_greedy' (86.5), 'all_yahtzee' (87.5), 'prob' (88.5), 'prob_with_difficulty' (89.5).