Checkpoint 5 - incomplete

This commit is contained in:
Johnny Fernandes
2026-05-11 10:35:39 +01:00
parent 6688325d89
commit b457155538
13 changed files with 174 additions and 74 deletions
+15 -12
View File
@@ -7,12 +7,15 @@ policy that runs under LiDAR perception in Webots.
sim demos (active-scan teacher on tracker output, K=4 frame stack)
bc_pretrain.py ──► runs/bc_v3 (deployed policy — beats Strömbom on n≥8)
bc_pretrain.py ──► runs/bc (BC baseline)
(optional: tools/auto_dagger.sh + tools/dagger_merge_train.py
│ if sim-trained doesn't transfer cleanly to Webots)
KL-regularised PPO fine-tune (training/train_ppo.py)
runs/bc_dagger
runs/rl (deployed `rl` mode)
# optional branch — kept for reference, not deployed:
runs/bc_dagger (Webots-grounded DAgger refinement, useful if a
modified world breaks sim-to-real transfer)
```
## Files
@@ -42,14 +45,14 @@ rollout collection, not gradient compute.
# 1. Sim demos with the active-scan + Strömbom teacher under LiDAR
# perception. K=4 frame stack so the MLP has temporal context.
python -m tools.collect_demos --teacher strombom \
--out demos_v3.npz --seeds-per-n 15 --subsample 3 --frame-stack 4
--out demos.npz --seeds-per-n 15 --subsample 3 --frame-stack 4
# 2. Behavior-clone.
python -m training.bc_pretrain --demos demos_v3.npz \
--out runs/bc_v3 --epochs 60 --net-arch 512,512
python -m training.bc_pretrain --demos demos.npz \
--out runs/bc --epochs 60 --net-arch 512,512
# 3. Evaluate.
python -m training.eval --policy runs/bc_v3 \
python -m training.eval --policy runs/bc \
--max-flock 10 --max-steps 8000 --n-seeds 5
```
@@ -78,7 +81,7 @@ seat:
HERDING_POLICY_DIR=$PWD/training/runs/bc_dagger \
HERDING_DAGGER_DRIVER=student \
tools/auto_dagger.sh 3 60
python -m tools.dagger_merge_train --out runs/bc_dagger_v2
python -m tools.dagger_merge_train --out runs/bc_dagger
```
## Available analytic teachers
@@ -107,6 +110,6 @@ python -m training.eval --policy sequential --max-flock 10 --max-steps 8000 --n
tools/run_webots.sh 10 rl
```
The dog controller loads the highest-priority policy that exists
(`bc_dagger_v2``bc_dagger``bc_v3`). Override with
`HERDING_POLICY_DIR=…` if you want a specific checkpoint.
The dog controller loads `runs/bc` for `bc` mode and `runs/rl` for
`rl` mode. Override with `HERDING_POLICY_DIR=…` for a specific
checkpoint.