Skip to content

Add H4perp geometric heuristic for free-coordinate initialization#137

Open
terryspitz wants to merge 1 commit into
mainfrom
claude/h4perp-free-coord-init
Open

Add H4perp geometric heuristic for free-coordinate initialization#137
terryspitz wants to merge 1 commit into
mainfrom
claude/h4perp-free-coord-init

Conversation

@terryspitz
Copy link
Copy Markdown
Owner

Diagnostic sweep across 11 glyphs × 5 axis configs showed that
starting Nelder-Mead from a perpendicular-arc offset (H4perp) wins
83% of 170 cases (mean rank 1.38) vs neighbour-average (rank 1.62)
or designer hints (rank 1.71, worst).

Solver.h4perpInit() runs after Phases 1-3 of initialise(). For each
free coordinate it tries 7 candidates (chord midpoint + 6 perp offsets
at ±10/20/35% of chord length), scores each with 50 Nelder-Mead
iterations, and picks the lowest-error start — provided it beats the
midpoint by >10% (threshold prevents noise-driven regressions in
symmetric geometries).

Also handle MaximumIterationsException from MathNet NelderMeadSimplex
so low-iteration quick-scores complete gracefully.

Update docs/DactylSpline.md with the diagnostic results, algorithm
description, and rationale.

https://claude.ai/code/session_013FzUDrEU4omtyJJtnSaqrP

Diagnostic sweep across 11 glyphs × 5 axis configs showed that
starting Nelder-Mead from a perpendicular-arc offset (H4perp) wins
83% of 170 cases (mean rank 1.38) vs neighbour-average (rank 1.62)
or designer hints (rank 1.71, worst).

Solver.h4perpInit() runs after Phases 1-3 of initialise(). For each
free coordinate it tries 7 candidates (chord midpoint + 6 perp offsets
at ±10/20/35% of chord length), scores each with 50 Nelder-Mead
iterations, and picks the lowest-error start — provided it beats the
midpoint by >10% (threshold prevents noise-driven regressions in
symmetric geometries).

Also handle MaximumIterationsException from MathNet NelderMeadSimplex
so low-iteration quick-scores complete gracefully.

Update docs/DactylSpline.md with the diagnostic results, algorithm
description, and rationale.

https://claude.ai/code/session_013FzUDrEU4omtyJJtnSaqrP
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.

2 participants