Skip to content

impr(weakspot): score within-word bigrams instead of characters (@JMLegere) - #8403

Open
JMLegere wants to merge 1 commit into
monkeytypegame:masterfrom
JMLegere:impr/weakspot-bigrams
Open

impr(weakspot): score within-word bigrams instead of characters (@JMLegere)#8403
JMLegere wants to merge 1 commit into
monkeytypegame:masterfrom
JMLegere:impr/weakspot-bigrams

Conversation

@JMLegere

Copy link
Copy Markdown

Description

Weakspot currently attributes typing latency to individual characters. This means a slow 'th' transition makes h appear weak even when other transitions into h, such as sh, are fast.

This PR changes Weakspot to track bigrams. Candidate words are scored using the average of their observed bigram scores.

I did not touch the existing 5,000 ms error penalty, moving average, 20-candidate word selection, or session-local storage. There are no new settings, analytics, or persistence.

This PR also:

  • Applies typo penalties to the intended pair.
  • Excludes word boundaries, deletion timing, and automatic or composed input from pair measurements.
  • Clears transition context between tests while retaining learned scores.
  • Updates the Funbox description to “Focus on slow and mistyped letter pairs.”

Related to discussion #8104. This proposes a smaller change to the existing Weakspot Funbox than the persistent Learning Mode described there.

Note: Implementation and tests were done with AI assistance.

Checks

  • Adding quotes?
    • Make sure to follow the quotes documentation
    • Make sure to include translations for the quotes in the description (or another comment) so we can verify their content.
  • Adding a language?
    • Make sure to follow the languages documentation
    • Add language to packages/schemas/src/languages.ts
    • Add language to exactly one group in frontend/src/ts/constants/languages.ts
    • Add language json file to frontend/static/languages
  • Adding a theme?
    • Make sure to follow the themes documentation
    • Add theme to packages/schemas/src/themes.ts
    • Add theme to frontend/src/ts/constants/themes.ts
    • (optional) Add theme css file to frontend/static/themes
    • Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request
  • Adding a layout?
    • Make sure to follow the layouts documentation
    • Add layout to packages/schemas/src/layouts.ts
    • Add layout json file to frontend/static/layouts
  • Adding a font?
    • Make sure to follow the fonts documentation
    • Add font file to frontend/static/webfonts
    • Add font to packages/schemas/src/fonts.ts
    • Add font to frontend/src/ts/constants/fonts.ts
  • Check if any open issues are related to this PR; if so, be sure to tag them below.
  • Make sure the PR title follows the Conventional Commits standard. (https://www.conventionalcommits.org for more info)
  • Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title.

Closes #

@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff packages Changes in local packages labels Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff packages Changes in local packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants