zymera.viz
viz
zymera.viz — drawing for trajectories and worlds (opt-in extra).
Imports matplotlib/pillow; never imported by the headless core. The viz
doctrine is RE-SIMULATION: a run is reproducible from (env spec, checkpoint,
key), so render from a fresh rollout(..., keep="all") rather than storing
heavy training trajectories.
Deferred (tracked in README status): isometric renderer and keyboard teleop — port from zymera v0 when needed.
draw_frame
draw_frame(ax, world, *, comm_radius=None, show_delivered=True, annotations=())
Draw one world: coverage heat, walls, comm edges, agents (by group).
Source code in zymera/viz/render.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
render_comm_gif
render_comm_gif(worlds, path, *, comm_radius, fps=6, annotations=None)
GIF with the comm overlay: potential edges dotted, delivered solid.
Source code in zymera/viz/render.py
115 116 117 118 119 | |
render_gif
render_gif(worlds, path, *, fps=6, comm_radius=None, show_delivered=True, annotations=None)
Trajectory -> animated GIF at path. Returns the path.
Source code in zymera/viz/render.py
105 106 107 108 109 110 111 112 | |
make_report
make_report(traj, path, *, env=None, title='zymera report', fps=6, comm_radius=None)
Write a single-file HTML report for a rollout(..., keep="all") dict.
Sections: episode GIF, coverage-over-time, per-term reward curves (when the
rollout used collect=("reward_terms",)), final visit heatmap, and the
env composition when env is given.
Source code in zymera/viz/report.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |