fsrs4anki-helper icon indicating copy to clipboard operation
fsrs4anki-helper copied to clipboard

Add some fuzz to disperse siblings to increase spacing between "cousins"

Open user1823 opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe. The disperse siblings function tries to maximize the spacing between siblings. In many cases, this means that one card is scheduled at one end of the fuzz range and the other card is scheduled at the other end.

When this happens, the related cards that are not siblings of each other (called "cousins" in the subsequent text) are more likely to appear together. In other words, trying to maximize the gap between the siblings makes fuzz less effective in separating the cousins.

Describe the solution you'd like Don't try to maximize the gap between the siblings. Rather, just ensure that the gap is close to the maximum, allowing some degree of randomness to exist.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context

The following log entries show how the cards are being scheduled at the ends of the due_range.

2024-02-20 19:35:44,931 - DEBUG - min_gap: 18, latest_last_review: 1200, today: 1200
2024-02-20 19:35:44,931 - DEBUG - cid: 1701079270356	stability:  125.11	old_due:  1267	new_due:  1275	due_range: [ 1265,  1275]	last_review:  1200
2024-02-20 19:35:44,931 - DEBUG - cid: 1701079270361	stability:  150.25	old_due:  1269	new_due:  1257	due_range: [ 1257,  1269]	last_review:  1179
2024-02-20 19:35:44,947 - DEBUG - min_gap: 29, latest_last_review: 1200, today: 1200
2024-02-20 19:35:44,947 - DEBUG - cid: 1701084812839	stability:  130.94	old_due:  1273	new_due:  1280	due_range: [ 1268,  1280]	last_review:  1200
2024-02-20 19:35:44,947 - DEBUG - cid: 1701084812847	stability:  140.02	old_due:  1263	new_due:  1251	due_range: [ 1251,  1263]	last_review:  1178

user1823 avatar Feb 20 '24 14:02 user1823

The current implementation just maximizes the minimum gap. It doesn't maximize all the gaps.

L-M-Sherlock avatar Feb 20 '24 16:02 L-M-Sherlock

I don't understand how exactly the algorithm disperses the siblings. But, in most cases, the minimum gap would be the gap between the old_due of the siblings because the fuzz range is much smaller than the interval. So, maximizing this gap would imply that one sibling is scheduled at one end of its fuzz range and the other sibling at the other end of its fuzz range.

So, what I said in the last comment seems to be still valid.

user1823 avatar Feb 21 '24 12:02 user1823

I have an idea: set an upper limit for minimum gap.

L-M-Sherlock avatar Feb 21 '24 13:02 L-M-Sherlock

It creates the same problem. It is just like having smaller fuzz ranges. The cousins would still be at the ends of the new fuzz ranges. The situation is actually worse than before because the cousins are now more likely to appear close to each other (because the fuzz ranges are smaller).

Adding some more randomness seems to be the only solution.

user1823 avatar Feb 21 '24 13:02 user1823

But the current algorithm is deterministic. I don't know where to add the fuzz. Do you have any idea?

L-M-Sherlock avatar Feb 21 '24 16:02 L-M-Sherlock