glutanimate / puppy-reinforcement

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

[Puppy Reinforcement] Randomization is not very random? #3

Closed RefreshingSugawara closed 5 years ago

RefreshingSugawara commented 6 years ago

Hello! I've been using Puppy Reinforcement, and it's really a wonderful feedback tool. I've noticed though that I get some pictures much more often than others. Looking through the picture folder, there are some pictures that I've definitely never seen before, and I've been using the add-on for a couple months now.

I looked through the code to see if I could understand how your program decides which picture to display, but it's beyond my knowledge level. Has anyone else noticed this or figured out how to make the randomization...more random? It's a little annoying to have 50+ images, and see the same one multiple times in a session, as well as not show some images that I've added to the folder.

Thanks so much!

glutanimate commented 6 years ago

The add-on uses python's random library to pick a completely random image from the available options. However, I've had some reports from other users saying that their images are not being picked up correctly. So this might not be an issue with randomization at all.

With that in mind: Do at least some of your images appear through the reviews? What happens if you remove the stock images and just leave your custom pictures in the folder? Are they iterated over correctly?

Another thing that might be at play here is the way we perceive randomness. Spotify had to deal with the same issue regarding their shuffle algorithm a few years ago. Truly random choice doesn't always feel like it. Perhaps I'll switch to a similar approach to Spotify in the future, randomly shuffling the image list once and then iterating over it, instead of hosting a random draw for each image individually.

RefreshingSugawara commented 6 years ago

Hi Glutanimate! Thanks for much for responding!

Yes, I can confirm that all my custom pictures do appear during the reviews. I cut the number of pictures down to 10, including a mix of stock and customs, and it seems to cycle through all of them eventually, although again, sometimes repeats images twice or three times before getting to a new picture.

The perceived randomness could definitely be the issue here. I think your idea of shuffling once then iterating through the list would be really great! I would definitely prefer that.

As for other people's images not being picked up correctly, I noticed that the image MUST end in .jpg. I had a couple that were .png and .jpeg, and those don't get picked up.

Thanks again for making this addon, and all your others! It's really made the anki experience so much better.

glutanimate commented 5 years ago

Hey @RefreshingSugawara,

Sorry for the late reply. I just wanted to late you know that I'm closing this bug report for now in favor of the feature request above. Thanks again for helpful feedback!