glutanimate / puppy-reinforcement

Puppy Reinforcement add-on for Anki
https://ankiweb.net/shared/info/1722658993
Other
15 stars 9 forks source link

Make playlist of images persistent between sessions. #24

Open AlexanderMamonov opened 2 years ago

AlexanderMamonov commented 2 years ago

Description

The current implementation builds a playlist of images for every session. The playlist contains each image once and in random order. I believe it uses a playlist instead of just random selection in order to show images with equal frequency within one session. So a user doesn't have the feeling that some images showed more frequently than others and each image is the kind of image a user hasn't seen for a long time and it creates a "surprise effect" because the user forgot the image exists and it sees it like in the first time.

If the amount of user's images is greater than a user can see in one session then the current implementation behaves very close to just random selection. Because it rebuilds the playlist for each session and only X first images from the playlist are shown to the user during the session. Some images may appear on the top of the playlist more often than others.

This MR makes the playlist persistent between sessions. When the playlist is created it should be shown completely and only then the new one should be generated.

Checklist:

Please replace the space inside the brackets with an x and fill out the ellipses if the following items apply:

glutanimate commented 11 months ago

Good thinking, thank you! Will revisit this and take a closer look after the 23.10 compat release.