All files / web/src/lib/curriculum/bkt index.ts

100% Statements 74/74
100% Branches 0/0
100% Functions 0/0
100% Lines 74/74

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 752x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x  
/**
 * BKT (Bayesian Knowledge Tracing) Module
 *
 * Provides epistemologically honest skill mastery estimates using
 * Conjunctive Bayesian Knowledge Tracing.
 *
 * Key concepts:
 * - P(known): Probability that the student has mastered a skill
 * - Confidence: How certain we are about the P(known) estimate
 * - Conjunctive model: For multi-skill problems, correct = all skills worked,
 *   incorrect = at least one failed (blame distributed probabilistically)
 *
 * Usage:
 * ```typescript
 * import { computeBktFromHistory } from '@/lib/curriculum/bkt'
 *
 * const results = await getRecentSessionResults(playerId, 50)
 * const bkt = computeBktFromHistory(results)
 *
 * // Access results
 * console.log(bkt.skills)            // All skills with P(known)
 * console.log(bkt.interventionNeeded) // Skills that need attention
 * console.log(bkt.strengths)          // Mastered skills
 * ```
 */
 
// Main computation
export {
  type BktComputeExtendedOptions,
  computeBktFromHistory,
  DEFAULT_BKT_OPTIONS,
  recomputeWithOptions,
} from './compute-bkt'
 
// Types
export type {
  BktComputeOptions,
  BktComputeResult,
  BktModeResult,
  BktParams,
  BktSkillState,
  BlameDistribution,
  MasteryClassification,
  SkillBktRecord,
  SkillBktResult,
} from './types'
 
// Confidence utilities
export {
  calculateConfidence,
  getConfidenceLabel,
  getStalenessWarning,
  getUncertaintyRange,
} from './confidence'
 
// Skill priors
export { getDefaultParams, getSkillCategory } from './skill-priors'
 
// Evidence quality (for advanced use cases)
export {
  combinedEvidenceWeight,
  helpWeight,
  responseTimeWeight,
} from './evidence-quality'
 
// Core BKT (for testing/advanced use)
export { applyLearning, bktUpdate } from './bkt-core'
export {
  bayesianUpdateOnIncorrect,
  updateOnCorrect,
  updateOnIncorrect,
  updateOnIncorrectWithMethod,
  type BlameMethod,
} from './conjunctive-bkt'