t5lab.planner_vs_greedy¶
planner_vs_greedy
¶
The planner's reason to exist: mvprop routes AROUND walls; greedy gets trapped by them.
Single-agent navigation on rooms / corridors / maze / random-obstacle maps (the frozen distilled planner, no policy, no GPU). For each (map, start, goal) we descend two controllers to the goal:
- greedy — step to the free 4-neighbour that most reduces Chebyshev distance to the goal; STAY if none strictly improves (exactly ctde_v0's greedy_move, single-agent). This is the reactive baseline: it CANNOT climb "away" to get around a wall, so a wall on the straight line traps it.
- mvprop — step to the free 4-neighbour of maximum learned value V; STAY at a local max. The value field floods around walls, so descending it follows a true geodesic.
Reports reach-rate + path/optimal length for each, per map type, and renders a composite PNG of cases where greedy is trapped but mvprop routes through.
Run: PYTHONPATH=. PLANNER=/tmp/mvprop_distilled.eqx JAX_PLATFORMS=cpu $PY -m t5lab.planner_vs_greedy
descend
¶
descend(start, goal, wall, score, budget, greedy)
score(cell)->higher-is-better for mvprop; for greedy we use -Chebyshev(cell,goal). Returns (path, reached).
Source code in experiments/t5lab/planner_vs_greedy.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |