Clear questions and runnable code
get the best and fastest answer
I've started making the following fairly minor changes to the Voting/XP system. These changes serve to mildly discourage some forms of "problematic" voting and, more importantly, to make such "problem voting" matter much less.
The "problems" addressed here are several.
Once in a while we get a monk in a fit of pique or dudgeon decide to punish another monk or just vent their feelings by systematically down-voting every node by that monk. This is not something that we feel we can outright ban, for several reasons3. But it also is easy to characterize as an abuse of the PerlMonks voting system. So I'd like to still allow the rare monk to occassionally anonymously "vent" (in hopes of helping them to "get over it"), while greatly reducing the potential impact on the "victim" and also encouraging the "attacker" to give up sooner rather than later (in the past, some of these "attacks" have gone on for many months -- go figure).
3 We have a long-standing policy of "they are your votes, cast them how you see fit". There have been rare cases where such actions could be seen by some as a reasonable protest against systematic anti-social behavior. Allowing people a fairly inoccuous way of venting their outrage can be a good idea. There have been cases that have gone to extremes and resulted in administrative intervention. But administrative intervention sucks so we'd rather just make it so the administrators and victims mostly just don't care much when this type of thing happens in the future.
Although the vast majority of monks mostly only up-votes nodes (thankfully), we have a small but significant minority of monks who mostly only down-vote nodes. These less-discriminate down-votes also seem to be among the most disruptive (most likely to lead to "dwelling" or worse). I think if you feel justified in dishing it out, you ought to be required to "take it", so casting only down-votes is going to incur one an XP penalty roughly equal to the one being given. I hope that these changes will encourage some monks to seek more balance with respect to voting.
We also occassionally (though more rarely than many predict, I think) get monks who miss the point and decide to cast as many votes as they can primarily for the XP gained rather than to aid in encouraging the creation of good quality nodes and to aid in the identification of which nodes are of the best quality. It appears that the most common route taken is to pick an author and just systematically vote for (or against) every one of their nodes. So I think it appropriate and useful to reduce the number of votes one can cast if one is only casting them toward a single author. The tough part for me is how to (mildly) discourage casting most of your votes for a single author while not unduely causing frustration when one reasonably runs into several nodes by one author that all deserve an up-vote.
Below is part of the Voting/Experience System documentation updated with the changes being implemented.
There are five ways to earn XP on PerlMonks:
Exactly how do others' votes on my nodes affect my XP?
How you gain or lose XP when others vote on your nodes is a bit complicated. First let us define a couple of variables as follows:
The chance that a vote on a node changes the author's XP is based on the $REP's relative value to the current $NORM and on the node's age (how much time has passed since the node was created). If the node's $REP is higher than the $NORM, then an up-vote is more likely to result in the author gaining 1 XP, and a down-vote is less likely to result in the author losing 1 XP. If the $REP is below $NORM then any given vote will always have a fixed chance of altering the author's XP. The exact odds are as follows, for nodes that are 2 weeks old or newer:
1 If a node is more than 4 weeks old, then the odds of its author gaining 1 XP when it is up-voted are 1/3 no matter the reputation. When a node turns 2 weeks old, the odds are based on the node's reputation as listed in the above table. As the node's age goes from 2 weeks to 4 weeks, the odds are linearly slid from the odds shown above to the 1/3 odds. For example, exactly 3 weeks after it is posted, if 4*$NORM <= $REP then the odds are (1+1/3)/2 or a 2/3 chance of earning its author 1 XP each time it is up-voted. Also, as noted previously, the first up-vote on a node always earns its author 1 XP (and has a 1/3 chance of earning its author a 2nd XP).
2 If a node is more than 4 weeks old, then the author of the node will no longer lose any XP when it is down-voted. When a node turns 2 weeks old, the odds are based on the node's reputation as listed in the above table. As the node's age goes from 2 weeks to 4 weeks, the odds are linearly slid from the odds shown above to 0. For example, exactly 3 weeks after it is posted, a node with 3*$NORM == $REP has (1/4+0)/2 or 1/8 chance of losing its author 1 XP each time it is down-voted. Also, the first down-vote cast on a node never costs its author any XP.
Exactly how does down-voting another's node affect my XP?
If you cast down-votes infrequently, then each down-vote that you cast has a 1/4 chance of earning you 1 XP, just like casting an up-vote does. If all you ever do is down-vote, then each down-vote that you cast has a 1/3 chance of losing you 1 XP, just like the author you down-vote likely has 1/3 chance of losing 1 XP.
For each user, PerlMonks tracks a weighted average of the recent votes that they have cast. Each time you cast an up-vote, your weighted average, $vtavg, is set to 0.1 + 0.9*$vtavg. Each time you cast a down-vote, your weighted average is set to -0.1 + 0.9*$vtavg. So somebody who only ever up-votes will quickly have a $vtavg very close to +1 while somebody who only ever down-votes will quickly have a $vtavg very close to -1.
If your $vtavg is positive, then each down-vote has $vtavg/4 chance of gaining you 1 XP. If your $vtavg is negative, then each down-vote has $vtavg/3 chance of losing you 1 XP. No, you are not allowed to look up another monk's or even your own current $vtavg.
For now, casting a down-vote will not earn nor cost you any XP. About one week from now, I'll deploy the "chance to gain or lose 1 XP when casting a down-vote" feature. But your $vtavg is already being updated based on your current voting.
The rest of the features are already in place, except, of course, for the "you don't get as many votes if you mostly just vote for/against one author" feature.
Update: See also One week left until potential XP loss for casting down-votes.