Tutorials
Learn to use Coopetition-Gym through hands-on examples, from basic environment interaction to advanced multi-agent training.
Getting Started
Before diving into tutorials, ensure you have: 1. Installed Coopetition-Gym
- Verified your installation works
- Basic familiarity with Python and NumPy
Tutorial Overview
Beginner
| Tutorial | Description | Time |
|---|---|---|
| Quick Start | First steps with Coopetition-Gym | 15 min |
Intermediate
| Tutorial | Description | Time |
|---|---|---|
| Environment Deep Dive | Understanding observations, actions, and rewards | 30 min |
| Training with Stable-Baselines3 | PPO training on TrustDilemma-v0 | 45 min |
| PettingZoo APIs | Using Parallel and AEC interfaces | 30 min |
Advanced
| Tutorial | Description | Time |
|---|---|---|
| Multi-Agent Training | Independent and centralized training | 60 min |
| Custom Strategies | Implementing game-theoretic policies | 45 min |
| Experiment Design | Reproducible research workflows | 45 min |
Quick Start Guide
The Quick Start Tutorial covers: 1. Creating environments - Using the factory functions
- Basic interaction - Reset, step, observe
- Understanding observations - What agents see
- Understanding rewards - How payoffs work
- Running episodes - Complete interaction loops
Learning Path
For MARL Researchers
- Quick Start → Basic API familiarity
- Environment Deep Dive → Understanding state spaces
- Multi-Agent Training → Algorithm implementation
- Experiment Design → Reproducible benchmarks
For Game Theorists
- Quick Start → Basic API familiarity
- Custom Strategies → Implementing equilibrium strategies
- Case Studies → SLCD and Renault-Nissan analysis
For Engineers
- Quick Start → Basic API familiarity
- Training with Stable-Baselines3 → Practical training
- PettingZoo APIs → Integration patterns
Prerequisites by Tutorial
| Tutorial | Prerequisites |
|---|---|
| Quick Start | Python basics, NumPy |
| Environment Deep Dive | Quick Start completed |
| Training with SB3 | Quick Start, familiarity with RL concepts |
| PettingZoo APIs | Quick Start |
| Multi-Agent Training | SB3 tutorial, MARL concepts |
| Custom Strategies | Game theory basics |
| Experiment Design | All previous tutorials |
Code Repository
All tutorial code is available in the examples/ directory:
examples/
├── quickstart.py # Quick start examples
├── sb3_training.py # Stable-Baselines3 training
├── pettingzoo_demo.py # PettingZoo API examples
├── multi_agent/ # Multi-agent training scripts
└── strategies/ # Game-theoretic strategies
Next Steps
Start with the Quick Start Tutorial to begin working with Coopetition-Gym.
After completing tutorials, explore:
- Environment Reference - Detailed environment documentation
- API Documentation - Complete API reference