FlatRehearsalAlgorithm 0.1.0-alpha

This is a prerelease version of FlatRehearsalAlgorithm.
dotnet add package FlatRehearsalAlgorithm --version 0.1.0-alpha                
NuGet\Install-Package FlatRehearsalAlgorithm -Version 0.1.0-alpha                
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="FlatRehearsalAlgorithm" Version="0.1.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FlatRehearsalAlgorithm --version 0.1.0-alpha                
#r "nuget: FlatRehearsalAlgorithm, 0.1.0-alpha"                
#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.
// Install FlatRehearsalAlgorithm as a Cake Addin
#addin nuget:?package=FlatRehearsalAlgorithm&version=0.1.0-alpha&prerelease

// Install FlatRehearsalAlgorithm as a Cake Tool
#tool nuget:?package=FlatRehearsalAlgorithm&version=0.1.0-alpha&prerelease                

FlatRehearsalAlgorithm for C#

FlatRehearsalAlgorithm for C# provides an algorithm for rote learning - memorization of information based on repetition. It is designed for both a small and a great number of pieces of information (let's say 20 items for kids and over a 1000 items for adults). This rehearsal algorithm is called "flat" because no learn item should depend on a specific other learn item before it can be studied - the algorithm treats all learn items as independent. Note however that this algorithm can be used for mastering "layered topics" as well: one set of items (let's say "addition until 10") could be studied first and when the score for that topic is high enough, another topic (let's say "addition until 30") can be studied next by then feeding those other items to the algorithm. Also note that the learn items don't need to be static like lists of words: you can also design learn items that allow generating slightly different content on-the-fly.

This library is in pre-release and still needs to be tested and fine tuned.

An execution timeline

  1. You or the user of your app provides a list of "learn items" - those can be words from one language to another, names and faces, simple questions about topographic maps, etc.
  2. For each of those items, you instantiate a LearnItem - which inherits the interface ILearnItem from this package and you feed all those items to the LearnItemPicker. Immediately a first CurrentLearnItem has been picked that you can display to the user in whatever way fits your app.
  3. When the user has answered, you check whether the user has answered correctly (100 points), incorrectly (0 points) or you may choose something in between and then you call learnItem.ProcessNewAnswerScore(score) - this method sets all properties that the ILearnItem interface has: LastTimeAskedUtcTicks, ScoreHistory and Score. No other interaction with the ILearnItem interface is needed. You could also give the user the option not to process the answer in case of a typo - such things are up to you. Then you call learnItemPicker.NextLearnItem() to load another learn item as CurrentLearnItem.
  4. You can repeat step 3 many times. Because you called learnItem.ProcessNewAnswerScore(score) many times now, the LearnItemPicker will be able to sort and pick items for the user intelligently: if an item has a low score, it will be repeated more often but not too often. Items that seem to be mastered, will almost never be asked but won't be forgotten.
  5. Gradually, more learn items are added to the pool of items that the user studies.
  6. ...until all items are mastered.

How to use this library

In Visual Studio's Solution Explorer, right-click a project and click Manage NuGet Packages.... Browse and install "FlatRehearsalAlgorithm".

Add

using FlatRehearsalAlgorithm;

Then you can declare a class that implements ILearnItem:

public class MyLearnItem : ILearnItem
{
    public anything Id { get; set; }
    public anything DummyQuestion { get; set; } // An image? A text with variable parts?
    public anything DummyCorrectAnswers { get; set; }

    // only the properties below are required:
	public long? LastTimeAskedUtcTicks { get; set; }
    public int Score { get; set; }
    public string? ScoreHistory { get; set; }
}

You can instantiate this class for each item for a one-time rote learn session, but you probably want to store the progress in a database. In the latter case, use varchar(200) for ScoreHistory.

Now you have items and you can feed them to the LearnItemPicker and play with it:

var learnItemPicker = new LearnItemPicker<MyLearnItem>(items);
var firstItem = learnItemPicker.CurrentLearnItem;
// display first item to the user, get the user's answer, provide feedback, etc.
firstItem.ProcessNewAnswerScore(0);
var secondItem = learnItemPicker.NextLearnItem();
// display second item to the user, get the user's answer, provide feedback, etc.
secondLearnItem.ProcessNewAnswerScore(100);
var thirdItem = learnItemPicker.NextLearnItem();
// etc.

Ask or contribute

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

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
0.1.0-alpha 200 2/8/2023