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

add reschedule and postpone #43

Merged
merged 8 commits into from
Feb 17, 2024
Merged

Conversation

Newdea
Copy link
Collaborator

@Newdea Newdea commented Feb 12, 2024

@L-M-Sherlock 新年快乐!最近打算实现下这个重排 #13 和延后 #33 的功能,

扒了下 重排 https://github.com/open-spaced-repetition/fsrs4anki-helper/blob/main/schedule/reschedule.py 的代码,跟你确认下:
是以原卡片(已有排程信息的)最后一次复习的日期card.last_review,根据卡片现有参数(s,d, r)算出的间隔,重新计算卡片的下次复习时间(卡片其它参数不更新)?

其中,如果 self.allow_to_past=falsemax_ivl也是负值,计算出的新的复习时间应该还是过去的时间
best_ivl = (max_ivl + min_ivl) // 2 if self.allow_to_past else max_ivl

另外,根据 重排的介绍 , 目前这个插件所有的下次复习时间都是使用fsrs.repeat()计算,是否就不用上这个功能
当然,如果后续要上跳过周末或节假日(目前并没有这个打算),要更新之前已经排程的卡片,这个应该还是有必要的。

Feature name How does it work? When should I use it?
Reschedule Calculates stability, difficulty, and the optimum interval from the entire review history for each card using FSRS parameters. Then, it changes the due dates of cards. When you update the weights or other parameters of FSRS. However, this is not necessary anymore, as Anki has a built-in feature "Reschedule cards on change".
Advance Decreases the intervals of undue cards based on current and requested R, and interval length to minimize damage to long-term learning. When you want to review your material ahead of time, for example, before a test.
Postpone Increases the intervals of cards that are due today based on current and requested R, and interval length in a way that minimizes damage to long-term learning. When you are dealing with a large number of reviews after taking a break from Anki or after rescheduling.

Postpone 延迟的功能,也是以card.last_review重新计算下次复习时间,或
直接让用户自定义间隔,以现在日期重新计算下次复习时间?
只延后保留率高的,低的不延后
判断依据 ln(currentR)/ln(reqR(default=0.9))-1<0.15,即currentR>0.65,
在这个范围内的卡片可以延后,

新间隔是 原间隔*(1.05+0.05*随机1之内的数)+delay

elapsed_days = mw.col.sched.today - last_review
        delay = elapsed_days - ivl
        new_ivl = min(
            max(1, math.ceil(ivl * (1.05 + 0.05 * random.random())) + delay), max_ivl
        )

默认用自动延后基本OK,但如果是指定x天后复习,这个算是重排还是延后,如果是一组多个卡片,可能会导致那天卡片数量增多,是否要启用均衡balance(启用的话,就可能导致提前几天或延后几天了)

@L-M-Sherlock
Copy link
Member

是以原卡片(已有排程信息的)最后一次复习的日期card.last_review,根据卡片现有参数(s,d, r)算出的间隔,重新计算卡片的下次复习时间(卡片其它参数不更新)?

是的,根据当前的 S 和预期保留率计算间隔,然后加上上次的复习日期,就是重新安排后的下一次复习日期。

其中,如果 self.allow_to_past=falsemax_ivl也是负值,计算出的新的复习时间应该还是过去的时间
best_ivl = (max_ivl + min_ivl) // 2 if self.allow_to_past else max_ivl

这个不用管,绝大多数情况下这个值是 true。没有特殊情况,是可以安排到过去的。

直接让用户自定义间隔,以现在日期重新计算下次复习时间?

这个不算推迟吧。这个算手动安排间隔。

@Newdea
Copy link
Collaborator Author

Newdea commented Feb 13, 2024

多谢,这样的话基本功能就已经实现了。

@Newdea Newdea marked this pull request as ready for review February 14, 2024 13:31
@Newdea Newdea marked this pull request as draft February 14, 2024 13:53
@Newdea Newdea marked this pull request as ready for review February 17, 2024 12:29
@Newdea Newdea merged commit f77e834 into dev-master Feb 17, 2024
5 of 6 checks passed
@Newdea Newdea deleted the Feat/RescheduleAndPostpone branch February 17, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants