Skip to content

maitrimydur/sr-scheduler-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SM-2 vs. Cognitive-Load Adaptive Spaced-Repetition

R simulations & analysis comparing the classic SM-2 scheduler with a cognitive-load–adaptive variant.


πŸ“‹ Overview

This project implements two spaced-repetition schedulers in R:

  1. SM-2 (SuperMemo-2): the standard ease-factor algorithm
  2. CLoad: an adaptive variant that adjusts intervals based on simulated β€œcognitive load”

We run synthetic cohort simulations (N users Γ— M cards) and analyze:

  • Day-8 recall accuracy (t-test & Cohen’s d)
  • Learning curves over days (mixed-ANOVA)
  • Self-efficacy pre/post comparisons
  • Retention curves (ggplot2)

πŸ“‚ Folder Structure

β”œβ”€β”€ README.md
β”œβ”€β”€ remindXR-study.Rproj
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ cards.csv
β”‚   β”œβ”€β”€ day8.csv
β”‚   β”œβ”€β”€ pt.csv
β”‚   β”œβ”€β”€ logs.csv
β”‚   β”œβ”€β”€ selfeff.csv
β”‚   β”œβ”€β”€ def_pt.rds
β”‚   └── all_analysis_data.RData
β”œβ”€β”€ R/
β”‚   β”œβ”€β”€ schedulers.R          # SM-2 & CLoad functions
β”‚   └── simulate_cohort.R     # simulate_study() wrapper
β”œβ”€β”€ analysis/
β”‚   β”œβ”€β”€ analysis.Rmd          # statistical tests & plots
β”‚   └── analysis.html         # knitted output

πŸš€ Getting Started

Prerequisites

  • R (β‰₯ 4.0)
  • RStudio (recommended)
  • Required packages:
    install.packages(c(
      "dplyr", "magrittr", "simstudy",
      "knitr", "rmarkdown", "ggplot2", "lme4", "effsize"
    ))
    

Simulation

  1. Open the project file remindXR-study.Rproj in RStudio.

  2. Source the scheduler functions and simulate:

    source("R/schedulers.R")
    source("R/simulate_cohort.R")
    
    cards_df <- read.csv("data/cards.csv")
    logs <- simulate_study(cards_df, days = c(0,1,3,5,7,8))
    head(logs)
    

Analysis

  1. In the analysis/ directory, open analysis.Rmd.
  2. Knit to HTML or PDF to reproduce all:
    • Day-8 t-test & Cohen's d
    • Mixed-ANOVA on accuracy trends
    • Self-efficacy pre/post Wilcoxon test
    • Retention curves (ggplot2)
  3. View the finished report at analysis/analysis.html

πŸ“Š Data

  • cards.csv: initial deck definitions
  • day8.csv: summary recall percentages
  • logs.csv: long-form review logs (all days)
  • selfeff.csv: self-efficacy pre/post data
  • pt.csv: participant metadata
  • def_pt.rds, all_analysis_data.RData: serialized R objects for quick load

πŸ› οΈ Structure & Extensibility

  • R/schedulers.R:
    • sm2(ease, q, interval_prev)
    • cload(ease, q, load, interval_prev)
  • R/simulate_cohort.R:
    • simulate_study(cards_df, days) drives the day-by-day review loop
  • analysis/analysis.Rmd:
    • Organize code chunks for reproducible figures and tables

πŸ“„ License

This work is licensed under the MIT License. For details, see the LICENSE.

About

Reproducible R workflow comparing classic SM-2 and cognitive-load adaptive spaced-repetition schedulers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published