Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/unable to use custom params #18

Conversation

ishiko732
Copy link
Contributor

code:

const fsrs = new FSRS([
  0.4911, 4.5674, 24.8836, 77.045, 7.5474, 0.1873, 1.7732, 0.001, 1.1112,
  0.152, 0.5728, 1.8747, 0.1733, 0.2449, 2.2905, 0.0, 2.9898, 0.0883,
  0.9033,
]);

const desiredRetention = 0.9;
const t = 0
const memory = fsrs.nextStates(null, desiredRetention, t);
console.log('again', +memory.again.memory.stability.toFixed(2), +memory.again.memory.difficulty.toFixed(2));
console.log('hard', +memory.hard.memory.stability.toFixed(2), +memory.hard.memory.difficulty.toFixed(2));
console.log('good', +memory.good.memory.stability.toFixed(2), +memory.good.memory.difficulty.toFixed(2));
console.log('easy', +memory.easy.memory.stability.toFixed(2), +memory.easy.memory.difficulty.toFixed(2));

before:

again 0.4 7.19
hard 1.18 6.49
good 3.17 5.28
easy 15.69 3.22

image

after:

again 0.49 7.55
hard 4.57 7.34
good 24.88 7.09
easy 77.04 6.79

image

Copy link
Member

@L-M-Sherlock L-M-Sherlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asukaminato0721 asukaminato0721 merged commit ad2caed into open-spaced-repetition:main Jan 5, 2025
30 checks passed
@ishiko732 ishiko732 deleted the Fix/unable-use-custom-parameter branch January 6, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants