How to search for cards without FSRS memory states?

Ideally, all cards should have FSRS memory states (unless they are new). However, in some cases, some cards can lack memory states (for e.g. cards with no revlogs).

The question is: How to search for such cards?

I thought about using -prop:s>0 as the search query. However, this doesn’t give any output even though I know that some of my cards don’t have memory states. It doesn’t even show new cards, which obviously can’t have a stability greater than 0.

prop:s is for stability, not “memory state”. You did use “stability” in your last sentence, but “memory state” earlier, which is confusing. After all, stability isn’t defined as one of several discrete states, it’s just a variable quantity measured in days.

(And of course stability is a concept that only exists with Anki 23.10 or later, and with FSRS enabled).

For me, searches for
is:new prop:s=0
is:new prop:s>0
is:new prop:s!=0
all return no results.

-is:new (prop:s!=0 OR prop:s=0)
is the same as
and returns all the non-new cards.

In Stats, you have a graph of stability and a measure of “average stability” is given at the bottom. If all the new cards were arbitrarily assigned stability=0 days, this would throw off the average.

But if you want to treat new cards as if they had stability zero, then you could just query for:
is:new OR (-is:new prop:s=0)

Thanks for trying to help but you really didn’t answer the question.

My question is: I have some cards that are not new and yet don’t have memory states (and thus, don’t have stability). How can I find these cards?

If all the new cards were arbitrarily assigned stability=0 days, this would throw off the average.

I didn’t mean that new cards should have s = 0. But, they definitely don’t have a stability greater than zero. So, I think that -prop:s>0 should return those cards, assuming that this query means “returns all cards except those having a stability greater than zero”.

You’ll need manual SQL queries for this - you can check the type and data columns.

In 23.12, a very common action i.e. moving cards between decks causes them to lose their memory states. In addition to that, several other actions (e.g. use of some add-ons) can cause cards to lose their memory states.

So, I think that there should be an easy way to search for these cards using the browser.

Can you please point me to some resources/documentation about this? I move cards between decks a fair amount, and you’ve got me worried I’m messing up their state in doing so.

I think that might only happen if the decks are in different presets.

If the source and destination decks are both in the same preset, then they already share the same FSRS parameters, so why would those parameters be affected by the move?

I think that the reason for removing the memory states in all the cases is that checking the preset would make the code more complicated.

The state would be cleared when moving the cards but it should not have any major effect on the scheduling because the states would be recalculated after you review the card or update the weights.

However, the DSR stats will be incorrect until the memory states are recalculated.

The release notes say: Recompute FSRS memory state when cards moved into different deck.

However, the commit which made this change only clears the memory states. Recompute occurs during review.

Yes, this is correct.

What do you intend to do with such a search, and is this something a typical user would benefit from?

There is an option in the add-on to reschedule selected cards in the Browser. If the user can find such cards, they can reschedule using the add-on in order to

  • allow “Disperse siblings” to function properly. The Disperse siblings function can’t disperse the sibling if it doesn’t have memory states. Also, it is designed to not recalculate memory states because that would be a waste of CPU time.
  • get more correct stats, especially when a large number of cards are moved between decks.

Generally speaking, if a feature is only useful when using an add-on, the feature belongs in the add-on rather than Anki.

I get your point. But, FSRS is natively integrated into Anki. So, I think that this basic searching ability should also be integrated into Anki. Probably, people will also find other use cases for this search ability.

Also, this would make the support for memory states consistent with that for custom data, for which has-cd:x has already been implemented.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.