diff options
author | Eddy Pedroni <epedroni@pm.me> | 2024-09-26 16:44:38 +0200 |
---|---|---|
committer | Eddy Pedroni <epedroni@pm.me> | 2024-09-26 16:44:38 +0200 |
commit | 6a83ad48e36404ad502588ac5b9c5c997d09d4c0 (patch) | |
tree | 8a72a56e77e29e5f6bccb6bc0d619056959f4873 /flashcards-project/src/flashcards | |
parent | e65bef9c22244fc9bcd22a37d335f5f76ba16ff5 (diff) |
Improve scheduler
Diffstat (limited to 'flashcards-project/src/flashcards')
-rw-r--r-- | flashcards-project/src/flashcards/scheduler_brutal.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/flashcards-project/src/flashcards/scheduler_brutal.py b/flashcards-project/src/flashcards/scheduler_brutal.py index ebbc0ff..f2a00c2 100644 --- a/flashcards-project/src/flashcards/scheduler_brutal.py +++ b/flashcards-project/src/flashcards/scheduler_brutal.py @@ -65,6 +65,9 @@ class SchedulerBrutal(Scheduler): weights = range(10, 10 + HISTORY_DEPTH) cards = [id for id, card in self._cards.items()] + # Shuffle once at the start, that way if all cards have the same score you still get some variety + shuffle(cards) + # First sort by consolidation index cards.sort(key=lambda id: SchedulerBrutal._consolidationIndex(self._state[id], weights)) |