diff options
-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)) |