Multi-agent reinforcement learning (MARL) framework with an electricity market example. Includes PPO-based agents, Gymnasium-compatible environments, and reproducible sequential/parallel training.
Requires Python 3.11+ and uv.
uv sync --extra devEditable install is set up automatically from pyproject.toml.
easy_marl/
src/ # Core MARL framework
agents.py # Base + PPO agents
environment.py # Gymnasium-compatible MARL env
observators.py # Observation builders
examples/
bidding/ # Electricity market example
market.py # Market clearing + utils
training.py # Sequential/parallel training
tests/ # Unit tests
outputs/ # Training/eval artifacts (ignored)
main.py # Simple entry point
pyproject.toml # Build + deps
Run the default training:
uv run python main.pyUse the bidding example training directly:
uv run python -c "from easy_marl.examples.bidding.training import parallel_train; parallel_train(N=3, num_rounds=1, timesteps_per_agent=48)"uv run pytest -q- MARL environment returns agent-specific observations built via observers.
- Two training regimes:
- Sequential (Iterated Best Response / IBR)
- Parallel (Simultaneous Best Response / SBR)
- Reproducibility via explicit seeding (NumPy/Torch/processes).
- Package installs as
easy_marl(editable). - Example code lives under
easy_marl/examples/biddingto keep core MARL generic. - Outputs are written to
outputs/and excluded from packaging.
Choose and add a license (e.g., MIT or Apache-2.0) before public release.