open-spaced-repetition / fsrs-rs

FSRS for Rust, including Optimizer and Scheduler
https://crates.io/crates/fsrs
BSD 3-Clause "New" or "Revised" License
185 stars 19 forks source link

[Question] What is the meaning of applying `FSRS::next_interval` to a new card? #243

Closed sineptic closed 3 weeks ago

sineptic commented 1 month ago

In FSRS::next_interval:

Stability should be provided except when the card is new.

But as I understand next_interval for new cards doesn't have any meaning, because they might be reviewed immediately after creation.

L-M-Sherlock commented 1 month ago

https://github.com/open-spaced-repetition/fsrs-rs/blob/4f181264af6060c1fbcba05f09256a180cda1e9f/src/inference.rs#L137-L156

But as I understand next_interval for new cards doesn't have any meaning

When the user rates the new card in their first learning, FSRS will calculate the initial stability of the card based on the rating, and assign a interval for the new card.

sineptic commented 1 month ago

In what meaning new card?

L-M-Sherlock commented 1 month ago

The new card means the card is new and has 0 recall before you apply next_interval. After applying next_interval, the card has one review log.

sineptic commented 1 month ago

??? calling next_interval should modify card?

L-M-Sherlock commented 1 month ago

I don't mean that you must modify the card. But you're likely to modify the card after applying next_interval, because next_interval is called when the user is reviewing the card.

By the way, could you express your question more elaborately? I'm struggling to understand your question. If your native language is not English, you can use your native language to elaborate your question.

sineptic commented 1 month ago

OK

I want calculate repetition time for all cards. For cards, that's just created what is next repetition time? Is it UNIX_EPOCH or there are some cooldown(and I need calculate it using next_interval)?

L-M-Sherlock commented 4 weeks ago

I don't recommend calculating repetition time for all cards. Instead, it's better to maintain two queues to separate new cards and review cards. A new card doesn't have repetition time until the user reviews it.

But if you still insist on calculating it, you cannot use next_interval because you didn't have rating for a new card when creating it.

sineptic commented 4 weeks ago

So my initial struggle:

you cannot use next_interval because you didn't have rating for a new card when creating it.

docs:

Stability should be provided except when the card is new.
L-M-Sherlock commented 4 weeks ago

So just use UNIX_EPOCH

sineptic commented 4 weeks ago

Thank you. But I it is OK, that this is in docs? Or it has use case, that I dont need?

L-M-Sherlock commented 4 weeks ago

I add some examples here: https://github.com/open-spaced-repetition/fsrs-rs/blob/main/examples/schedule.rs

You can refer to them.