dramaling-vocab-learning/複習算法優化建議.md

198 lines
5.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 複習時間算法優化建議
## 🤔 **當前設計分析**
### **現有算法**
```
下次複習時間 = 2^成功複習次數
答題錯誤校正:下次複習天數 × 0.6
熟悉程度 = 下次複習天數/365天
```
### **主要問題**
#### **1. 指數增長過快**
當前的 `2^n` 算法增長極快:
- 第1次2¹ = 2天
- 第2次2² = 4天
- 第3次2³ = 8天
- 第4次2⁴ = 16天
- 第5次2⁵ = 32天
- 第6次2⁶ = 64天
- 第7次2⁷ = 128天
- 第8次2⁸ = 256天
- 第9次2⁹ = 512天超過365天上限
**問題**: 只需要9次成功就達到365天對多數詞彙來說太快可能導致過早停止復習。
#### **2. 缺乏個人化調整**
- 沒有考慮詞彙難度差異A1 vs C2
- 沒有根據學習者程度調整
- 所有詞彙都使用相同的增長曲線
#### **3. 錯誤校正過於簡化**
- 所有錯誤都統一 × 0.6
- 沒有區分錯誤程度(完全不會 vs 小失誤)
- 沒有考慮題型差異
#### **4. 熟悉度計算不合理**
`熟悉程度 = 下次複習天數/365天` 會造成:
- 新詞彙熟悉度極低2/365 = 0.5%
- 稍有進展熟悉度仍很低32/365 = 8.8%
- 突然跳躍達到365天時熟悉度變100%
## 💡 **建議的改進方案**
### **1. 改良版SM-2算法**
```typescript
// 基本公式
nextInterval = Math.min(
previousInterval * difficultyFactor * performanceFactor,
365
)
// 難易度係數(根據詞彙和學習者程度差異)
function calculateDifficultyFactor(wordLevel: string, learnerLevel: string): number {
const levels = ['A1', 'A2', 'B1', 'B2', 'C1', 'C2']
const wordIndex = levels.indexOf(wordLevel)
const learnerIndex = levels.indexOf(learnerLevel)
const difficulty = wordIndex - learnerIndex
return Math.max(1.1, Math.min(2.5, 1.3 + difficulty * 0.2))
}
// 表現係數(根據答題表現和題型)
const performanceFactors = {
// 翻卡題
flipcard: {
完全不記得: 0.5,
猶豫但正確: 1.0,
輕鬆正確: 1.3
},
// 選擇題/填空題等
objective: {
答錯: 0.6,
答對: 1.1
}
}
```
### **2. 更合理的熟悉度算法**
```typescript
// 綜合考慮多個因素
function calculateMasteryLevel(
successfulReviews: number,
currentInterval: number,
totalReviews: number
): number {
// 基礎分數(成功次數)
const baseScore = Math.min(successfulReviews * 8, 60)
// 間隔獎勵(長間隔表示熟悉)
const intervalBonus = Math.min(currentInterval / 365 * 30, 30)
// 一致性獎勵(高正確率)
const accuracyBonus = totalReviews > 0
? (successfulReviews / totalReviews) * 10
: 0
return Math.min(baseScore + intervalBonus + accuracyBonus, 100)
}
```
### **3. 自適應起始間隔**
```typescript
// 根據學習者程度調整起始間隔
function getInitialInterval(learnerLevel: string): number {
const intervals = {
'A1': 1, // 初學者需要更頻繁復習
'A2': 1,
'B1': 2, // 中級學習者可以稍長間隔
'B2': 2,
'C1': 3, // 高級學習者可以更長間隔
'C2': 3
}
return intervals[learnerLevel] || 1
}
```
### **4. 漸進式間隔增長**
```typescript
// 避免過快增長的漸進式算法
function calculateNextInterval(
previousInterval: number,
performance: string,
difficulty: number
): number {
let growthFactor: number
// 根據當前間隔調整增長速度
if (previousInterval < 7) {
growthFactor = 2.0 // 初期較快增長
} else if (previousInterval < 30) {
growthFactor = 1.5 // 中期放緩增長
} else {
growthFactor = 1.3 // 後期緩慢增長
}
const performanceFactor = getPerformanceFactor(performance)
const difficultyFactor = 1.0 + (difficulty * 0.1)
return Math.min(
Math.round(previousInterval * growthFactor * performanceFactor * difficultyFactor),
365
)
}
```
## 📈 **預期效果對比**
### **現有算法時間線**
- 1次成功2天
- 5次成功32天
- 9次成功512天超過上限
### **建議算法時間線**
- 1次成功2天
- 5次成功約15-25天根據表現調整
- 10次成功約60-120天
- 15次成功約180-300天
- 20次成功365天
## ⚖️ **優缺點分析**
### **當前算法優點**
- 簡單易實作
- 計算快速
- 行為可預測
### **當前算法缺點**
- 增長過快,缺乏彈性
- 不考慮個人差異
- 熟悉度計算不準確
- 錯誤校正過於粗糙
### **建議算法優點**
- 更符合記憶科學
- 考慮個人化因素
- 漸進式增長更合理
- 更精確的進度追蹤
### **建議算法缺點**
- 實作複雜度較高
- 需要更多參數調優
- 計算成本稍高
## 🎯 **建議採用策略**
### **階段1優化現有算法**
1.`2^n` 改為漸進式增長
2. 加入基本的難易度調整
3. 改進熟悉度計算
### **階段2完整個人化**
1. 實作完整的SM-2算法
2. 加入學習者程度分析
3. 動態調整復習策略
這種分階段實作可以在保持系統穩定的同時,逐步提升學習效果。