Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/find optimal retention #48

Merged
merged 8 commits into from
Sep 1, 2023
Merged

Feat/find optimal retention #48

merged 8 commits into from
Sep 1, 2023

Conversation

L-M-Sherlock
Copy link
Member

@L-M-Sherlock L-M-Sherlock commented Aug 31, 2023

Introduction

Function

fn simulate(config: SimulatorConfig, request_retention: f64, seed: Option<u64>) -> f64

It outputs the simulated knowledge retention for given model parameters, request retention and other simulator configuration.

pub fn find_optimal_retention(config: SimulatorConfig) -> f64

It outputs the optimal retention to maximize the simulated knowledge retention.

Structure

pub struct SimulatorConfig {
    w: [f64; 17],
    deck_size: usize,
    learn_span: usize,
    max_cost_perday: f64,
    max_ivl: f64,
    recall_cost: f64,
    forget_cost: f64,
    learn_cost: f64,
}
  • w is the weights of FSRS.
  • deck_size is the size of deck for simulation.
  • learn_span is the number of days for simulation. For example, learn_span=365 means the user has a deadline in one year.
  • max_cost_perday is the cost limit for one day's learning (in seconds). For example, max_cost_perday=1800 means the user spends 30 minutes doing reviews every day.
  • max_ivl is the maximum interval.
  • recall_cost is the cost for a successful review (in seconds).
  • forget_cost is the cost for a failed review (in seconds). It includes the time spent in review stage and relearning stage.
  • learn_cost is the cost for learning a new cards (in seconds).

@L-M-Sherlock L-M-Sherlock added the enhancement New feature or request label Aug 31, 2023
@L-M-Sherlock L-M-Sherlock linked an issue Aug 31, 2023 that may be closed by this pull request
@L-M-Sherlock L-M-Sherlock merged commit ed06bba into main Sep 1, 2023
3 checks passed
@L-M-Sherlock L-M-Sherlock deleted the Feat/optimal-retention branch September 1, 2023 01:41
@dae dae mentioned this pull request Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TODO] feature: search optimal retention
2 participants