Move by editing coordinates, fudge colours, normalize LLM markup, repair the scripts - #102
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The three commits that landed on #101's branch after it was merged, plus one cleanup. #101 merged at
b109dff; these came after, so nopull_requestevent 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_translatenow shifts the element's own coordinates — position attributes,pointspairs, 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_colormoves 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#392800on 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_strokeno 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_svgruns on both LLM entry points and rewrites: relative paths to absolute,polygon/polylinetopath, presentation properties out ofstyle, 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.pycarried@functools.cacheon a plotting function — unhashable arguments, so it raised on every invocation, and had since commite51beb1plot_run.pyunpacked 5-tuples from a convergence history cut to 4, and printed a score column that no longer existsclean_runs.pykept zero nodes and deleted every drawing: bare-id filenames parse asscore = inf, and the next line treatsinfas invalidbench_search.pyread the deletedscorecolumn, so every curve was emptyThe fourth exposed one in
src:save_nodewrote0.0for any measure a node lacked.front_scoreexists only on the nodes the evaluator saw, so every other node recorded a perfect evaluator score. Now blank — and that showedfront_scorenever 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 fromstats.csvinstead.