Optimizer
The optimizer varies bracketed numbers in your design, runs the same 19-angle Analyzer sweep the manual tool uses, and scores every candidate with your chosen weights. It relies on WebGPU and the same feature gate as the Analyzer.
It reads the FSL directly, so you can tag any number of values and let the optimizer chase brightness, contrast, and scintillation with a modern evolutionary search. WebGPU kernels score each candidate in milliseconds, so the workflow stays simple: choose the metrics that matter, set sensible bounds, and let the run settle.
Prepare adjustable values
- Wrap any numeric literal you want to expose with square brackets:
[ value ], or[ value, min, max ]. minandmaxare optional. When you leave them out the optimizer uses a +/-10% window around the starting value.- Brackets work anywhere the interpreter accepts a literal:
setstatements, facet commands, macro arguments, and expressions.
Example block ready for optimization:
set name "Optimizer Demo"
set gear 96
P1 0 @ [41.0, 40.0, 42.5] : 0.18 x8
P2 6 @ [39.5, 38.0, 41.0] : mp(P1)
P3 12 @ 38.2 : 0.16
G1 0 @ 90 : size x16
C1 0 @ [32.0, 30.0, 33.0] : mp(G1,P1) + girdle
T 0 @ 0 : .9
If no brackets are present the engine returns "No optimizable parameters found" and stays idle.
Choose your weights
- Open the optimizer panel with Open Optimizer. The sliders appear once the design has been processed successfully (
Cmd/Ctrl + Enter). - Pick a preset to load weights for Average Brightness, Contrast Density, Contrast Intensity, Scintillation Score, and Compactness. The built-in presets are Balanced Default, Brilliance Boost, Contrast Focus, Precision Cut, and 2026 Launch Contest.
- Adjust any slider between 0 and 10. Press Save Preset to store the current mix; the studio keeps a local copy and syncs it to your account when cloud features are available.
Launch and monitor a run
- Process the design and clear every FSL error. The optimizer checks the same run status as the Analyzer and will show the reason if it stays locked.
- Press Start Optimization. The button switches to "Optimization Running", the cancel button becomes Stop & Keep Best, and the viewer throttles to ~20 FPS while the GPU works.
- The progress panel lists the current status, iteration, best score (calculated from your weights on Hearts & Arrows-normalised metrics), analyser throughput in pixels per second, and metric deltas versus the starting design.
- Stopping keeps the strongest candidate so far and turns the start button into Resume Optimization; you can pick up right where you left off without losing that snapshot.
Behind the scenes the optimizer explores nearby combinations automatically and never strays outside the min and max you set.
Compare and apply
- As soon as a valid candidate exists the comparison panel opens with side-by-side viewports labeled Original and Optimized plus a contribution table that shows how each metric moved.
- The Replace Editor with Optimized button swaps the editor contents with the current best parameters. Save Optimized as New Version writes a revision while preserving the original file.
- Apply actions stay hidden until you stop a run. Resume after applying if you want to explore further from the updated baseline.