AI Logistics Coordinator

Teaching an LLM to manage freight crises using GRPO reinforcement learning

OpenEnv Compatible GRPO + TRL + Unsloth Qwen2.5-1.5B Meta PyTorch Hackathon 2026

๐Ÿค— Live Space  ยท  ๐Ÿง  Trained Model  ยท  ๐Ÿ““ Colab Notebook

It's 3 AM. A port strike just shut down Mumbai.

COVID vaccines are stranded on Route R1. Election ballots are stuck at Delhi. โ‚น1.8 crore of server hardware is 7 hours late. A human dispatcher needs 30 minutes to triage this. We built an agent that does it in seconds.

โŒ

Current Systems

Rule-based optimizers. Great at routine scheduling. Fail completely when disruptions cascade. Cannot reason, cannot prioritize, cannot communicate.

โœ…

Our Agent

Reasons about network congestion, triages by urgency, reroutes strategically, and sends empathetic messages to customers โ€” all in a single turn.

๐ŸŒ The Environment

A real-time Indian freight network crisis simulator. The agent plays a centralized logistics coordinator managing cascading disruptions across JNPT, Delhi, and Mundra.

๐Ÿ‘๏ธ

What Agent Sees

Shipment states, route congestion (0โ€“100%), active disruptions, SLA time remaining, carrier availability

๐ŸŽฎ

What Agent Does

get_network_status ยท reroute_shipment ยท set_priority ยท communicate_eta ยท end_turn

๐Ÿ†

Three Task Tiers

EASY (2 ships, 1 disruption) โ†’ MEDIUM (4 ships, 3 disruptions) โ†’ HARD (7 ships, 4 failures)

๐Ÿ”ฌ What Makes This Novel

๐ŸŒ

Multi-Agent Pressure

Background agents compete for the same limited route capacity every turn. The agent must model the network โ€” not just react to individual shipments.

โณ

Long-Horizon Planning

5โ€“7 turn episodes. Early decisions cascade. Saving the pharmaceutical shipment on turn 1 changes which routes are available on turn 4.

๐Ÿง 

World Modeling Required

Partially observable. The agent must call tools to see the network. It cannot assume anything โ€” it must build its own world model each turn.

๐Ÿ’ฌ

NLP-Graded Communication

ETA messages are scored for empathy, specificity, and cause explanation. A unique test of "soft skills" that no other logistics env tests.

๐ŸŽฏ Anti-Gameable Reward Design

Three independent reward functions. Each has explicit negative penalties to prevent exploitation.

๐Ÿ—๏ธ Structure Reward

+0.4 Start with status check
+0.3 End with end_turn
-0.5 Duplicate end_turn (spam)
-0.3 Repeated status calls

๐Ÿ›ฃ๏ธ Routing Reward

+0.9 Clear route chosen
+0.5 All ships rerouted
-0.6 Congested route
-0.8 Empty route ID (loophole)

๐Ÿ“ข Communication Reward

+0.4 Message to delayed ship
+0.2 Empathy keywords
+0.1 Specific ETA given
-0.3 Duplicate message (spam)

๐Ÿ‹๏ธ 4-Phase GRPO Curriculum

Group Relative Policy Optimization โ€” the same algorithm behind DeepSeek-R1 โ€” on a free Colab T4 GPU.

๐ŸŸข Phase 1
TASK-EASY
lr=2e-5
โ†’
๐ŸŸก Phase 2
TASK-MEDIUM
lr=1e-5
โ†’
๐Ÿ”ฅ Phase 3
Mixed Hardening
6 rollouts
โ†’
๐Ÿšจ Phase 4
Correction Cycle
Loophole patch
1.5B
Model size
(Qwen2.5)
4-bit
QLoRA quantization
(Unsloth)
150+
Training
episodes
Free
Colab T4
GPU

๐Ÿ“ˆ Results: Observable Evidence

+327%
Live environment reward improvement (0.18 baseline โ†’ 0.7683 trained)
Untrained Baseline
0.18
After Phase 1 (Easy)
0.42
After Phase 2 (Medium)
0.61
Final (lora-final-perfect)
0.7683

๐Ÿค– What the Agent Actually Learned

๐Ÿ”

World Modeling

Always calls get_network_status first. Builds a mental model of the entire network before acting โ€” not guessing.

๐Ÿ›ฃ๏ธ

Strategic Routing

Checks route congestion before rerouting. Avoids the -0.6 penalty for choosing overloaded routes. 3+ reroutes per episode vs 1 before training.

๐Ÿ’ฌ

Empathetic Communication

Sends well-formed apologies with specific ETAs and causes. "We sincerely apologise โ€” your shipment will arrive by 6PM due to port congestion."

๐Ÿšซ

Stopped Hacking

Stopped spamming messages and empty routes after Phase 4 correction. Learned that strategic play earns more reward than loopholes.

๐Ÿ”— All Submission Links

ResourceLink
๐Ÿค— Live HF Spacespaces/Leavin1611/logistics-hackathon-env
๐Ÿง  Trained ModelLeavin1611/logistics-hackathon-model
๐Ÿ““ Training NotebookOpen in Colab
๐Ÿ“ Mini-BlogHF_BLOG_POST.md
๐Ÿ—๏ธ Environment Codeserver/environment.py

Stack: OpenEnv ยท FastAPI ยท TRL ยท GRPO ยท Unsloth ยท Qwen2.5-1.5B ยท Google Colab T4