/** * FSRS-6 — Free Spaced Repetition Scheduler. * * Pure math, zero dependencies. Extracted from idapixl-cortex/src/engines/memory.ts. * * FSRS-6 uses a power-law decay model to predict recall probability * and schedule optimal review intervals. Each memory has: * - stability: expected days until recall probability drops to 90% * - difficulty: 1-10 scale of how hard the memory is to retain * - state: new → learning → review → relearning lifecycle * * Rating scale: 1=Again, 2=Hard, 3=Good, 4=Easy */ import type { FSRSData, ScheduleResult } from '../core/types.js'; /** Default FSRS-6 weights (w[0]..w[20]) from the open-source paper. */ export declare const FSRS_WEIGHTS: readonly number[]; export declare const DESIRED_RETENTION = 0.9; /** * Probability of recall after `elapsed_days` with given `stability`. * Decays from 1.0 toward 0 following a power curve. */ export declare function retrievability(stability: number, elapsed_days: number): number; /** * Initial stability for a new card rated 1-4 on first review. */ export declare function initialStability(rating: 1 | 2 | 3 | 4): number; /** * Schedule the next review for a memory given a rating. * Returns updated FSRS fields and the next interval in days. * * @param fsrs - Current FSRS state of the memory * @param rating - Review quality: 1=Again, 2=Hard, 3=Good, 4=Easy * @param elapsed_days - Days since last review (0 for new memories) */ export declare function scheduleNext(fsrs: FSRSData, rating: 1 | 2 | 3 | 4, elapsed_days?: number): ScheduleResult; /** * Calculate elapsed days between a date and now. */ export declare function elapsedDaysSince(date: Date | null): number; /** * Create fresh FSRS state for a new memory. */ export declare function newFSRSState(): FSRSData; //# sourceMappingURL=fsrs.d.ts.map