How jackserafini/briscolarl works
BriscolaRL is a PyTorch reinforcement-learning project for training and comparing DQN and PPO agents on the Briscola card game. The principal workflow is to run training episodes against the game environment, update an agent, save weights, then evaluate win rates and score breakdowns. The environment implements game state, legal actions, trick resolution, rewards, and opponent turns; the agent modules implement their respective learning methods. README documents training, evaluation, saved models, and result outputs. Notebook internals were not sampled, so notebook relationships are based on README documentation.
Main entry points: briscola.py Briscola environment · train.ipynb Training workflow · evaluate.ipynb Evaluation workflow · dqn_agent.py DQN agent
Components 10
Game environment
- Briscola environment
briscola.py
Learning agents
- DQN agent
agents/dqn_agent.py - PPO agent
agents/ppo_agent.py - Random agent
agents/random_agent.py
Experiment workflow
- Training workflow
train.ipynb - Evaluation workflow
evaluate.ipynb - Result plots
plots.ipynb
Results and artifacts
- Saved weights
models - Run outputs
outputs
Other components
- Player
Connections 14
- Player → Briscola environment: plays actions
briscola.py - Briscola environment → Player: returns observations
briscola.py - Briscola environment → DQN agent: requests opponent action
briscola.py - Briscola environment → PPO agent: requests opponent action
briscola.py - Training workflow → Briscola environment: runs episodes
README.md - Training workflow → DQN agent: trains
README.md - Training workflow → PPO agent: trains
README.md - Training workflow → Saved weights: saves models
README.md - Evaluation workflow → Saved weights: evaluates models
README.md - Evaluation workflow → Briscola environment: runs episodes
README.md - Evaluation workflow → Run outputs: records results
- Result plots → Run outputs: plots results
- DQN agent → Briscola environment: uses environment spaces
agents/dqn_agent.py - PPO agent → Briscola environment: uses environment spaces
agents/ppo_agent.py