Skip to main content

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.

Sustainable Foraging

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.

Metadata

Release files for sustainable-foraging 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sustainable-foraging 2.0.0
File Size Uploaded
sustainable_foraging-2.0.0.tar.gz 84.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sustainable-foraging 2.0.0
File Interpreter ABI Platform
sustainable_foraging-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 188.6 kB

Release files / sustainable_foraging-2.0.0.tar.gz

Download URL sustainable_foraging-2.0.0.tar.gz
Size 84.0 kB
Tags Source
SHA-256 checksum
How to use checksums
82dbfb7de840f133498de8eecb33f5a3a31e853335e9a8282b79160bce514ff4
BLAKE2b-256 checksum
How to use checksums
714ffbb32f6e1f5bd26b259f2f6860ec0a5c4bbba2886cc434539b9e894b1ac8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 25, 2026.

Transparency log

Release files / sustainable_foraging-2.0.0-py3-none-any.whl

Download URL sustainable_foraging-2.0.0-py3-none-any.whl
Size 104.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
060d050289792bfbf5bba012a2d12b5d5e393f4422c8af55394d0b070fd06bf1
BLAKE2b-256 checksum
How to use checksums
cbd4a187076acb8b6017e183ffee405c44fad0cd0d30884511f4a67b1ef1326f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page