Skip to content

[Feature] Add LBForaging environment wrapper - #4301

Merged
vmoens merged 2 commits into
pytorch:mainfrom
Iliamsou:feature/lbforaging-wrapper
Sep 9, 2026
Merged

[Feature] Add LBForaging environment wrapper#4301
vmoens merged 2 commits into
pytorch:mainfrom
Iliamsou:feature/lbforaging-wrapper

Conversation

@Iliamsou

@Iliamsou Iliamsou commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a native TorchRL wrapper for the Level-Based Foraging (LBF)
multi-agent Gymnasium environment.

Files added/modified:

  • torchrl/envs/libs/lbforaging.py (new): LBForagingWrapper + LBForagingEnv
  • torchrl/envs/libs/__init__.py, torchrl/envs/__init__.py: export the new classes
  • docs/source/reference/envs_libraries.rst: doc entry
  • test/libs/test_multiagent.py: TestLBForaging (8 tests — env construction for multiple configs, wrapper construction from a pre-built env, per-agent reward/done shapes, truncation vs termination across an episode boundary, collector integration)

Motivation and Context

LBF is a widely used cooperative MARL benchmark for credit assignment;
TorchRL currently has no wrapper for it.

…rapper for the Level-Based Foraging (LBF) multi-agent Gymnasium environment
@pytorch-bot

pytorch-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4301

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit ace8c20 with merge base b0eab87 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 8, 2026
@github-actions github-actions Bot added Documentation Improvements or additions to documentation Environments Adds or modifies an environment wrapper Feature New feature labels Sep 8, 2026
@vmoens vmoens added the ci/optdeps Run the full tests-optdeps suite on this PR label Sep 8, 2026
@github-actions github-actions Bot added the CI Has to do with CI setup (e.g. wheels & builds, tests...) label Sep 8, 2026

@vmoens vmoens left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

@vmoens
vmoens merged commit 9b0587e into pytorch:main Sep 9, 2026
123 of 124 checks passed
vmoens added a commit that referenced this pull request Sep 9, 2026
Co-authored-by: Vincent Moens <vincentmoens@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/optdeps Run the full tests-optdeps suite on this PR CI Has to do with CI setup (e.g. wheels & builds, tests...) CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Documentation Improvements or additions to documentation Environments Adds or modifies an environment wrapper Feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants