FSRS.Core 1.0.7

dotnet add package FSRS.Core --version 1.0.7
                    
NuGet\Install-Package FSRS.Core -Version 1.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FSRS.Core" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FSRS.Core" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="FSRS.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FSRS.Core --version 1.0.7
                    
#r "nuget: FSRS.Core, 1.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FSRS.Core@1.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FSRS.Core&version=1.0.7
                    
Install as a Cake Addin
#tool nuget:?package=FSRS.Core&version=1.0.7
                    
Install as a Cake Tool

FSRS.Core

A .NET implementation of the Free Spaced Repetition Scheduler (FSRS) algorithm with full dependency injection support.

This is C# version of py-fsrs

What is FSRS?

FSRS (Free Spaced Repetition Scheduler) is a modern, open-source spaced repetition algorithm that helps optimize memory retention. It's designed to be more accurate and efficient than traditional algorithms like SM-2.

Features

  • ✅ Complete FSRS algorithm implementation
  • ✅ Dependency injection support
  • ✅ Configurable parameters and settings
  • ✅ Comprehensive unit tests
  • ✅ Easy integration with existing applications
  • ✅ Target frameworks (.NET 8)

Installation

dotnet add package FSRS.Core

Quick Start

Basic Usage

using FSRS.Core.Models;
FSRS
using FSRS.Core.Services;

// Create a scheduler with default settings
var scheduler = new Scheduler();

// Create a new card
var card = new Card();

// Review the card
var (updatedCard, reviewLog) = scheduler.ReviewCard(card, Rating.Good);

Console.WriteLine($"Next review: {updatedCard.Due}");
Console.WriteLine($"Stability: {updatedCard.Stability}");

With Dependency Injection (ASP.NET Core)

using FSRS.Core.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Add FSRS services
builder.Services.AddFsrs(options =>
{
    options.DesiredRetention = 0.9;
    options.MaximumInterval = 365;
});

var app = builder.Build();
[ApiController]
public class CardsController : ControllerBase
{
    private readonly IScheduler _scheduler;

    public CardsController(IScheduler scheduler)
    {
        _scheduler = scheduler;
    }

    [HttpPost("review")]
    public ActionResult ReviewCard([FromBody] ReviewRequest request)
    {
        var card = new Card(request.CardId);
        var (updatedCard, reviewLog) = _scheduler.ReviewCard(card, request.Rating);
        
        return Ok(updatedCard.ToDictionary());
    }
}

Configuration Options

builder.Services.AddFsrs(options =>
{
    options.Parameters = customParameters; // Custom FSRS parameters
    options.DesiredRetention = 0.85;      // Target retention rate
    options.MaximumInterval = 36500;      // Maximum interval in days
    options.EnableFuzzing = true;         // Enable interval fuzzing
    options.LearningSteps = [             // Learning steps
        TimeSpan.FromMinutes(1),
        TimeSpan.FromMinutes(10)
    ];
    options.RelearningSteps = [           // Relearning steps
        TimeSpan.FromMinutes(10)
    ];
});

Documentation

For complete documentation, examples, and API reference, visit: GitHub Repository

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 1,400 2/6/2026
1.0.6 492 5/27/2025
1.0.5 220 5/27/2025
1.0.4 213 5/27/2025
1.0.3 211 5/27/2025
1.0.2 217 5/26/2025
1.0.0 216 5/26/2025

v1.0.0:
           - Initial release of FSRS.Core
           - Full FSRS algorithm implementation
           - Dependency injection support
           - Comprehensive unit tests
           - Support for custom parameters and configurations