Yahtzeeql – Yahtzee solver that's mostly SQL
a year ago
- #Python
- #Yahtzee
- #Game Simulation
- 创建一个名为'yahtzee-venv'的Python虚拟环境并激活它
- 从'requirements.txt'安装依赖项并通过'./test.sh'运行测试
- 使用'random'、'random_greedy'、'all_yahtzee'、'prob'和'prob_with_difficulty'等多种策略执行'yahtzee.py'
- 使用'--runs'指定模拟游戏次数,'--interactive'手动选择得分类别,'--show-plot'可视化分数分布
- 通过'build_prob_db.py'生成SQLite数据库,包含所有骰子组合、骰子转换和策略期望值的数据表
- 各策略平均得分:'random'(84.5分)、'random_greedy'(86.5分)、'all_yahtzee'(87.5分)、'prob'(88.5分)、'prob_with_difficulty'(89.5分)