6 次代碼提交 c3693b1e92 ... fed79d6f1d

作者 SHA1 備註 提交日期
  Oleg Panashchenko fed79d6f1d Merge remote-tracking branch 'refs/remotes/origin/master' 1 周之前
  Oleg Panashchenko a3295448a1 fix: histogram bars now proportional instead of binary 1 周之前
  Oleg Panashchenko df816473db doc: .gitignore 1 周之前
  Oleg Panashchenko 6cf3bd4fa8 doc: config 1 周之前
  Oleg Panashchenko edf5c04001 doc: old prompts for changes 1 周之前
  Oleg Panashchenko 2607e5585b refactor: dictionary hints 1 周之前

+ 2 - 1
.claude/settings.local.json

@@ -42,7 +42,8 @@
       "Bash(curl -s http://localhost:3002/)",
       "Bash(curl -s -X POST http://localhost:3002/api/guess -H 'Content-Type: application/json' -d '{\"wordId\":4,\"guess\":\"style\",\"tryNo\":1}')",
       "Bash(curl -s http://localhost:3001/ru/api/daily)",
-      "Bash(curl -s -X POST http://localhost:3001/ru/api/guess -H 'Content-Type: application/json' -d '{\"wordId\":1,\"guess\":\"аббат\",\"tryNo\":1}')"
+      "Bash(curl -s -X POST http://localhost:3001/ru/api/guess -H 'Content-Type: application/json' -d '{\"wordId\":1,\"guess\":\"аббат\",\"tryNo\":1}')",
+      "Bash(pkill -f \"tsx server\")"
     ]
   }
 }

+ 14 - 0
.gitignore

@@ -1,3 +1,17 @@
 node_modules/
 dist/
 raw/abramov-ru-synonyms.json
+raw/eng5letter.py
+raw/english_5letter-freq.txt
+raw/english_words.csv
+raw/english-5letter-freq-sortalpha.txt
+raw/english-5letter-freq-sortfreq-wordsonly.txt
+raw/english-5letter-freq-sortfreq.txt
+raw/freqrnc_readme-utf8.txt
+raw/freqrnc_readme.txt
+raw/freqrnc2011.csv
+raw/noun5letter.py
+raw/russian-5letter-freq-sortalpha.txt
+raw/russian-5letter-freq-sortfreq-wordsonly.txt
+raw/russian-5letter-freq-sortfreq.txt
+raw/russian-mnemonic-words-52.txt

+ 3 - 1
client/src/screens/Screen3Results.tsx

@@ -92,7 +92,9 @@ function Histogram({ stats }: { stats: GameStats }) {
         return (
           <div key={idx} style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '4px' }}>
             <span style={{ width: '20px', textAlign: 'right', fontWeight: 'bold', color: '#555' }}>{label}</span>
-            <div style={{ flex: 1, height: '20px', backgroundColor: count > 0 ? '#6aaa64' : '#d3d6da', width: `${Math.max(pct, count > 0 ? 5 : 0)}%`, minWidth: count > 0 ? '12px' : '4px', borderRadius: '2px' }} />
+            <div style={{ flex: 1, height: '20px', backgroundColor: '#d3d6da', borderRadius: '2px' }}>
+              <div style={{ height: '100%', backgroundColor: '#6aaa64', width: `${Math.max(pct, count > 0 ? 5 : 0)}%`, minWidth: count > 0 ? '12px' : '0px', borderRadius: '2px' }} />
+            </div>
             <span style={{ width: '24px', fontSize: '0.8rem', color: '#555' }}>{count}</span>
           </div>
         );

+ 2 - 1
data/word-bank-ru.json

@@ -2379,7 +2379,8 @@
     "алеут",
     "актор",
     "аксон",
-    "агуша"
+    "агуша",
+    "аудио"
   ],
   "targets": [
     {

+ 4 - 0
raw/01-refactor-runtime-difficulty-replay copy.txt

@@ -0,0 +1,4 @@
+Refactor.
+Now word-bank*.json files have 4 elements in 'targets' object: pre-defined 'id', 'word', and calculated 'difficulty' and 'replays'. 
+The 'difficulty' and 'replays' are returned by API on the last guess.
+Can 'difficulty' and 'replays' be calculated at runtime before returned by API, and the two fields removed from word-bank*.json files?   

+ 5 - 0
raw/02-refactor-difficulty-replay-no-startup-to-cache.txt

@@ -0,0 +1,5 @@
+Refactor.
+Now difficulty and replays are calculated at startup for 3 solvers. The 4th solver is excluded due to startup time constraints.
+Could we remove these calculations for all words from startup, but take it from cache. The cache is empty at startup. 
+Once a word is first returned by API, the calculations for all 4 algorithms are started for the word is a separate thread, 
+and then calculated results are stored to the cache. API returns replays and difficulty values from the cache. 

+ 6 - 0
raw/03-feature-complexity.txt

@@ -0,0 +1,6 @@
+Feature
+New files raw/english-5letter-sortfreq-wordsonly.txt and raw/russian-5letter-sortfreq-wordsonly.txt 
+coniain new dictionaries sorted by descending frequency appearance in common texts.
+Replace dictionaries in word-bank*.json to content of the new files. Pick a set of distinct 100 words for each language for 
+targets from new dictionaries using gaussian distribution with mean on the first word, and sigma on the 100th - so 
+most frequent words appear more frequently than uncommon words.

+ 6 - 0
raw/04-feature-edit-validate-word.txt

@@ -0,0 +1,6 @@
+Feature. UI: make word editable with on-the-fly word verification. 
+- Add blinking underline cursor in the current guess to show location where new letter will be inserted.
+- Update on-screen keyboard to add row with the keys: Enter, Left, Right, Backspace. Remove Enter and Backspace from existing rows.
+- If current try line does not contain 5 letters, or current try is not a valid word per API call, grey out and disable 'Enter' key.
+- Left and Right keys move cursor by one position.
+- When cursor points to a letter, entering new letter replaces the letter under cursor, and does not change anything else.

+ 2 - 0
raw/05-feature-tap-guess-move-cursor.txt

@@ -0,0 +1,2 @@
+Feature
+Tapping on a letter in current guess should move cursor to the tapped letter.

+ 3 - 0
raw/09-bug-statistic-bars.txt

@@ -0,0 +1,3 @@
+fix
+Results page shows histogram with statistics by number of attempts. Horizontal green bars in the histogram has to reflect number of words solved by given number of attempts.
+By now the green bars show either empty of full.