diff --git a/pyproject.toml b/pyproject.toml index bc10695..da1ce20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "FSRS-Optimizer" -version = "5.0.1" +version = "5.0.2" readme = "README.md" dependencies = [ "matplotlib>=3.7.0", diff --git a/src/fsrs_optimizer/fsrs_simulator.py b/src/fsrs_optimizer/fsrs_simulator.py index 5f1c18a..20d410c 100644 --- a/src/fsrs_optimizer/fsrs_simulator.py +++ b/src/fsrs_optimizer/fsrs_simulator.py @@ -33,9 +33,6 @@ def next_interval(s, r): ] col = {key: i for i, key in enumerate(columns)} -SAMPLE_SIZE = 4 - - DEFAULT_LEARN_COSTS = np.array([33.79, 24.3, 13.68, 6.5]) DEFAULT_REVIEW_COSTS = np.array([23.0, 11.68, 7.33, 5.6]) DEFAULT_FIRST_RATING_PROB = np.array([0.24, 0.094, 0.495, 0.171]) @@ -257,6 +254,13 @@ def sample( forget_session_len=DEFAULT_FORGET_SESSION_LEN, ): memorization = [] + if learn_span < 100: + SAMPLE_SIZE = 16 + elif learn_span < 365: + SAMPLE_SIZE = 8 + else: + SAMPLE_SIZE = 4 + for i in range(SAMPLE_SIZE): _, _, _, memorized_cnt_per_day, cost_per_day = simulate( w,