[HN Gopher] FSRS: A modern, efficient spaced repetition algorithm
       ___________________________________________________________________
        
       FSRS: A modern, efficient spaced repetition algorithm
        
       Author : rickcarlino
       Score  : 217 points
       Date   : 2024-01-15 15:40 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | victorlf wrote:
       | Very interesting. According to the benchmarks, with this
       | algorithm, users can review 20-30% fewer cards than with the
       | classic Anki algorithm.
       | 
       | Just a few days ago, I published a Python implementation of the
       | classic SM-2 algorithm that I use for https://python.cards, but I
       | may switch to FSRS. https://github.com/vlopezferrando/simple-
       | spaced-repetition
        
         | teruakohatu wrote:
         | Your python.cards looks great. I suggest you add a few
         | examples.
         | 
         | Any chance you are open sourcing the web app? I can see it
         | being a popular way for niches to show flashcards eg. for
         | students to learn X
        
           | victorlf wrote:
           | Thanks! I definitely will add more examples to the landing
           | page, currently I'm working hard on the decks: pathlib in
           | depth, a tour of the stdlib and Norvig's tricks (a collection
           | of tricks from the Pytydes of Peter Norvig).
           | 
           | I believe the hardest part of using spaced repetition to
           | learn programming is creating good decks, it's a ton of work.
           | 
           | About open sourcing the web app, I might do it. It's a Django
           | app, and I've published some videos while coding it
           | (https://www.youtube.com/channel/UCyWUj9r0soytotuuh2JnPrw),
           | so it's no secret.
        
             | teruakohatu wrote:
             | I forgot to mention in my previous comment that I saw no
             | sign up box for the newsletter.
             | 
             | > I believe the hardest part of using spaced repetition to
             | learn programming is creating good decks, it's a ton of
             | work.
             | 
             | Agreed. To have always been disappointed with the
             | programming decks I have created.
             | 
             | > About open sourcing the web app, I might do it. It's a
             | Django app, and I've published some videos while coding it
             | 
             | I saw the videos, thanks. I think a generic platform would
             | have value, even if there was a paid option with more
             | features (payments etc.)
        
               | victorlf wrote:
               | It's weird you didn't find the sign-up box to the
               | waitlist, this is how it should look like:
               | https://imgur.com/a/0ZIbz4p, I actually got some sign-ups
               | from this comment!
               | 
               | Anyway, I can sign you up manually if you wish.
        
       | orangepurple wrote:
       | These algorithms are still suboptimal because they do not account
       | for the spacing effect at all. But doing something is still
       | better than nothing when it comes to learning.
        
       | gjadi wrote:
       | I wonder if there is plan for this to land in Mnemosyne[1]. I
       | prefer Mnemosyne over Anki because I can self-host the web-sync
       | server.
       | 
       | 1: https://mnemosyne-proj.org/
        
         | fhars wrote:
         | What's wrong with `anki --syncserver`? (user management is a
         | bit iffy, admittedly)
        
           | gjadi wrote:
           | My understanding is that the anki Sync serveur is only for
           | the sync part, there is no web interface to do the review.
           | 
           | Also, was it always free? When I looked at what was available
           | for Anki, the remote solutions were paid only and not
           | selfhostable.
           | 
           | Maybe I didn't look well enough back then.
        
       | epiccoleman wrote:
       | Ah, this is really cool - i've been thinking about implementing a
       | SR algorithm for one of my music related side projects.
        
         | jacquesm wrote:
         | Cool, let me know what you cook up if you want, I'm very much
         | interested in that particular crossing of roads.
        
       | dan0000 wrote:
       | I'm working on building my own flashcard based studying
       | application for long- and short-term learning. How would I go
       | about implementing this?
        
         | nanna wrote:
         | Contribute to Anki?
        
         | g-w1 wrote:
         | there are a bunch of pre-existing ones here:
         | https://github.com/open-spaced-repetition/ > Multiple Language
         | Support: fsrs.js, go-fsrs, rs-fsrs, py-fsrs, cljc-fsrs, swift-
         | fsrs and ex_fsrs
        
         | david_allison wrote:
         | Libraries: https://github.com/open-spaced-repetition/free-
         | spaced-repeti...
         | 
         | All are MIT licensed I believe, Anki is primarily AGPL
        
       | siraben wrote:
       | I've been using FSRS for 3 months and it's finally resolved some
       | of my pain points about having to trial-and-error adjust the old
       | SM2 scheduling algorithm, since the content of each deck can
       | greatly affect what the optimal retention is. Now you can just
       | retrain the weights for each deck you have every few months and
       | it will adapt appropriately. The paper[0] is also definitely
       | worth reading if you want to see some rigorous analysis of large-
       | scale real-world spaced repetition science.
       | 
       | Because of the extensive benchmarking most people probably will
       | not benefit from refitting the weights to their collection until
       | they have thousands of reviews (author recommends 1k+).
       | 
       | Note it still works fine even if you do your cards late, since
       | the recall probabilities are based on the stability and when you
       | last reviewed the card, and the stability will update a bit
       | longer if you somehow managed to still recall a card after the
       | due date.
       | 
       | [0]
       | https://dl.acm.org/doi/10.1145/3534678.3539081?cid=996605471...
       | 
       | [1] https://github.com/open-spaced-
       | repetition/fsrs4anki/wiki/The...
        
       | ekidd wrote:
       | One massively overlooked way to improve spaced repetition is to
       | make easier cards. It's surprising just how easy an effective
       | card can be.
       | 
       | I started out using Anki to learn French vocabulary. I'd make
       | pairs of cards, with English on one side and French on the other.
       | This started out easy, but became utterly brutal and depressing
       | with several hundred cards in my deck. Too many near synonyms.
       | 
       | I eventually took a hint from Katzumoto's Japanese advice, and
       | started making cloze cards. I'd copy and paste an entire
       | paragraph from an ebook or a web page, and hide just one word.
       | These cards were easy, but also effective.
       | 
       | Then I got lazier.
       | 
       | I'd only hide _half_ a word. Or I 'd just boldface a word, and
       | mark the card as a "pass" if I could _sort of_ remember that word
       | in context.
       | 
       | And somehow, these cards actually worked better.
       | 
       | Then I got lazier still. If seeing a card made me grown "Oh, not
       | _that_ card ", I'd just delete it. If I missed a card 3 times, I
       | configured Anki to permanently suspend it. If I actually needed
       | to know a word, no worries, I'd see it again soon in a more
       | helpful context. And my French vocabulary continued to grow by
       | leaps and bounds.
       | 
       | I don't think that biggest improvements will come from better
       | spaced repetition algorithms. I suspect the biggest wins will
       | come from improved card formats. And it's surprisingly hard to
       | make a card _too_ easy to be useful.
       | 
       | (Source: 35,000+ Anki reps across three languages.)
        
         | piazz wrote:
         | This is great, going to try this approach with my Japanese Anki
         | reps.
         | 
         | Mind linking out to Katzumoto's Anki advice? Is this this one?
         | https://tatsumoto-ren.github.io/blog/setting-up-anki.html
        
         | jwells89 wrote:
         | I've been using Anki on and off for years for language learning
         | but have most recently been using it to study for online uni
         | courses.
         | 
         | Something that's become evident, perhaps due to the varied
         | nature of the content (vs. all language) is how much gravity
         | card formatting has. In decks made by others I find myself
         | frequently re-wording the answer sides of the cards which makes
         | a noticeable difference in retention -- answers that are
         | succinct and flow nicely stick better.
         | 
         | So in short, I'd concur. Card format is important. If you find
         | a card that feels awkward somehow don't hesitate to rework it.
        
         | tetha wrote:
         | I'm kind of wondering the same thing learning my guitar: Maybe
         | a good thing is to approach an issue with different ways your
         | head has to think about it.
         | 
         | Like, yes. I can just spaced repetition the heck out of the
         | notes on the fretboard. Just hammer my head into the notes on a
         | string until I pretty much just give up. Always an idea.
         | 
         | But I've found it more effective to mix contexts up. Some
         | weeks, I just drill notes because I'm lazy. But then I also
         | start tinkering around for a week with some weird scale, like
         | hungarian scales and such. Some other week, I'm tinkering
         | around with arpeggio chords, some other week with cord
         | progressions with power chords, some weeks I'm trying to
         | replicate some sound or feeling of a song.
         | 
         | And over time, the brain is putting things together. Suddenly
         | there are realizations: Hey, this is just a G-Minor scale,
         | which makes sense for a somewhat solemn song. Oh, this is just
         | a G-Major scale but we skip those. Wait, I remeber half the
         | notes of the scale, isn't this just that pattern? Also, if the
         | scale is like this, couldn't we try playing that?
         | 
         | It's just a weird feeling, because the amount of things I think
         | I know expands at a much lower rate of the things I realize I
         | don't know - or don't have the technique for, lol.
         | 
         | But I'm kind of considering using a spaced repetition algorithm
         | to just poke for 5 to 10 minute guitar things to do to get both
         | the muscle memory and the neural connections about them going.
        
         | jnsie wrote:
         | Truly sorry to hijack, but if you have any recommendations for
         | shared French vocab cards I'd greatly appreciate you pointing
         | me in the right direction. I have some French from school, but
         | would like to get back into it and it's...daunting.
        
         | rpb92 wrote:
         | You've inspired me to rethink my approach to Anki. I've used it
         | on and off for the last few years, but always fall in the trap
         | of creating cards that were too convoluted. Sounds like I could
         | benefit from some deliberate "laziness".
         | 
         | Did you ever feel like you were answering correctly, on close
         | cards specifically, not because of an improved understanding
         | but because you were associating the correct answer with the
         | prompt/excerpt? Would appreciate any advice on how to avoid
         | this!
        
           | ekidd wrote:
           | > _Did you ever feel like you were answering correctly, on
           | close cards specifically, not because of an improved
           | understanding but because you were associating the correct
           | answer with the prompt /excerpt?_
           | 
           | I actually suspect that associating the word with the context
           | _helps_ , as surprising as that might be.
           | 
           | Let's say I grab a few sentences from an interesting article,
           | and I boldface a word. I'll mark the card as "pass" if I at
           | least _sort of_ understand it in context.
           | 
           | On day 1, I honestly might find the word fairly confusing. I
           | can explain what it means, but maybe the grammar is
           | unfamiliar. Ditto for the first few reviews. But then around
           | day 8 or so, the card disappears until day 20 or 30. And the
           | next time I see that card, suddenly the odd bit of grammar is
           | completely natural and obvious. There's maybe some kind of
           | medium-term memory consolidation mechanism occurring?
           | Something happens when I'm not looking at it.
           | 
           | Seeing the word in context somehow allows my brain to grab
           | on. The human brain contains some incredibly powerful
           | language learning machinery. In adults, that machinery still
           | exists. Even if it's a bit rusty. And that machinery seems to
           | work best on semi-comprehensible speech in a natural context.
           | So think of Anki less as a set of facts you must learn, and
           | more as a tool to distill and concentrate natural language so
           | that you can let your brain work on your weak points. (And as
           | soon as possible, start reading lots of books and watching
           | TV! I learned the hardest 10% of my vocabulary using Anki,
           | and much of the rest from context reading books.)
           | 
           | Also, I find it fascinating that LLMs are trained using a
           | very similar process. Either "predict the next word" or "fill
           | in the blank". Now, they need a lot more input than any human
           | does, but the fact that fill-in-the-blanks works so well in
           | both cases is fascinating.
           | 
           | Here are two of the most interesting experiments I tried with
           | Anki:
           | 
           | http://www.randomhacks.net/substudy/
           | https://blog.beeminder.com/hieroglyphs/
           | 
           | (The only language I ever bothered to push to a high level
           | was French. Spanish and ancient Egyptian were basically
           | experiments to see how quickly I could pick up the basics,
           | using the tricks I learned while working on French. A
           | language that you can use at a professional level is a bit
           | like a pet; it requires ongoing care.)
        
         | jacquesm wrote:
         | You have absolutely nailed it. Anki should work as a sliding
         | window on material that you wish to learn not as an ever
         | increasing bucket with more and more stuff in it. That way the
         | new material will always be underexposed. It's much better to
         | keep moving. I have the exact same patterns with learning
         | pieces to play on the piano, and within those pieces you see
         | those patterns again (it's almost a fractal).
        
         | fudged71 wrote:
         | Love this idea!
         | 
         | Does Anki or any of its plugins support creating a difficulty
         | progression when creating cards?
         | 
         | ie. half-word cloze, then full-word, then multiple choice, then
         | q&a, etc.
         | 
         | I'm not sure how this would work in practice. Like would the
         | next difficulty card be added to the deck once the easier card
         | has reached a threshold?
        
         | bluquark wrote:
         | For what it's worth I've gone the opposite direction (one
         | language, 70k Anki reps). For me, carefully adding context has
         | largely felt like time wasted at card creation time (which can
         | a surprisingly large proportion of study time per card, given
         | how brisk reviewing usually is) and I've been bothering with it
         | less and less. The default simple cards my dictionary plugin
         | creates are usually good enough for me. I go out of my way to
         | add context on the front of the card now mostly when it's a
         | specialized word almost always seen within that context (so
         | there's zero added value in learning it independently).
         | 
         | I do agree with the general idea that laziness and going easy
         | on yourself is good though. I give myself quite a lot of slack
         | when grading my answers, applying a "my understanding of this
         | word is close enough to avoid confusion in practice" threshold
         | rather than some impractical ideal of native-level mastery.
        
           | ekidd wrote:
           | > _For me, carefully adding context has largely felt like
           | time wasted at card creation time_
           | 
           | I actually had several custom tools that heavily automated
           | card creation--I could grab a sentence from a web page, or
           | bulk import highlighted phrases from an ebook. Then I had a
           | UI which allowed me to easily highlight an interesting word,
           | and either cloze it, or add a Wiktionary definition on the
           | back. Then I had an Anki plugin to bulk import the cards.
           | This could all obviously be combined into a single tool, and
           | occasionally someone tries.
           | 
           | For my most heavily automated experiment, I used a tool
           | similar to subs2srs to import sound, bilingual subtitles, and
           | tiny screen captures from 4 episodes of _Avatar: The Last
           | Airbender._ That was a fascinating experience, and I 'm still
           | earwormed with the dialogue of those episodes a decade later,
           | after only a couple of months of Anki reviews. (See elsewhere
           | in this thread for a link.)
           | 
           | Unfortunately, I'm not convinced that there's a good startup
           | market for language-learning tools. Language learning is
           | normally aspirational, much like a gym membership. And
           | customers don't have any serious plans on how to reach their
           | stated goals. (Again, like a gym membership.) Duolingo isn't
           | _terrible_ , but I suspect--based on lots of Anki experiments
           | --that it should be possible to build much more effective
           | tools than Duolingo. I'm just not convinced that anyone but
           | serious ESL students would pay for them. Too many genuinely
           | good tools in this space have sunken quietly, despite a user-
           | friendly UI and a good landing page.
        
             | jamager wrote:
             | I'm working on that, wish me luck :)
             | 
             | I guess I am of the few that would pay for a good tool
             | aimed at serious learners, but as I could not find any (in
             | language space almost everything is a Duolingo clone), I am
             | building myself.
             | 
             | So far I think I have proved my main hypothesis: it works
             | really well for me. It's not magic, but it saves me many
             | hours of learning.
             | 
             | Whether it could work for someone else, is an entirely
             | different story... but on the other hand, I have no big
             | ambitions.
        
         | steve1977 wrote:
         | > One massively overlooked way to improve spaced repetition is
         | to make easier cards.
         | 
         | At least with SuperMemo, this is actually one of their main
         | tips.
         | 
         | See also:
         | https://supermemo.guru/wiki/20_rules_of_knowledge_formulatio...
        
         | dataangel wrote:
         | Huh, hiding part of a word is brilliant. I never thought to do
         | that even though I made tons of cloze cards.
        
         | huimang wrote:
         | What killed Anki for me was having to add cards. It is such a
         | chore adding single word cards. I also ran into the problem of
         | increasingly niche synonyms that I'd learn, but would rarely
         | see in text. For some reason I never really considered cloze
         | cards.
         | 
         | The anki default of 8 relapses before suspending a card is much
         | too high. It took me a while to realize, but dealing with
         | problematic cards takes up -way- more energy than learning new
         | cards... it's not energy/time efficient at all.
         | 
         | Do you have any recommended sources on cloze style cards?
         | 
         | [45k reps here for Korean]
        
         | jamager wrote:
         | > I don't think that biggest improvements will come from better
         | spaced repetition algorithms
         | 
         | Exactly that, specially for language learning. The stated goal
         | of hitting a target probability is pointless IMO.
         | 
         | Language acquisition is not about memorizing words, but
         | progressive familiarization (eg via retrieval practice).
         | 
         | You have to expose yourself to massive amounts of language,
         | create your own cards fast, review them faster, move on even if
         | you "fail", don't do too many repetitions (6-8 should be enough
         | for >95% of cards)
         | 
         | The most important aspect of an SRS algorithm is to be
         | practical: sensible choices, equally spaced out among them,
         | that allow you to decrease / maintain / increase intervals
         | without ever punishing you for failing.
        
         | neves wrote:
         | The original SuperMemo 20 rules for creating SRS cards are a
         | treasure trove:
         | 
         | https://www.supermemo.com/en/blog/twenty-rules-of-formulatin...
         | 
         | It will improve a lot your cards
        
       | pitherpather wrote:
       | Given the importance of spaced repetition, I've wondered if a
       | modular approach is called for, contra Anki.
       | 
       | Aren't there three separate items?
       | 
       | 1) Your cards (or a subset of cards).
       | 
       | 2) The history of your interactions with them.
       | 
       | 3) An algorithm (potentially just-in-time) taking that history
       | into account to present cards to you, thereby adding to the
       | history.
        
         | bluquark wrote:
         | Anki FSRS moves closer to being a "just-in-time" algorithm
         | based only on user-provided inputs. And although its data
         | structures aren't strictly modular, they come as close as
         | practical to that ideal while still remaining compatible with
         | legacy Anki decks and extensions.
         | 
         | In practice, that's illustrated by the fact that there's now a
         | button to fully recompute all intervals and difficulties based
         | only on your history and the current algorithm tunings. And if
         | you've already been using FSRS and the tunings haven't changed,
         | the recomputation won't have any effect because it's equivalent
         | to the incremental computations after each review.
         | 
         | So in principle it could be thought of as a just-in-time pure
         | function, which involves a cache of generated data only for
         | legacy & performance reasons.
        
       | fermentation wrote:
       | Interesting, I've been using Anki for about 10 months to study
       | Japanese vocabulary. I'm going to give this algorithm a shot,
       | thought I'm not quite sure how to determine if will be "better"
       | or not.
       | 
       | I guess this at least allows me to remove my old anti-ease-hell
       | addon.
        
       | talhah wrote:
       | Is this algorithm also available on mobile?
        
         | david_allison wrote:
         | Stable on AnkiMobile, available in the AnkiDroid 2.17 alpha:
         | 
         | * https://github.com/ankidroid/Anki-Android/releases/
         | (Parallel.A)
         | 
         | * OR: https://ankidroid.org/#alphaTesting
        
           | notfed wrote:
           | Only 2.16.5 available in Play Store at the moment.
        
             | david_allison wrote:
             | 2.17alpha15 (latest alpha) is available under the 'closed
             | testing' track [0] on the Play Store.
             | 
             | After following the instructions [1] (joining the Play
             | Store testing programme, then the Google Group), the Play
             | Store should distribute + automatically update the alpha.
             | 
             | [0] https://play.google.com/console/about/closed-testing/
             | 
             | [1] https://ankidroid.org/#alphaTesting
        
       | flashcardist wrote:
       | I use multiple spaced repetition apps per day just for fun
       | because I like doing flashcards as a hobby. I have tried this
       | out, its good, but still not as good as the newest version of
       | Supermemo. You can tell if you put the same or similar material
       | into two or more apps. FSRS is much better than almost everything
       | else out right now though and I think it will be better than
       | Supermemo very soon. I tried Mochi Cards for about a year and it
       | was just okay, a little better than a default Anki install.
       | Mnemosyne is the same. The Supermemo SaaS app is okay, but I
       | don't like how they structure their language materials.
       | 
       | For language vocab, I use Clozemaster, but then I put the
       | sentence into Supermemo after I get it right because the SM algo
       | is that much better. They also have ChatGPT explanations for each
       | word of the sentence. I also put those into Supermeno.
       | 
       | The hardest part is making good cards for sure. This will help
       | with more ideas: http://arxiv.org/abs/2401.01257 and
       | https://rust-book.cs.brown.edu
       | 
       | Also, I have not found a flashcard program that lets you make
       | cards as fast as Supermemo. With Supermemo, you paste in a chunk
       | of text (ctrl-n), highlight a word you want to make cloze
       | deletion from, and press alt-x. You can do it multiple times on
       | the same piece of text, and every time you do it, you get a new
       | cloze deletion card in your reviews. Almost every other app, you
       | have to make a single card at a time. I think its because most
       | other apps stick too hard to the cards and decks metaphor.
       | Supermemo uses a tree structure to organize everything. It makes
       | a big difference. Technically, you don't really need to organize
       | anything though. People act like the material they learn is going
       | to be categorized into neat decks in their head.
        
         | dotancohen wrote:
         | > With Supermemo, you paste in a chunk of text (ctrl-n),
         | highlight a word you want to make cloze deletion from, and
         | press alt-x. You can do it multiple times on the same piece of
         | text, and every time you do it, you get a new cloze deletion
         | card in your reviews.
         | 
         | In Anki (on Debian at least) it's Ctrl-Alt-C.
        
       | steve1977 wrote:
       | Interesting approach for sure. Would be interesting to also see a
       | comparison between to the SM-18 algorithm (which handles item
       | difficulty differently compared to SM-17)
        
       | t_mann wrote:
       | It seems from the description that FSRS still puts an exact
       | review date on each card? This feature was pretty much the reason
       | why I stopped using Anki. I'm not in college and not doing exams,
       | I just want to practice when I feel like it, maybe with large
       | breaks between sessions, and not feel like there's a backlog
       | building up.
       | 
       | I think Anki is a great app, I just wish there was an algorithm
       | that would just randomly sample cards (with probability
       | proportional to how urgently you need to review it) rather than
       | put a review date on them. Something like
       | https://github.com/fasiha/ebisu but available as an Anki plugin
       | (if that supports custom algorithms on mobile yet?) or a similar
       | app with an open format for cards.
        
       | surfsvammel wrote:
       | I've learned tens of thousands of foreign language words using
       | Anki and have always find that having pictures on the cards help
       | me remember the words.
       | 
       | I currently have a (foolish?) project. I'm trying to memorize the
       | 750 cards of a quiz game that we play in the family. All
       | questions are answered by a year. So for example: "What year did
       | Coca Cola Light come out?".
       | 
       | I have been using Midjourney to generate images for those cards
       | which makes it so much eaaier to recall.
       | 
       | I have a system. I have a person representing each century;
       | Einstein is 1900-2000 and for example Mari-Antoinette is
       | 1700-1800. Then items represent the decade; a sixties car
       | represent the sixties, jacket with shoulder pads the eighties and
       | so on.
       | 
       | I do something similar for the last digit.
       | 
       | Then I have Midjourney generate such pictures, in a comic book
       | style, and I save the most fun or absurd one and use that on the
       | back side of the Anki card.
       | 
       | The image is often easier to recall than the year by itself
        
       | miga wrote:
       | I missed comparison to earlier repetition equations like
       | SuperMemo. Is there any hope for comparison and reference, or
       | will precursor be forgotten?
        
       | second_brekkie wrote:
       | Is there anybody here using this now? How does using the FSRS
       | plugin on desktop effect the usage on mobile? I'm curious but
       | don't want to mess up my anki setup.
        
       ___________________________________________________________________
       (page generated 2024-01-15 23:00 UTC)