Repository navigation
feat(ios): learn per-thumb adaptive touch offsets in 1.7 KB - #3196
Open
kitlangton wants to merge 1 commit into
Open
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
Upgrade Labs Adaptive touch to a 4-level hierarchical Empirical Bayes and exponentially weighted bias model (0 -> Global -> HandZone -> Key) backed by a fixed 1,728-byte binary in the App Group container: - Split unsplit keyboards into left and right thumb zones and unify pitch normalization on characterWidth + gap alongside TypingDecoder. - Gate label admission on attested words, unshifted hit rectangles, a 0.85-pitch Huber taper, unimodal spread checks, and zero-contamination rollback for reverted or backspace-edited words. - Clamp personal key centers to +/-0.22 x +/-0.24 key pitches with pairwise horizontal neighbor anti-compression (>= 0.75 pitch separation). - Add seeded Monte Carlo benchmarks and corruption fuzzing across centered and shifted-thumb personas.
This branch has not been deployed
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.
Adaptive touch on iOS now learns left and right thumb offsets separately in a 1.7 KB file and adapts within about 100 clean words.
In Settings › Labs › Adaptive touch (off by default), Spatial autocorrect shifts its invisible tap centers toward where each thumb actually lands without moving drawn keycaps, hit targets, or swipe paths. Centered typists see zero change.
❌ Before
✅ After
0 -> Global -> Left/Right Thumb Zone -> Key) with smooth recency decay learns each thumb zone independently per layout, orientation, and one-handed inset bucket.±0.22 × ±0.24key pitches, and keeps neighboring keys at least0.75pitches apart.0.85-pitch Huber taper teach the model, persisted to a memory-mapped1,728-byte App Group file off the main thread.📊 Numbers: seeded Monte Carlo typing benchmark across 4 shifted-thumb personas (portrait uniform, opposing left/right thumbs, one-handed inset, and wide landscape) after ~100 warmup words, plus 500 centered-typist words and 1,050-word tap autocorrect regression gate.
mappedIfSafeload (median, 50 runs)The new
ThumbOffsetBenchmarkTestssuite fails without the v2 hierarchy and passes 4/4 tests; fullHEXMobileTestspasses 1,056 tests (0 failed, 5 skipped).👀 Read:
ios/HEXShared/FullKeyboard/AdaptiveTouchBias.swiftaroundpromote(context:geometry:), where 3-stage shrinkage, unimodal variance gating, and pairwise neighbor anti-compression meet. The rest is routine.🔍 Planned iOS keyboard accuracy and memory pass · no user reports · measured in Simulator XCTest benchmarks
Checks run
python3 scripts/code-shape.py --check: pass (0 hard problems)xcodebuild test -project HEXMobile.xcodeproj -scheme HEXMobile -only-testing:HEXMobileTests: 1,056 passed, 0 failed, 5 skippedxcodebuild test -project HEXMobile.xcodeproj -scheme HEXMobile -only-testing:HEXMobileTests/AutocorrectBenchmarkTests: 98.67% Top-1 (1,036/1,050), 0.00% clean-word false positives