This project measures risk-taking vs. laid-back strategies in the card game Schnapsen. We extended the Schnapsen framework by adding two rule-based bots and benchmarking their performance.
-
RiskTakingBot (Aggressive Strategy)
- Prioritizes high-value cards, trump exchanges, and marriages early.
- Always attempts to win tricks when possible.
- Location:
src/schnapsen/bots/aggressive.py
-
LaidBackBot (Passive Strategy)
- Conserves high-value cards for later phases.
- Minimizes point loss by playing low-value cards first.
- Uses trump cards only when necessary.
- Location:
src/schnapsen/bots/passive.py
-
Bot Tournament:
Executebot_comparison.pyto run matches between bots:python executables/bot_comparison.py
This script runs 1,000 games between:
LaidBackBotRiskTakingBotRandBotRdeepBot
Results (win rates and scores) are printed to the console.
-
Reproducibility:
- A fixed random seed (
seed=155) ensures reproducible outcomes. - Adjust
myrepeatsinbot_comparison.pyto change the number of games.
- A fixed random seed (
- Add/Remove Bots: Modify the
botslist inbot_comparison.py:bots = [bot1, bot2, bot3, bot4] # Add/remove bots here