Marshmallows - Lookaway CMS Feature

Documented by kbruder tech✞ᵀᵀᴹ on Aug 28, 2020
Last updated on Jan 15, 2021


Marshmallow Banner

Introduction

Online content can be promoted and ranked in a negative feedback system based on the principle of delayed gratification. The system is called Marshmallows, named after the Stanford Marshmallow Experiment. As content receives more marshmallows, it will become prominent on the site. The more times a member gives marshmallows to content over a period of time, the fewer marshmallows will be given each time. The intent is to equalize member influence on how the site and the membership are presented to the world.


How it Works

Only members of the site can give marshmallows.

The more marshmallows a piece of content has been given, the more prominent it will be on the site and the higher up it will appear in lists which are ordered by most marshmallows.

A member must have been so for a certain amount of time before they are eligible to give marshmallows.

The default waiting period is 30 days (n).

Members can only give marshmallows every so often. By default members must wait 5 minutes before giving marshmallows again.

Members may give marshmallows to the content they have contributed and published as well as to content published by other members.

The weight is determined by the total number of times a member has given marshmallows to content (q) in the past (n) days. The quotient of (n / q) is multiplied by a normalizing multiplier (m), 5 by default. Therefore if the weight is (w) then (w = p * n / q). When marshmallows are given, (q) only includes marshmallows given to other content of the same type. That is to say giving marshmallows to posts several times per day will have no effect on the number of marshmallows when next are given to an article.

members/models.py
...    
    def get_adjusted_weight(self, n=30, m=5, *args, **kwargs):
        # get n days ago
        t = timezone.now() - datetime.timedelta(days=n)
        ## number marshmallows allocated by the user in the last n days
        if 'model' in kwargs:
            q = kwargs['model'].objects.filter(
                marshmallows__member=self,
                marshmallows__date__gte=t,
            ).count()
        else:
            q = Marshmallow.objects.filter(member=self, date__gte=t).count()
        if q == 0:
            q += 1
        print('number of marshmalows allocated in last {0} days by {1}: {2}'.format(n, q, self))
        # weight allocation period
        p = n / q
        # apply the multiplier
        return p * m
...

Source: kbruder Tech


Conclusion

Lookaway has inverted the model that nearly all content ranking systems use. Instead of promoting content based on the number of "likes" or comments, we take a more holistic approach to deciding what is at the top of our pages. Let's dispense with driving user engagement, red notifications, comments sections and rewards for spamming and trolling. Members with a fresh perspective can tip the scales fostering serendipity and discovery while attentive members can keep the beat with frequent feedback. Build your membership, let go of the controls and see what rises to the top.


Referenced by

Lookaway CMS - Open Source Content Management System

Lookaway CMS is an open source content management system for independent publishing. Built with Python and Django.

Members - Lookaway CMS Feature

The Members app is a feature of Lookaway Content Management System. The Member model inherits the User model from the Django Authentication System.

Links

🌐 The Marshmallow Experiment and the Power of Delayed Gratification
40 Years of Stanford Research Found That People With This One Quality Are More Likely to Succeed