Closed YorkZ closed 2 years ago
FSRS4Anki depends on Anki's custom scheduling. Maybe I should propose a feature request for that to Anki.
I post the feature request in Anki's forum: https://forums.ankiweb.net/t/set-anki-custom-scheduling-per-deck-option/
Thank you so much @L-M-Sherlock.
Dae gave a solution, but I think it is too technical for average users. I will test it later.
That's a smart idea though, thank you so much @L-M-Sherlock for having to do additional implementation on this.
I implement the solution of dae on #20 . You can checkout this branch to set parameters for a specific deck.
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?
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
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?
Yes, just don't modify the id
.
Here's one of mine:
<div id=deck>{{Deck}}</div><br><hr>
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;
}
}
- 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;
}
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.
I just figured out that
Anki
'sCustom scheduling
is shared between all the decks instead of being "per deck". I'm not sure whether this is good because my understanding is that the algorithm parameters should be different from deck to deck. In my case, the review performance of different decks are very different depending on how "hard" a deck is. Please correct me if my understanding is incorrect, but if my concern is legitimate, what's your suggestion to workaround it? Thank you.