packages feed

haskell-fsrs-7.1.0: CHANGELOG.md

# Changelog for `haskell-fsrs`

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
The major version tracks the FSRS algorithm version, as `py-fsrs` and `fsrs-rs`
do: `7.x.y` implements FSRS-7.

## Unreleased

## 7.1.0 - 2026-08-21

Track the **finished** FSRS-7. Release 7.0.0 implemented the 35-weight,
single-trace draft still published as `models/fsrs_v7.py` in `srs-benchmark`;
the algorithm was subsequently finalised with 34 weights and a dual-trace
memory model, and that is what "FSRS-7" now means. The reference is
[`Expertium/fsrs-rs-speed-autoresearch`](https://github.com/Expertium/fsrs-rs-speed-autoresearch),
upstreamed into `fsrs-rs` in
[PR #426](https://github.com/open-spaced-repetition/fsrs-rs/pull/426).

This is a breaking change to the model's numbers and to several signatures.
Stored parameter vectors and stored memory states from 7.0.0 are **not**
compatible.

### Changed

- `parameterCount` is now `34`, and `defaultParameters`, `parameterBounds` and
  `orderingConstraints` are the finished model's. The layout is: `w0..w3`
  initial stability, `w4..w6` difficulty, `w7..w14` slow-trace stability,
  `w15..w22` fast-trace stability, `w23..w30` forgetting curve, `w31..w33` the
  curve's modulation by difficulty and stability.
- `MemoryState` gained a third field, `memoryStabilityFast`: FSRS-7 tracks two
  memory traces. A new card's fast trace starts at `fastTraceRatio` (0.8) of
  its slow one.
- `retrievability`, `retrievabilityDerivative` and `nextIntervalDays` take a
  whole `MemoryState` instead of a `Stability` — the curve mixes both traces
  and is shaped by the difficulty too. So does `nextReviewInterval`.
- `retrievability` is rescaled into `[1e-5, 1 - 1e-5]`, so `retrievability p 0`
  is now just short of `1` rather than exactly `1`.
- `nextDifficulty` takes the retrievability at review time: a lapse's step is
  weighted by how surprising the lapse was.
- `stabilityAfterReview` takes a stability and a difficulty rather than a
  `MemoryState`, since it now applies to whichever trace is being updated, and
  its post-lapse branch no longer depends on difficulty.
- `nextStability` returns both traces as a `(slow, fast)` pair.
- `longTermWeights` / `shortTermWeights` are now `slowTraceWeights` /
  `fastTraceWeights`, and `StabilityWeights` lost
  `swFailureDifficultyExponent` — the weight it read was ablated from both
  blocks.
- `CurveWeights` was reshaped: `cwDecay1` became `cwDecayBase1` (the fast
  component's decay is now scaled by the fast stability, so it is not a
  constant), `cwDecay2` holds a magnitude rather than a negated value, and
  `cwDifficultyWeight`, `cwDifficultyDecay` and `cwStabilityDecay1` are new.

### Added

- `fastTraceRetrievability` — the fast trace's own recall probability, which is
  what drives its stability update.
- `initialMemoryState` — the state a card is born with.
- `retrievabilityFloor` and `fastTraceRatio`.
- `orderingConstraints` is now exported from `FSRS.Parameters`.
- The two numeric assertions the reference implementation makes about FSRS-7 in
  its own test suite are now reproduced in ours, in Haskell and in Python, so
  the port is pinned to upstream and not only to our own transcription.

### Removed

- `transitionCoefficient`, `transitionRate` and `transitionAmplitude`, along
  with the two weights behind them. The elapsed-time blend between a long- and
  a short-term stability update is gone; the fast memory trace replaces it.

## 7.0.0 - 2026-08-20

Initial release: FSRS-7.

### Added

- `FSRS.Types` — `Rating`, `MemoryState` and the `Stability` / `Difficulty` /
  `Retrievability` / `Days` synonyms.
- `FSRS.Parameters` — the 35 FSRS-7 weights (of the draft model, see 7.1.0),
  the default set, bounds taken from
  the upstream optimiser's clipper, validation with per-weight errors, clamping,
  and typed views onto the weight blocks (`StabilityWeights`, `CurveWeights`).
- `FSRS.Algorithm` — the model: the two-component `retrievability` curve and its
  derivative, `nextIntervalDays` (a safeguarded Newton root-find, since the
  FSRS-7 curve has no closed-form inverse), `initialDifficulty`,
  `nextDifficulty`, `initialStability`, `stabilityAfterReview`,
  `transitionCoefficient`, `nextStability`, `nextMemoryState` and
  `replayReviews`.
- `FSRS.Scheduler` — cards, due dates, learning and relearning steps, review
  logs, interval preview and explicit (pure) interval fuzzing.
- `FSRS` — an umbrella module re-exporting all of the above.
- A test suite of golden vectors generated from a pure-Python transcription of
  the upstream reference implementation, plus property tests for the model's
  invariants.