Fsrs

class Fsrs(val w: List<Double> = FsrsParameters.defaultParameters)

FSRS6 implementation based on https://github.com/open-spaced-repetition/awesome-fsrs/wiki/The-Algorithm

Parameters

w

The parameters for the FSRS algorithm.

Constructors

Link copied to clipboard
constructor(w: List<Double> = FsrsParameters.defaultParameters)

Properties

Link copied to clipboard
val w: List<Double>

Functions

Link copied to clipboard

Calculates the initial difficulty for a given rating.

Link copied to clipboard

Calculates the initial stability for a given rating.

Link copied to clipboard
fun nextDifficulty(difficulty: Double, rating: FsrsRating): Double

Calculates the next stability based on the current stability, difficulty, and rating.

Link copied to clipboard

Calculates the next stability for short-term reviews based on the current stability and rating.

Link copied to clipboard

Calculates the retrievability based on elapsed time and stability.

Link copied to clipboard
fun stabilityOnLapse(difficulty: Double, stability: Double, retrievability: Double): Double

Calculates the next stability for items that have lapsed (i.e., rated as AGAIN) based on the current difficulty, stability, and retrievability.

Link copied to clipboard
fun stabilityOnRecall(difficulty: Double, stability: Double, retrievability: Double, rating: FsrsRating): Double

Calculates the next stability for long-term reviews based on the current difficulty, stability, retrievability, and rating. In case the rating is AGAIN, the stabilityOnLapse function should be used instead.