Scoundrel is a dungeon-crawling card game where players navigate through rooms, collect cards, and battle monsters.
play [--seed SEED]Play interactively in the terminal. Use --seed for deterministic deck shuffling (same seed = same game sequence).
# Clone the repository
git clone https://github.com/Lizzard1123/scoundrel.git
cd scoundrel
# Create conda environment
conda env create -f environment.yml
conda activate scoundrel
# Install package
pip install -e .
# Play the game
playconda env create -f environment.yml
conda activate scoundrel
pip install -e .This implementation includes two AI agent approaches for playing Scoundrel:
Monte Carlo Tree Search agent with parallelization support for high-performance gameplay.
Features:
- ⚡ Parallel simulation workers
- 🧠 Transposition table caching
- 📊 Performance visualization tools
- 🎯 Configurable exploration parameters
Console Scripts:
| Command | Description |
|---|---|
mcts |
Watch the MCTS agent play interactively |
mcts-eval |
Evaluate MCTS agent performance |
mcts-plot |
Visualize MCTS episode performance |
Usage Examples:
# Interactive gameplay
mcts --num-simulations 1000000 --num-workers 8
# Performance evaluation
mcts-eval --num-games 10 --verbose
# Episode visualization
mcts-plot --num-simulations 1000000 --batch 5 --confidenceMCTS data collection pipeline for training AlphaGo-style neural network agents with supervised learning from expert gameplay.
Data Collection Results:
Games: 5041
Statistics:
Wins: 1316 (26.11%)
Average score: -21.45
Best score: 30
Worst score: -188
Average turns per game: 42.8
Total turns: 215803Reinforcement learning agent using a Transformer-based architecture with PPO training.
Features:
- 🔄 Transformer encoder for sequence planning
- 🎯 MLP for immediate tactical decisions
- 📈 TensorBoard integration
- 💾 Checkpoint management
Training:
cd scoundrel/rl/transformer_mlp/scripts
./train.shpytestblack .
isort .scoundrel/
├── game/ # Core game logic
├── models/ # Game state models
├── rl/ # AI agents
│ ├── mcts/ # MCTS implementation
│ └── transformer_mlp/ # RL agent
└── ui/ # Terminal UI
Made with ❤️ for card game enthusiasts





