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

[v3] Scheduling is broken, card is always moved to 1 #46

Closed
aleksejrs opened this issue Dec 10, 2017 · 6 comments
Closed

[v3] Scheduling is broken, card is always moved to 1 #46

aleksejrs opened this issue Dec 10, 2017 · 6 comments
Assignees

Comments

@aleksejrs
Copy link
Contributor

aleksejrs commented Dec 10, 2017

Anki 2.0.47 (v4 on Anki 2.1.0 beta 26 seems to work, and the first card is different). I have 3453 cards in my IR deck. The Scheduling settings are 10 and 50 %. The card is always moved to 1. The Organizer is too manual and not convenient (certainly not for 10 and 50 %).

@aleksejrs aleksejrs changed the title Scheduling is broken, card is always moved to 1 Anki 2.0.x: Scheduling is broken, card is always moved to 1 Dec 10, 2017
@aleksejrs aleksejrs changed the title Anki 2.0.x: Scheduling is broken, card is always moved to 1 [v3] Scheduling is broken, card is always moved to 1 Dec 10, 2017
@aleksejrs
Copy link
Contributor Author

aleksejrs commented Dec 10, 2017

Also, unlike with v4, scheduling is recorded in the card's history:

Date	Type	Rating	Interval	Ease	Time
2017-12-10 @ 23:19	Learn	3	3d	250%	3.2s
2017-12-10 @ 23:18	Learn	2	1d	250%	1.2s
2017-12-10 @ 23:16	Learn	1	1m	250%	1.7s
2017-12-10 @ 23:16	Learn	2	1d	250%	1.7s
2017-12-10 @ 23:15	Learn	2	1d	250%	1.6s
2017-12-10 @ 23:14	Learn	2	1d	250%	4.5s
2017-12-10 @ 23:12	Learn	2	1d	250%	15.6s

@jdlorimer
Copy link
Owner

I do remember fixing a lot of issues with scheduling in v4. I'll see how much of that I can backport to v3. I understand that Anki 2.0 isn't going anywhere any time soon.

Thanks.

@jdlorimer jdlorimer self-assigned this Feb 11, 2018
@jdlorimer jdlorimer added the bug label Feb 15, 2018
@Smingvin
Copy link

New user here (a couple of days), Anki 2.0.41, ir cards always moved to 1 regardless of what I click.

@Smingvin
Copy link

Smingvin commented Sep 13, 2018

I tested the scheduler a bit. This is what happens:

Settings: percentage, randomize.

  1. Any percentage between 0 and 99 will return the card to position 1.
  2. If you set percentage to 100, cards will be moved to (or near) the bottom of the pile.
  3. If you set percentage to above 100 (either 150 or 1000) the cards will be moved to the bottom, while the tooltip will report a proportionate but non-existing index (for example: "card is moved to position 350", even though the deck has 50 cards so it is actually moved to 50)

I hope this information will be helpful for debugging.

@SijanC147
Copy link

SijanC147 commented Dec 3, 2018

I'm not sure if there are any other issues with the scheduler, but the problem that @Smingvin mentions, in particular, is due to the way that python 2 deals with the division of integer values, which are not automatically cast to float, this can be solved one of two ways, both in scheduler.py,

Either change the following line, (which was resulting in 0 every time due to loss of precision):

    newPos = totalCards * (value / 100)

to

    newPos = totalCards * (float(value) / 100)

or, my preferred way is to import the more robust division, by changing the very first line to

from __future__ import unicode_literals, division

@jdlorimer
Copy link
Owner

@SijanC147, thanks so much for that. I've made the suggested change. Hopefully this resolves the main issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants