Class MemoryModels
java.lang.Object
org.episteme.social.psychology.MemoryModels
Models human memory retention, recall probability, and forgetting curves.
Includes implementations of Ebbinghaus's forgetting curve and spacing effect algorithms.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic RealebbinghausRetention(double t, double s) Calculates retention probability using the Ebbinghaus Forgetting Curve.static doublerecallProbability(int position, int totalItems) Models the Serial Position Effect (Primacy and Recency).static doublesm2NewEaseFactor(double oldEf, int quality) Adjusts the Ease Factor (EF) based on recall quality.static doublesm2NextInterval(int iteration, double prevInterval, double easeFactor, int quality) Calculates the next optimal review interval using the SuperMemo 2 (SM-2) algorithm.
-
Method Details
-
ebbinghausRetention
Calculates retention probability using the Ebbinghaus Forgetting Curve. Formula: R = exp(-t/S)- Parameters:
t- Time since learning (days)s- Stability of memory (strength), where higher values mean slower forgetting- Returns:
- Retention probability (0.0 to 1.0)
-
sm2NextInterval
public static double sm2NextInterval(int iteration, double prevInterval, double easeFactor, int quality) Calculates the next optimal review interval using the SuperMemo 2 (SM-2) algorithm. I(n) = I(n-1) * EF- Parameters:
iteration- The repetition number (1, 2, 3...)prevInterval- Previous interval in dayseaseFactor- The Ease Factor (EF), initially usually 2.5quality- User grade of recall quality (0-5, where >=3 is success)- Returns:
- The next interval in days
-
sm2NewEaseFactor
public static double sm2NewEaseFactor(double oldEf, int quality) Adjusts the Ease Factor (EF) based on recall quality. Implementation of SM-2 EF adjustment. NewEF = EF + (0.1 - (5-q)*(0.08 + (5-q)*0.02)) The new EF cannot drop below 1.3.- Parameters:
oldEf- The previous Ease Factorquality- User grade of recall quality (0-5)- Returns:
- The new Ease Factor
-
recallProbability
public static double recallProbability(int position, int totalItems) Models the Serial Position Effect (Primacy and Recency). Calculates recall probability based on item position in a list. Approximates the U-shaped curve where first and last items are recalled best.- Parameters:
position- Zero-indexed position of the itemtotalItems- Total number of items in the list- Returns:
- Estimated probability of recall (0.0 to 1.0)
-