Skip to content

Commit

Permalink
Chore/update default parameters (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiko732 committed Mar 2, 2024
1 parent a418770 commit c8e9af1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions __tests__/FSRSV4.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe("initial FSRS V4", () => {

it("default params",()=>{
const expected_w = [
0.4, 0.6, 2.4, 5.8, 4.93, 0.94, 0.86, 0.01, 1.49, 0.14, 0.94, 2.18, 0.05,
0.34, 1.26, 0.29, 2.61,
0.5701, 1.4436, 4.1386, 10.9355, 5.1443, 1.2006, 0.8627, 0.0362, 1.629,
0.1342, 1.0166, 2.1174, 0.0839, 0.3204, 1.4676, 0.219, 2.8237,
];
expect(default_request_retention).toEqual(0.9);
expect(default_maximum_interval).toEqual(36500);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ describe("default FSRSParameters", () => {
// const env = envParams;
const params = generatorParameters();
const w_v4 = [
0.4, 0.6, 2.4, 5.8, 4.93, 0.94, 0.86, 0.01, 1.49, 0.14, 0.94, 2.18, 0.05,
0.34, 1.26, 0.29, 2.61,
0.5701, 1.4436, 4.1386, 10.9355, 5.1443, 1.2006, 0.8627, 0.0362, 1.629,
0.1342, 1.0166, 2.1174, 0.0839, 0.3204, 1.4676, 0.219, 2.8237,
];
it("default_request_retention", () => {
expect(0.9).toEqual(params.request_retention);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-fsrs",
"version": "3.4.0",
"version": "3.4.1",
"description": "ts-fsrs is a ES modules package based on TypeScript, used to implement the Free Spaced Repetition Scheduler (FSRS) algorithm. It helps developers apply FSRS to their flashcard applications, there by improving the user learning experience.",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
Expand Down
6 changes: 3 additions & 3 deletions src/fsrs/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { fixDate } from "./help";
export const default_request_retention = 0.9;
export const default_maximum_interval = 36500;
export const default_w = [
0.4, 0.6, 2.4, 5.8, 4.93, 0.94, 0.86, 0.01, 1.49, 0.14, 0.94, 2.18, 0.05,
0.34, 1.26, 0.29, 2.61,
0.5701, 1.4436, 4.1386, 10.9355, 5.1443, 1.2006, 0.8627, 0.0362, 1.629,
0.1342, 1.0166, 2.1174, 0.0839, 0.3204, 1.4676, 0.219, 2.8237,
];
export const default_enable_fuzz = false;

export const FSRSVersion: string = "3.4.0";
export const FSRSVersion: string = "3.4.1";

export const generatorParameters = (
props?: Partial<FSRSParameters>,
Expand Down

0 comments on commit c8e9af1

Please sign in to comment.