📋 Table of Contents
🎮 The Game
Scoundrel is a dungeon-crawling card game where players navigate through rooms, collect cards, and battle monsters.
🎯 Playing the Game
play [--seed SEED]
Play interactively in the terminal. Use --seed for deterministic deck shuffling (same seed = same game sequence).
🚀 Quick Start
# 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
play
⚙️ Setup
Using Conda (Recommended)
conda env create -f environment.yml
conda activate scoundrel
pip install -e .
🤖 Agent Approaches
This implementation includes two AI agent approaches for playing Scoundrel:
🌳 MCTS Agent
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 --confidence
Interactive MCTS visualizer showing real-time gameplay
Average outlook of the action picked at each turn
MCTS performance variability across multiple runs (6 out of 10 runs won)
🎯 MCTS Data Collection (AlphaGo Style)
MCTS data collection pipeline for training AlphaGo-style neural network agents with supervised learning from expert gameplay.
MCTS data collection showing game statistics and performance distribution
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: 215803
🧠 RL Agent
Reinforcement 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.sh
🛠️ Development
Running Tests
pytest
Code Formatting
black .
isort .
Project Structure
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
Metadata
Release files for scoundrel 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scoundrel-0.1.1.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scoundrel-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / scoundrel-0.1.1.tar.gz
| Download URL | scoundrel-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f29fb4869d8b6caa7025c619fe2147de60eec04310b2cec639d199cad49e019
|
|
BLAKE2b-256 checksum How to use checksums |
373d4a0debfaeb4f80710628ffb9d263a7ee8b7fd4216248dd0c2be4f7928d4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / scoundrel-0.1.1-py3-none-any.whl
| Download URL | scoundrel-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e72773808e7db4375e63c51e03d0aa13d6b956476baf8d54bf5ffb360aa5c32
|
|
BLAKE2b-256 checksum How to use checksums |
b86c87857888a36851d9cd93603b819504f0966bdacf471eab742b9ace4dbaae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for scoundrel 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.