WISVCH / florriebot

Florrie bot <3
1 stars 6 forks source link

Improve Reddit post selection algorithm #125

Open TimvdLippe opened 6 years ago

TimvdLippe commented 6 years ago

Right now, the selection is purely random, per the implementation of https://hubot.github.com/docs/scripting/#random This thus leads to the potential selection of sub-par posts. Instead, we should give a higher probability to posts with a lot of points. E.g. the probability of a post to be selected should be post.weight / sum(post.weight).

praseodym commented 6 years ago

Or maybe use random over just the top n days feed?

TimvdLippe commented 6 years ago

Yes that is possible as well. We probably can take the week? https://api.reddit.com/r/autistentoren/top?t=week seems to work and gives back 7 results (only 7 new posts this week). In that case, we can still do the post-filtering with the randomness factor I think.

We would thus retrieve (at most) 25 top posts of a subreddit and then randomly select based on the post score.

praseodym commented 6 years ago

Sounds good!