GithubHelp home page GithubHelp logo

Comments (14)

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024 2
  • How do I declare deck_name if I have more than one deck at the same hierarchy? [like in Core_german or 日本語]

You can use v2.1.0 https://github.com/open-spaced-repetition/fsrs4anki/blob/v2.1.0/fsrs4anki_scheduler.js

// parameters for a deck's all sub-decks
if (deck_name.startsWith("ALL::Archive")) {
    var f_s = [1.3028,1.4602];
    var f_d = [1.011,-0.8495,-1.1868,0.0417];
    var s_w = [3.2415,-0.8428,-0.0158,1.5379,2.1647,-0.3524,0.4513,1.1748];
    // User's custom parameters for sub-decks
    requestRetention = 0.85;
    maximumInterval = 36500;
    easyBonus = 1.3;
    hardInterval = 1.2;
}

from fsrs4anki.

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024 1

FSRS4Anki depends on Anki's custom scheduling. Maybe I should propose a feature request for that to Anki.

from fsrs4anki.

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024 1

Yes, the main is the latest version that supports setting different parameters to different decks. You can find the guide in the comments of the scheduler.js

from fsrs4anki.

YorkZ avatar YorkZ commented on July 23, 2024 1

Here's one of mine:

<div id=deck>{{Deck}}</div><br><hr>

from fsrs4anki.

Arbitrate3280 avatar Arbitrate3280 commented on July 23, 2024 1

Sorry to revive a closed issue, but just wanted to check if I understood correctly.

Right now I have 3 specific decks I wanted to apply the optimized algorithm too.

So I did it like this:


if (document.getElementById("deck") !== null) {
    const deck_name = document.getElementById("deck").getAttribute("deck_name");
    // parameters for a specific deck
    if (deck_name == "Medicina") {
        var w = [0.2928, 0.9294, 5.1375, -0.6332, -0.6345, 0.0715, 1.3676, -0.1823, 0.7659, 1.6259, -0.571, 0.7588, 0.5924];
        // User's custom parameters for the specific deck
        requestRetention = 0.85;
        maximumInterval = 36500;
        easyBonus = 1.5;
        hardInterval = 1.2;
    // parameters for a deck's all sub-decks
    } else if (deck_name == "Geografia") {
        var w = [0.893, 1.0069, 5.2526, -0.7893, -0.7092, 0.0386, 1.2696, -0.1351, 0.6625, 1.53, -0.6509, 0.8015, 0.482];
        // User's custom parameters for sub-decks
        requestRetention = 0.85;
        maximumInterval = 36500;
        easyBonus = 1.5;
        hardInterval = 1.2;
    } else if (deck_name.startsWith("Chinese")) {
        var w = [0.9634, 0.9915, 5.1104, -0.6078, -0.6789, 0.0, 1.3312, -0.0537, 0.7292, 1.7955, -0.4129, 0.4375, 0.9259];
        // User's custom parameters for sub-decks
        requestRetention = 0.85;
        maximumInterval = 36500;
        easyBonus = 1.5;
        hardInterval = 1.2;
    }
}

is this correct? The Chinese one is the only one with sub-decks.

edit: nevermind, I confirmed it was working with the webview inspector addon.

from fsrs4anki.

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024

I post the feature request in Anki's forum: https://forums.ankiweb.net/t/set-anki-custom-scheduling-per-deck-option/

from fsrs4anki.

YorkZ avatar YorkZ commented on July 23, 2024

Thank you so much @L-M-Sherlock.

from fsrs4anki.

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024

Dae gave a solution, but I think it is too technical for average users. I will test it later.

from fsrs4anki.

YorkZ avatar YorkZ commented on July 23, 2024

That's a smart idea though, thank you so much @L-M-Sherlock for having to do additional implementation on this.

from fsrs4anki.

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024

I implement the solution of dae on #20 . You can checkout this branch to set parameters for a specific deck.

from fsrs4anki.

YorkZ avatar YorkZ commented on July 23, 2024

Looks like you've merged it into main so I can use the main right? Also, how do I set different parameters to different decks?

from fsrs4anki.

YorkZ avatar YorkZ commented on July 23, 2024

Can the deck name be placed anywhere in the Front Template? For example, adding the prefix text "Deck: " is OK right? Also, would adding a <br> and/or <hr> after the deck name be OK as well?

from fsrs4anki.

L-M-Sherlock avatar L-M-Sherlock commented on July 23, 2024

Yes, just don't modify the id.

from fsrs4anki.

cocowash avatar cocowash commented on July 23, 2024

Hi, thanks for sharing this project with the community. I'm trying to implement custom schedule by deck, but I have some questions that I need to clarify.
Here is my deck for the example.

  1. How do I declare deck_name if I have more than one deck at the same hierarchy? [like in Core_german or 日本語]
  2. If I declare deck_name with just the root of those decks, are the siblings included?
  3. script should something like these right?
if (document.getElementById('deck') !== null) {
    const deck_name = document.getElementById('deck').innerHTML;
    // parameters for a specific deck
    if (deck_name == "Core\_German") {
        var f_s = [1.0994,1.1744];
        var f_d = [1.0022,-1.0578,-1.3561,0.0045];
        var s_w = [3.1375,-0.7485,-0.01,1.4304,1.9598,-0.6523,0.3455,1.0339];

        requestRetention = 0.85;
        maximumInterval = 36500;
        easyBonus = 1.3;
        hardInterval = 1.2;
    }
if (deck_name == "日本語") {
        var f_s = [0.739,1.6203];
        var f_d = [1.368,-1.4266,-1.192,0.1733];
        var s_w = [3.0237,-0.8435,-0.0222,1.2885,1.7793,-0.7082,0.7611,0.9812];

        requestRetention = 0.85;
        maximumInterval = 36500;
        easyBonus = 1.3;
        hardInterval = 1.2;
    }
}

from fsrs4anki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.