Skip to content

A bad case where the interval may go backwards due to fuzz #4431

@L-M-Sherlock

Description

@L-M-Sherlock

Even when the stability increased, the last interval still went backwards from 4 days to 3 days:

Image

After running several tests, I figured it out. Anki forces good_interval >= hard_interval+1 and the second last hard interval was 2 days, so the good interval was 3 days. Due to fuzz, a 3 day interval can be 2, 3 or 4 days. In this case, it was 4 days.

After 4 days elapsed, the hard interval was still 2 days, and the good interval was 3 days, which was less than 4 days, so it didn't trigger the function to avoid fuzz to go backwards.

@user1823 please take a look.

[src/inference.rs:832:9] &next_states = NextStates {
    again: ItemState {
        memory: MemoryState {
            stability: 0.5836956,
            difficulty: 9.986542,
        },
        interval: 0.5836956,
    },
    hard: ItemState {
        memory: MemoryState {
            stability: 1.8026618,
            difficulty: 9.977774,
        },
        interval: 1.8026618,
    },
    good: ItemState {
        memory: MemoryState {
            stability: 1.9455183,
            difficulty: 9.969007,
        },
        interval: 1.9455183,
    },
    easy: ItemState {
        memory: MemoryState {
            stability: 3.0436015,
            difficulty: 9.960239,
        },
        interval: 3.0436015,
    },
}
[src/inference.rs:835:9] hard_interval = 2
[src/inference.rs:835:9] good_interval = 3
[src/inference.rs:837:9] fuzzed_good_interval = 4
[src/inference.rs:840:9] &next_states = NextStates {
    again: ItemState {
        memory: MemoryState {
            stability: 0.75977373,
            difficulty: 9.985005,
        },
        interval: 0.75977373,
    },
    hard: ItemState {
        memory: MemoryState {
            stability: 2.4843144,
            difficulty: 9.974718,
        },
        interval: 2.4843142,
    },
    good: ItemState {
        memory: MemoryState {
            stability: 2.7269485,
            difficulty: 9.96443,
        },
        interval: 2.7269483,
    },
    easy: ItemState {
        memory: MemoryState {
            stability: 4.591988,
            difficulty: 9.954142,
        },
        interval: 4.591988,
    },
}
[src/inference.rs:843:9] hard_interval = 2
[src/inference.rs:843:9] good_interval = 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions