Yesterday, I saw the Voting Power of the Utopian bot going low, really low, near the 70%, so I decided to try and do something about it.
So I took my Sherlock Holmes hat and started to investigate:
The reason was quite easy to determine, when determining the upvote that each contribution will get, the bot does the following:
- Step 1: Attribute a preliminary upvote to each contribution based on some metrics
- Step 2: Compute the rewards pools for each categories, based on the difficulty of the category and the competition in the latter (number of contributions at the time of the vote)
- Step 3: The bot takes the preliminary votes and update them to make sure they dont exceed the pool.
- Step 4: Minimums and Maximums are applied to each contribution according to the category they are in.
And that is where the problem comes from. Until Step 3, the bot is ready to use exactly 10 100% votes (corresponding to 20% of its voting power). But the min max functions ruin everything by increasing many of the contribution upvotes to attain their minimum.
This causes the bot to use way more that its 20% Voting Power.
Short term solution : Adjusting the parameters
I took a closer look at the parameters and asked the
console.log to show me all the votes that were changed by the min/max functions.
Read the screenshot on the right like this:
- lines with two numbers show both the index of the contribution being upvoted, and the total voting power that has been upvoted. After 165 votes, the bot has upvoted way too much (1448% instead of 1000%), almost 1.5 times too much.
- the other lines appear when a min or max function is called. It shows in which category the function was called, and shows what was the original upvote and then the upvote after the min/max function. The first line shows that a blog has been originally upvoted way too high (21), and then taken down to the maximum for blogs: 5.
In order to solve (or rather to decrease) this problem, I ve identified the 3 categories that had the biggest difference between their initial estimation and their upvote after min/max:
- translations (from 2 to 10 on the example)
- tutorials (from 3 to 8)
- graphics(from 4 to 10)
For these three categories, I put the minimum vote lower but also increased the difficulty in order to increase the reward pool. The effect is that the upvote can now go a bit lower but more voting will be attributed to the category, making high quality contributions receiving bigger upvotes.
I also changed some other parameters in a smaller measure.
After applying those changes, I came down to that:
Only 1165% are now used for the same contributions. It is far from perfect but it will already save almost 7 hous of sleeping to the bot.
Long term solutions
As I mentioned, this is just a short fix, otherwise the parameters will need to be adapted almost every day to make the bot stick exactly to its 20%.
So here are the long term solutions:
- Changing the metrics (uaJS under development).
- Adding bonus points to those categories that perform under their min in the preliminary vote (like it was done before).
- Removing the min/max , but I m not sure it will be a good option.
I would love to hear your ideas on how to tackle that!
Pull request here.
Posted on Utopian.io - Rewarding Open Source Contributors