Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Prev Previous commit
Next Next commit
Modify constants
  • Loading branch information
Luc-Mcgrady committed Jul 20, 2025
commit 93d969a3b03339cd0da9bacfcdf8fbde240e8442
5 changes: 2 additions & 3 deletions rslib/src/deckconfig/service.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html

use std::collections::HashMap;

use anki_proto::generic;
Expand Down Expand Up @@ -104,8 +103,8 @@ impl crate::services::DeckConfigService for Collection {
&mut self,
input: anki_proto::deck_config::GetRetentionWorkloadRequest,
) -> Result<anki_proto::deck_config::GetRetentionWorkloadResponse> {
const LEARN_SPAN: usize = 100_000_000;
const TERMINATION_PROB: f32 = 0.001;
const LEARN_SPAN: usize = 365;
const TERMINATION_PROB: f32 = 1e-5;
// the default values are from https://github.com/open-spaced-repetition/Anki-button-usage/blob/881009015c2a85ac911021d76d0aacb124849937/analysis.ipynb
const DEFAULT_LEARN_COST: f32 = 19.4698;
const DEFAULT_PASS_COST: f32 = 7.8454;
Expand Down