A packing tree that teaches RL where the boxes go
ICLR 2022 code that turns online 3D bin packing into a hierarchical tree search, so a DRL agent can handle continuous spaces and real-world constraints without combusting.

What it does
This is the reference implementation of “Learning Efficient Online 3D Bin Packing on Packing Configuration Trees” (ICLR 2022). Items arrive one at a time, and a deep reinforcement learning agent must place each into a 3D container immediately — no peeking at the future. The trick is representing the bin’s state as a hierarchical packing configuration tree (PCT), which the DRL policy traverses to pick a placement. Compared to the authors’ earlier DRL packing work, this version supports arbitrary container and item sizes, a continuous solution space, and approximate packing-stability checks.
The interesting bit
The tree structure is what makes practical constraints tractable: instead of the policy choosing raw coordinates in a continuous space, it walks a hierarchy of candidate configurations, which keeps the action space sane and training stable. The repo also ships heuristic baselines (LSAH, OnlineBPH) with sources cited in the code — a courtesy the field rarely extends.
Key highlights
- Continuous-domain online 3D BPP environment, plus the discrete one
- Approximate stability algorithms (linked to the authors’ separate work on arXiv)
- Pretrained models and a 3000-trajectory dataset available for download
- Training data generated on the fly; tensorboard logs included
- Part of a small family of repos (DRL, PCT, IR-BPP, Packing-Tools) covering lookahead, buffers, irregular shapes, and rendering
Caveats
- Pinned to an old stack — the authors suggest Python 3.7, gym 0.13, torch 1.10 — so expect dependency friction on modern environments
- Pretrained models only cover the discrete setting with a (10,10,10) bin; continuous-domain users must train their own
- Datasets and models live on Google Drive links, not in the repo
Verdict
Worth a look if you work on packing, logistics, or RL for combinatorial problems and want a well-cited, actively-maintained-family baseline. If you just need a quick heuristic packer, the included heuristic.py baselines may be all you need.
Frequently asked
- What is alexfrom0815/Online-3D-BPP-PCT?
- ICLR 2022 code that turns online 3D bin packing into a hierarchical tree search, so a DRL agent can handle continuous spaces and real-world constraints without combusting.
- Is Online-3D-BPP-PCT open source?
- Yes — alexfrom0815/Online-3D-BPP-PCT is open source, released under the MIT license.
- What language is Online-3D-BPP-PCT written in?
- alexfrom0815/Online-3D-BPP-PCT is primarily written in Python.
- How popular is Online-3D-BPP-PCT?
- alexfrom0815/Online-3D-BPP-PCT has 1.2k stars on GitHub and is currently cooling off.
- Where can I find Online-3D-BPP-PCT?
- alexfrom0815/Online-3D-BPP-PCT is on GitHub at https://github.com/alexfrom0815/Online-3D-BPP-PCT.