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

[TODO] switch of enable/disable short-term schedule #19

Closed
L-M-Sherlock opened this issue Aug 27, 2024 · 13 comments · Fixed by #20
Closed

[TODO] switch of enable/disable short-term schedule #19

L-M-Sherlock opened this issue Aug 27, 2024 · 13 comments · Fixed by #20
Labels
enhancement New feature or request

Comments

@L-M-Sherlock
Copy link
Member

The implementation of ts-fsrs:

@L-M-Sherlock L-M-Sherlock added the enhancement New feature or request label Aug 27, 2024
@L-M-Sherlock L-M-Sherlock linked a pull request Aug 27, 2024 that will close this issue
@domino14
Copy link

Would you have an explanation of how the long term and short term scheduler differ? Are the weights/parameters changing?

@L-M-Sherlock
Copy link
Member Author

L-M-Sherlock commented Sep 24, 2024

You can see the workflow charts here: open-spaced-repetition/py-fsrs#56 (comment)

It doesn't change the weights of FSRS.

@domino14
Copy link

Could you please explain how both schedulers can follow the same learning/forgetting curves yet be far off in the time intervals?

@L-M-Sherlock
Copy link
Member Author

be far off in the time intervals

What do you mean by that?

1 similar comment
@L-M-Sherlock
Copy link
Member Author

be far off in the time intervals

What do you mean by that?

@domino14
Copy link

be far off in the time intervals

What do you mean by that?

I have this simple example:

package main

import (
	"fmt"
	"time"

	"github.com/open-spaced-repetition/go-fsrs/v3"
)

// Some experimentation code to figure out this API.
func main() {
	p := fsrs.DefaultParam()
	p.EnableShortTerm = true
	p.EnableFuzz = true
	card := fsrs.NewCard()
	now := time.Now()
	card.Due = now
	f := fsrs.NewFSRS(p)

	for range 4 {
		schedulingCards := f.Repeat(card, card.Due)
		rating := fsrs.Good
		card = schedulingCards[rating].Card
		revlog := schedulingCards[rating].ReviewLog
		fmt.Println("state", revlog.State)
		fmt.Println("due", card.Due)
	}
}

If EnableShortTerm is true, I get this output (I know it's random but they're all fairly similar):

state 0
due 2024-10-13 23:14:10.467279286 -0400 EDT m=+600.000060401
state 1
due 2024-10-18 23:14:10.467279286 -0400 EDT m=+432600.000060401
state 2
due 2024-11-06 22:14:10.467279286 -0500 EST m=+2074200.000060401
state 2
due 2025-01-16 22:14:10.467279286 -0500 EST m=+8208600.000060401

If EnableShortTerm is false, I get this output:

state 0
due 2024-10-16 23:05:23.993977901 -0400 EDT m=+259200.000015501
state 2
due 2024-10-31 23:05:23.993977901 -0400 EDT m=+1555200.000015501
state 2
due 2024-12-28 22:05:23.993977901 -0500 EST m=+6566400.000015501
state 2
due 2025-06-15 23:05:23.993977901 -0400 EDT m=+21168000.000015501

The final due date for the long-term scheduler is 5 months after the final due date for short-term scheduler. Wouldn't this mean that the parameters can't be the same? The user is much more likely to have forgotten the info if using the long-term scheduler?

@L-M-Sherlock
Copy link
Member Author

L-M-Sherlock commented Oct 14, 2024

You cannot assume the users with different scheduler have the same scheduler. User who would like to use long-term scheduler usually make good cards, so their initial stability is high.

@domino14
Copy link

I'm sorry, I don't fully understand. My thought was that FSRS's default parameters were tuned to have recall be at 90%. I am wondering how it's possible to use two different schedulers, and rate a question "good" 4 times, and then recall would be at 90% on dates that are 5 months apart.

I feel like I am missing something about how it's supposed to work.

@L-M-Sherlock
Copy link
Member Author

My thought was that FSRS's default parameters were tuned to have recall be at 90%

Everyone has different memory pattern. That's why the optimizer is important. According to our benchmark, FSRS with optimized parameters is better than FSRS with default parameters by ~40% relatively.

@L-M-Sherlock
Copy link
Member Author

I am wondering how it's possible to use two different schedulers, and rate a question "good" 4 times, and then recall would be at 90% on dates that are 5 months apart.

Actually you need to compare the 4th review when EnableShortTerm is true with the 3rd review when EnableShortTerm is false because the 1st review when EnableShortTerm is true is done in the same day when you learn it.

@domino14
Copy link

I see now thank you. That makes sense. Do you have any code or description for how to optimize the FSRS parameters?

@L-M-Sherlock
Copy link
Member Author

@L-M-Sherlock
Copy link
Member Author

By the way, this discussion has been off-topic. I recommending opening a new issue if you have more questions.

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 a pull request may close this issue.

2 participants