Card Type - ghrgriner/anki-stats GitHub Wiki

This page is about the term 'card type' when it refers to the learning state of a card. It has no relation to 'Card Type' define in the Manage Note Types > Cards window of Anki. The latter defines for a given note how many cards are generated and the templates that will be used on the front and back of the card.

A card can be one of four learning types. The valid types are listed in the enum below:

// code excerpt from Anki repository
pub enum CardType {
    New = 0,
    Learn = 1,
    Review = 2,
    Relearn = 3,
}

It is useful to briefly review how a card progresses through the learning states. We describe the scheduling algorithm at a high level and do not dwell on how the interval between reviews is determined.

Before a card is reviewed, it is New. After the first review, the type becomes Learn (even if the answer in the first review was incorrect). From this point, the card will never again be New (unless it is reset as described below). The card then proceeds through the learning steps. For example if the learning steps are 1m 10m, then one minute after the first correct review, the card can be reviewed again. If it is answered correctly, then the card is eligible for review in ten minutes. If the card is answered incorrectly during either step, it returns to the first learning stage. If the card is answered correctly at the last stage, the type becomes Review. From this point, the card will never again be Learn. If a card is answered incorrectly at any time while it is Review, it becomes Relearn. This is called a 'lapse'. Once a sufficient number of answers are correctly obtained while Relearn, the card again graduates to Review. If the card again lapses, it returns to Relearn, and the process continues indefinitely.

There are two caveats to the above description:

  1. It is possible to review a card without changing the reschedule information. This can occur by selecting the appropriate option when creating a filtered deck manually or by selecting Custom Study > Preview Cards (which creates a filtered decked with the do-not-reschedule flag automatically set). After such a review occurs, the type is not updated based on the review answer. The review is logged with review kind Filtered and int = 0.

  2. The card type will be reset to New when the Reset card operation is applied to the card. The queue, interval, ease_factor, original_position, and memory_state are also reset, but the information in the review log is never reset. The review and lapse counters (reps and lapses) are reset if the appropriate box was checked in the dialog box. This reset is logged in the revlog table with review kind Manual. Note that position is also reset, but we omit discussion unless we add a section to this wiki explaining the meaning of position (TBD).

The table below indicates the relationship between CardType and the is: search term in the browser.

Browser Search Term CardType selected
is:new CardType::New
is:learn CardType::Learn or CardType::Relearn
is:review CardType::Review or CardType::Relearn

Therefore:

  • is:review -is:learn selects only CardType::Review
  • is:learn -is:review selects only CardType::Learn
  • is:review is:learn selects only CardType::Relearn