Skip to content

Move by editing coordinates, fudge colours, normalize LLM markup, repair the scripts - #102

Merged
rasros merged 4 commits into
mainfrom
script-and-mutation-fixes
Aug 18, 2026
Merged

Move by editing coordinates, fudge colours, normalize LLM markup, repair the scripts#102
rasros merged 4 commits into
mainfrom
script-and-mutation-fixes

Conversation

@rasros

@rasros rasros commented Aug 18, 2026

Copy link
Copy Markdown
Owner

The three commits that landed on #101's branch after it was merged, plus one cleanup. #101 merged at b109dff; these came after, so no pull_request event fired for them and they had no CI until now.

Moves edit numbers, not transforms

#101 folded repeated translates into one. This removes them: mutate_translate now shifts the element's own coordinates — position attributes, points pairs, and absolute path coordinates, with an arc's radii, rotation and flags left alone.

A transform is a second description of where a thing is, laid over the first. Folding stopped it accumulating; it did not stop the coordinates saying one thing while the drawing does another, so every later mutation and every crossover still read a position that is not where the element appears. The folding regex is deleted with it.

Colours are fudged, never chosen

mutate_color moves a hex value by at most ±8 per channel, was ±60 — enough to random-walk a grey into brown over a few accepted mutations, and one run shipped #392800 on a drawing whose palette is black, white and two greys. Anything that is not hex is skipped: a name has no channels, so "changing" it means jumping somewhere arbitrary.

mutate_stroke no longer sets colours at all. It adds an outline in the shape's own fill, or removes one. An earlier attempt sampled from the drawing's palette, which is still a jump — an outline belongs to the shape it outlines.

Normalizing what the model returns

Which markup forms a model reaches for is a property of the model, not the task: one model's seeds carried 147 elements in relative path commands, which describe an offset from wherever the pen is and so cannot be moved at all. Asking the prompt more firmly does not fix that.

normalize_svg runs on both LLM entry points and rewrites: relative paths to absolute, polygon/polyline to path, presentation properties out of style, named colours to hex, short hex to long. Verified pixel-identical across 20 real seeds from two models, and idempotent, since it also runs on edits of already-normalised parents.

Scripts

Four breakages, found by running each against real run directories:

  • plot_run.py carried @functools.cache on a plotting function — unhashable arguments, so it raised on every invocation, and had since commit e51beb1
  • plot_run.py unpacked 5-tuples from a convergence history cut to 4, and printed a score column that no longer exists
  • clean_runs.py kept zero nodes and deleted every drawing: bare-id filenames parse as score = inf, and the next line treats inf as invalid
  • bench_search.py read the deleted score column, so every curve was empty

The fourth exposed one in src: save_node wrote 0.0 for any measure a node lacked. front_score exists only on the nodes the evaluator saw, so every other node recorded a perfect evaluator score. Now blank — and that showed front_score never reaches lineage.csv at all, since a row is written when a candidate is admitted, before the evaluator has seen anything. The bench reads the evaluator curve from stats.csv instead.

@rasros
rasros merged commit 93a018a into main Aug 18, 2026
1 check passed
@rasros
rasros deleted the script-and-mutation-fixes branch August 18, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant