From 81949cce8b03703605b2b54d89f37e27617fa0d0 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 16 Oct 2024 22:25:47 +0200 Subject: Expose index calculation is now quadratically weighted to avoid duplicates in the test --- flashcards-project/src/flashcards/scheduler_brutal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'flashcards-project') diff --git a/flashcards-project/src/flashcards/scheduler_brutal.py b/flashcards-project/src/flashcards/scheduler_brutal.py index f2a00c2..f98729c 100644 --- a/flashcards-project/src/flashcards/scheduler_brutal.py +++ b/flashcards-project/src/flashcards/scheduler_brutal.py @@ -59,7 +59,7 @@ class SchedulerBrutal(Scheduler): """ Exposure index is a measure of how much and how recently a card has been shown """ - return sum([i + 1 for i, h in enumerate(history) if h is not None]) + return sum([pow(i + 1, 2) for i, h in enumerate(history) if h is not None]) def _schedule(self, size: int) -> list[str]: weights = range(10, 10 + HISTORY_DEPTH) -- cgit v1.2.3