phygen
An agent-driven research environment for evolving executable artworks, with versioned code, visual feedback and an evaluation pipeline that can be inspected.
- Year
- 2026
- Role
- Concept, system design, development
- Tools
- Coding Agents, Evaluation Design, Creative Tools
Updated 20 October 2026

I built phygen to explore how a coding agent can change a visual system over many iterations without losing the link between source code, rendered output and evaluation.
The starting point is a seeded physarum simulation: particles sense and deposit trails, producing a changing transport network. Agents edit its JavaScript simulation, renderer and configuration. The result is a lineage of executable programs, not a folder of generated images.
Two saved versions of the simulation, with different approaches to density and contrast.
From a judging tree to a forward chain
Early iterations generated three variants per step and used a blind vision judge to rank their captures. A subsequent version added novelty thresholds and an archive for choosing parents. This exposed the central design problem: a more elaborate selection procedure was not, by itself, a better definition of artistic quality.

I then removed the ranking stage. Each step made one child of the newest working version and retained it if technical checks passed. That reduced candidate fan-out and made the history easier to follow, without treating a model’s preferred image as proof of progress.
Make every change inspectable
Each step works on a copy of its parent, receives recent rendered frames, and is checked against the allowed edit surface and package contract. The controller publishes an immutable, content-addressed snapshot before rendering a fixed-seed, fixed-step sample.
SQLite connects versions, captures, agent notes and usage. A replayable event stream exposes progress in the interface. Correctable faults get one bounded repair attempt; a failed step does not replace the last working version.

Generated code is treated as untrusted. The browser preview uses a separate artwork origin, a script-only sandboxed iframe and a restrictive content security policy. This is a browser boundary, not a substitute for the stronger container capture mode.

Calibrate the gate, not a claim about taste
Later work added image measurements for coherence, novelty and failure diagnostics, with a blind vision judge reserved for borderline cases. Thresholds were fitted from 124 saved versions, captured at 1024 x 1024, seed 1337, step 1000.
The gate defaults to warning mode: it records verdicts without rejecting versions. Evaluation becomes a visible, adjustable layer rather than an unexamined source of authority. This calibration uses known-kept frames, not a held-out human-preference benchmark. Cross-driver image reproducibility also remains unmeasured.






Selected saved versions show the range of the evolving program, not a ranking of artistic quality.
What the project established
The useful unit of creative agent work is not the prompt. It is the executable change together with its render, provenance, cost and failure record. phygen brings those pieces into one environment so that the system can be debugged and its evaluation choices questioned.

