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

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

Open
user1823 opened this issue Feb 20, 2024 · 5 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@user1823
Copy link
Contributor

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 user1823 added the enhancement New feature or request label Feb 20, 2024
@L-M-Sherlock
Copy link
Member

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

@user1823
Copy link
Contributor Author

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.

@L-M-Sherlock
Copy link
Member

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

@user1823
Copy link
Contributor Author

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.

@L-M-Sherlock
Copy link
Member

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

@L-M-Sherlock L-M-Sherlock added the help wanted Extra attention is needed label Feb 29, 2024
@L-M-Sherlock L-M-Sherlock pinned this issue Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants