Sustainable Foraging environment for multi-agent RL
Project description
Sustainable Foraging Benchmark
A reproducible benchmark for comparing multi-agent RL algorithms on the Sustainable Foraging environment (PettingZoo AEC API).
Forked from lb-foraging. Built on the Level-Based Foraging framework, adapted for sustainable foraging research.
Install
git clone https://github.com/pixel-87/sustainable-foraging.git
cd sustainable-foraging
uv sync
Quick Start
# Train with stable-baselines3 (choose preset: easy, fair, hard)
python -m scripts.train_sb3 --preset fair
# Run inference with a trained model
python -m scripts.inference_sb3 --preset fair --model logs/<run_name>/model
# List available presets and settings
python -m scripts.train_sb3 --list-presets
The benchmark protocol is documented in docs/benchmark_protocol.md.
Creating Environments
This is a PettingZoo AEC environment:
from sustainable_foraging.foraging import AECForagingEnv
env = AECForagingEnv(
players=2,
field_size=(8, 8),
max_num_food=2,
sight=8,
max_episode_steps=500,
)
env.reset()
while env.agents:
agent = env.agent_selection
obs, reward, terminated, truncated, info = env.last()
action = env.action_space(agent).sample()
env.step(action)
env.render()
Citation
If you use this benchmark, please cite the original work:
@inproceedings{christianos2020shared,
title={Shared Experience Actor-Critic for Multi-Agent Reinforcement Learning},
author={Christianos, Filippos and Schäfer, Lukas and Albrecht, Stefano V},
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
year={2020}
}
@inproceedings{papoudakis2021benchmarking,
title={Benchmarking Multi-Agent Deep Reinforcement Learning Algorithms in Cooperative Tasks},
author={Georgios Papoudakis and Filippos Christianos and Lukas Schäfer and Stefano V. Albrecht},
booktitle = {Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks (NeurIPS)},
year={2021}
}
Contributing
Contributions are welcome! Please open an issue to discuss changes before submitting PRs.
License
Apache License 2.0 - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sustainable_foraging-2.0.0.tar.gz.
File metadata
- Download URL: sustainable_foraging-2.0.0.tar.gz
- Upload date:
- Size: 84.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82dbfb7de840f133498de8eecb33f5a3a31e853335e9a8282b79160bce514ff4
|
|
| MD5 |
e0c9b7404d0ad77dff1dc3bd5ebc7a01
|
|
| BLAKE2b-256 |
714ffbb32f6e1f5bd26b259f2f6860ec0a5c4bbba2886cc434539b9e894b1ac8
|
Provenance
The following attestation bundles were made for sustainable_foraging-2.0.0.tar.gz:
Publisher:
python-publish.yml on pixel-87/sustainable-foraging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sustainable_foraging-2.0.0.tar.gz -
Subject digest:
82dbfb7de840f133498de8eecb33f5a3a31e853335e9a8282b79160bce514ff4 - Sigstore transparency entry: 1383325175
- Sigstore integration time:
-
Permalink:
pixel-87/sustainable-foraging@466d89fcadc45aa838e251347a43c9b5eaaea891 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/pixel-87
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@466d89fcadc45aa838e251347a43c9b5eaaea891 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sustainable_foraging-2.0.0-py3-none-any.whl.
File metadata
- Download URL: sustainable_foraging-2.0.0-py3-none-any.whl
- Upload date:
- Size: 104.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
060d050289792bfbf5bba012a2d12b5d5e393f4422c8af55394d0b070fd06bf1
|
|
| MD5 |
db2b4f7de94c168f1cbf37a3cc9dcc98
|
|
| BLAKE2b-256 |
cbd4a187076acb8b6017e183ffee405c44fad0cd0d30884511f4a67b1ef1326f
|
Provenance
The following attestation bundles were made for sustainable_foraging-2.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on pixel-87/sustainable-foraging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sustainable_foraging-2.0.0-py3-none-any.whl -
Subject digest:
060d050289792bfbf5bba012a2d12b5d5e393f4422c8af55394d0b070fd06bf1 - Sigstore transparency entry: 1383325204
- Sigstore integration time:
-
Permalink:
pixel-87/sustainable-foraging@466d89fcadc45aa838e251347a43c9b5eaaea891 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/pixel-87
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@466d89fcadc45aa838e251347a43c9b5eaaea891 -
Trigger Event:
release
-
Statement type: