create account

The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看) by justyy

View this thread on: hive.blogpeakd.comecency.com
· @justyy · (edited)
$81.60
The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)
In [my previous post]((https://steemit.com/cn/@justyy/200steem-1-sp)), a question was raised:  How to upvote in order to maximize the payout per day?

之前说到  [第一次打肿脸充胖子 - 花了200STEEM租1万SP四周!](https://steemit.com/cn/@justyy/200steem-1-sp) 那么就扯到了怎么样点赞收益最高的问题。

Things could get very complicated, so we make some assumptions:

由于实际情况复杂(比如每个人睡眠时间不同,碎片时间段不一样),所以我们来做一个大胆但合理有效的假设:

We assume that you start with a P (Voting Power, with P=1 equals 100% voting power), and we know that 100% vote costs around 2% voting power. Each 36 minutes, you get 0.5% voting power restored.

假设我们用 P 来表示每个人每天固定时间段起始的 能量,满血就是100%。我们已经知道,每100%点一次需要耗掉2%血量。并且每36分钟回0.5%的血量。

And we know that the 100% voting power generates M dollar payout. If you only upvote T times and that happens only in a specific N-hours timespan e.g. from 10:00AM to 10:00PM (after that, you go to sleep).

并且已经每次100%点的收益是M美元,如果每个人计划这一天点T次赞,并且只有在一个N小时的时间段内可以点赞(比如醒着的时候)。

The straightforward voting strategy will be to use all T upvotes at the beginning of the timespan.

这时候,我们可以来看一种点赞方式:

The payout equation will be: 

在这个固定的时间段就把这T次全点完,那么这样的收益为:

```
Sum P*M*(1-0.02*(i-1)) for i=1..T
```

For example, when T=2, upvoting twice immediately after start will be:
比如T=2的时候,在最开始就点完两次赞的收益为:

```
P*M + P*M*(1-0.02)
```

Translated into Javascript, the code explains the idea:
这样翻译成Javascript代码就是:

```
// P - Current Voting Power e.g. 100%
// M - Payout at 100%  unit $
// T - Number of Upvotes
// N - Number of Hours (Interval)
function calcPayout0(P, M, T, N) {
	var x = 0;
	for (var i = T; i > 0; -- i) {
		x += P * M;
		P -= 0.02; // 2% voting power decrease 能量最多为100%
	}
	return x;
}
```

However, if the starting power is not 100%, it is always wait till the end of the timespan, when we have bigger voting power. With a line added, we have a better version:
但我们这么一样,如果我们在最开始的时候能量P不为100%,我们可以完全等到时间段结束的时候恢复投票能量了再一起点,那么这样的话,上面的代码稍微改一下,加一行,就得到了第二个版本:

```
// P - Current Voting Power e.g. 100%
// M - Payout at 100%  unit $
// T - Number of Upvotes
// N - Number of Hours (Interval)
function calcPayout1(P, M, T, N) {
	var x = 0;
	P = Math.min(1, P + 0.005 / 0.6 * N); // Maximum 100% voting power, 能量最多为100% 
	for (var i = T; i > 0; -- i) {
		x += P * M;
		P -= 0.02;  // 2% voting power decrease  每次100%点损失2%能量
	}
	return x;
}
```

Every 36 minutes we got 0.5% voting power back, that is we restore 0.005/0.6 each hour. Another strategy is to divide the N hour time span into T-1 slots, so with the energy restores at each slots, the equation becomes:
每36分钟恢复0.5% 也就是说每小时恢复 0.005/0.6。嗯,有点意思,还有没有其它点赞方法?有的,我们可以把这N小时时间平均分成T - 1次来点,这样的话,我们需要加上每段时间能量的恢复,公式为:

```
Sum P*M*(1-0.02*(i-1)+R) for i=1..T
```

R is the energy restored per N/(T-1), using JS explains better.
其中R为每段N/(T-1)时间内恢复的能量,我们用JS代码来解释清楚一些:

```
// P - Current Voting Power e.g. 100%
// M - Payout at 100%  unit $
// T - Number of Upvotes
// N - Number of Hours (Interval)
function calcPayout2(P, M, T, N) {
	var x = 0;	
	var sp_restored = 0;	
	if (T == 1) {
		P = Math.min(1, P + 0.005 / 0.6 * N);	
	} else {
		var sp_restored = 0.005 / 0.6 * (N / (T - 1));
	}
	for (var i = T; i > 0; -- i) {
		x += P * M;
		P -= 0.02;  // 2% loss per 100% upvote 每次100%点损失2%能量
		P += sp_restored; // each 36 minutes restore 0.5% 能量每36分钟回复0.5%
	}
	return x;	
}
```

The equation can be uniformed by extracting M which is like a constant. We use M=270 because @abit gives roughly 270$ per 100% upvote. A bigger M will make the result analysis clear.
我们注意到,M可以被单一化提取出去(不影响大小判断),不过为了让结果更清楚,我们选择M=270美元(据说 @abit 100%点赞是270美元)

# 我们来比较几组值 STEEMIT UPVOTING STRATEGY DATA ANALYSIS
Disclaimer: I am not responsible for your payout.. These are just for your references (and may contain error)
以下数据(很有可能有错误)仅供参考!本人不对您的收益负责。

## When you only upvote once 当你只每天只点1次赞的时候 
```
var T = 1;
var N = 10;
```

You can upvote when you wake up, or when the VP restores - vote before you go to bed. If P=0.9, the three methods generate payouts of:
这时候,可以在开始点,可以在最后能量恢复了的时候点,很显然,如果起始能量P=0.9,那么三种方式的结果为:

```
calcPayout0=243
calcPayout1=265.5
calcPayout2=265.5
```

The Voting Power cannot restore to 100% in 10 hour span, that is why the maximal payout is 265.5 instead of 270. Clearly, voting when you have a higher voting power is the best choice.
因为能量在10个小时内恢复不到100%,所以最大收益为265.5 元(100%的情况下是270美元),显然,等能量恢复大了收益高一些。

However, if the starting power is 100%, it does not make any difference, they all give $270 payout.
但如果起始能量就是100%了,这样的情况下是没有区别的,三种方案都是270美元。

## When you upvote 8 times per day 当你每天点8次赞
Starting Voting Power P=100%, T=8, N=10, The third strategy is better (vote and rest)
起始能量P=100%,T=8,N=10。第三种点一次等恢复一点能量再点这种明显收益就更高:

```
calcPayout0=2008.8
calcPayout1=2008.8
calcPayout2=2098.8
```

However, when the P is 80% at the begining of timespan:
但是如果是这组值:起始能量是80%

```
var P = 0.8;
var M = 270;
var T = 8;
var N = 10;
```

The second method gives a higher payout. That is,  you use your 8 upvotes immediately before you go to bed when you have already restored to a higher VP for the day.
这样的结果反而是第二种方式好,也就是说等到能量恢复到最大的时候一起点(比如你一天早上都不点,等到晚上你睡觉前再一下子全部点完8次):

```
calcPayout0=1576.8
calcPayout1=1756.8
calcPayout2=1666.8
```

When the P is closest to 100%, the third strategy (vote and rest) is better than the second one.
只有在初始能量接近100%的情况下,第三种方式才有会高于第二种:

```
var P = 0.99;
var M = 270;
var T = 8;
var N = 10;
```

Does this result surprise you?
结果有没有很让人很意外?

```
calcPayout0=1987.2
calcPayout1=2008.8
calcPayout2=2077.2
```

There are, of course, other voting strategies, for example, you can use half your votes in the morning and the rest in the evening. But I guess the results are pretty much similar (the analysis could go further).  My suggestions according to the fact that most Steemians won't have a higher P at the beginning of each day: 
当然还有其它种策略:比如最开始时间段先点1半,最后睡觉前再点完剩下的1半。你也可以写相应的程序来验证一下。但是不管如何,大部分人的每天起始能量不为100%,或者像我经常点赞点到少于70%,这种情况下,也就是第二种方式会好一些:

** Use your votes right before you go to bed! **
**就是睡觉前统统点完你的指标!**

Most of use won't care so much because our M is small compared to big whales.. For example, my M = 1.7.
当然,请记住,上面的计算是基于270美元单次点击得到的结果,如果像我现在M=1.7的情况:得到的结果很接近:

```
calcPayout0=12.512
calcPayout1=12.648
calcPayout2=13.0786666666667
```

The results are very close:  So, don't spend too much time considering your best voting strategy.  You should spend more time in your posts on [SteemIt](https://helloacm.com/how-to-get-transfer-history-of-steemit-accounts-via-steemit-apitransfer-history/)!
所以,我想大部分人都不需要操这个心,因为小鲸鱼们点一次才多少钱,各种点赞策略其实不会差太多,倒不如花时间在如何提高文章的质量上。

我们都不需要操这种心,除非像 @abit @oflyhigh @tumutanzi 这样的大鱼。

https://justyy.com/wp-content/uploads/2017/07/justyy-steemit.png

Originally published at https://steemit.com Thank you for reading my post, feel free to Follow, Upvote, Reply, ReSteem (repost) @justyy which motivates me to create more quality posts.

原创 https://Steemit.com 首发。感谢阅读,如有可能,欢迎Follow, Upvote, Reply, ReSteem (repost) @justyy 激励我创作更多更好的内容。

 // 稍候同步到我的[中文博客](https://justyy.com)和[英文博客](https://codingforspeed.com)。
- [SteemIt 怎么样点赞收益最高? ](https://justyy.com/archives/5077)
- [The Best SteemIt UpVoting Strategy Calculator in Javascript](https://helloacm.com/the-best-steemit-upvoting-strategy-calculator-in-javascript/)

# 近期热贴 Recent Popular Posts 
- [中年大叔还有梦可以做么?](https://steemit.com/cn/@justyy/7d7hyi)
- [How to Use Steem API/transfer-history and IFTTT to sync to Slack? 如何使用Steem API/transfer-history和IFTTT同步到Slack消息? ](https://steemit.com/cn/@justyy/steem-api-transfer-history-ifttt-slack-how-to-use-steem-api-transfer-history-and-ifttt-to-sync-to-slack)
- [SteemIt API/transfer-history 最简单获取帐号钱包记录的API](https://steemit.com/cn/@justyy/steemit-api-transfer-history-api)
- [第一次打肿脸充胖子 - 花了200STEEM租1万SP四周!](https://steemit.com/cn/@justyy/200steem-1-sp)
- [API steemit/account 简单封装了一下 steemit/account 的 API](https://steemit.com/cn/@justyy/api-steemit-account-steemit-account-api)
- [Code Review Series - Value Not Used [坑爹的代码] - 变量未使用](https://steemit.com/cn/@justyy/code-review-series-value-not-used)
- [The K Nearest Neighbor Algorithm (Prediction) Demonstration by MySQL 机器学习 用 MySQL 来演示 KNN算法 ](https://steemit.com/cn/@justyy/mysql-knn-the-k-nearest-neighbor-algorithm-prediction-demonstration-by-mysql)

https://justyy.com/gif/steemit.gif
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 71 others
properties (23)
authorjustyy
permlinkthe-best-upvoting-strategy-calculator-in-javascript
categorycn
json_metadata{"tags":["cn","cn-programming","steemstem","steemit","math"],"users":["abit","oflyhigh","tumutanzi","justyy"],"image":["https://justyy.com/wp-content/uploads/2017/07/justyy-steemit.png","https://justyy.com/gif/steemit.gif"],"links":["(https://steemit.com/cn/@justyy/200steem-1-sp)","https://steemit.com/cn/@justyy/200steem-1-sp","https://helloacm.com/how-to-get-transfer-history-of-steemit-accounts-via-steemit-apitransfer-history/","https://steemit.com","https://Steemit.com","https://justyy.com","https://codingforspeed.com","https://justyy.com/archives/5077","https://helloacm.com/the-best-steemit-upvoting-strategy-calculator-in-javascript/","https://steemit.com/cn/@justyy/7d7hyi","https://steemit.com/cn/@justyy/steem-api-transfer-history-ifttt-slack-how-to-use-steem-api-transfer-history-and-ifttt-to-sync-to-slack","https://steemit.com/cn/@justyy/steemit-api-transfer-history-api","https://steemit.com/cn/@justyy/api-steemit-account-steemit-account-api","https://steemit.com/cn/@justyy/code-review-series-value-not-used","https://steemit.com/cn/@justyy/mysql-knn-the-k-nearest-neighbor-algorithm-prediction-demonstration-by-mysql"],"app":"steemit/0.1","format":"markdown"}
created2017-08-15 20:41:39
last_update2017-08-21 13:24:42
depth0
children10
last_payout2017-08-22 20:41:39
cashout_time1969-12-31 23:59:59
total_payout_value62.131 HBD
curator_payout_value19.468 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8,190
author_reputation280,616,224,641,976
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,915,963
net_rshares23,235,490,730,750
author_curate_reward""
vote details (135)
@biuiam ·
Very interesting analysis, but still not my concern in the given moment as I am small minnows XD
properties (22)
authorbiuiam
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170816t001018060z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-16 00:10:18
last_update2017-08-16 00:10:18
depth1
children0
last_payout2017-08-23 00:10:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length96
author_reputation66,804,947,493,380
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,929,599
net_rshares0
@coldhair ·
这两百个Steem,花的很值了,通过它研究出这么高深的技术问题。
properties (22)
authorcoldhair
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170815t224703130z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-15 22:47:06
last_update2017-08-15 22:47:06
depth1
children1
last_payout2017-08-22 22:47:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation34,617,352,014,488
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,924,116
net_rshares0
@justyy ·
本来还挺后悔的,但是听了你这句话,还有就是现在价格涨到266,所以心理一下就好受多了。
properties (22)
authorjustyy
permlinkre-coldhair-re-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170817t082142813z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-17 08:21:42
last_update2017-08-17 08:21:42
depth2
children0
last_payout2017-08-24 08:21:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length43
author_reputation280,616,224,641,976
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,064,067
net_rshares0
@fr3eze ·
Good read!

TLDR: Doesn't matter if you are a minnow with little SP
太长没读:如果你是小鱼,怎么投票不怎么有效益差异。
properties (22)
authorfr3eze
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170816t001409480z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-16 00:14:12
last_update2017-08-16 00:14:12
depth1
children0
last_payout2017-08-23 00:14:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length93
author_reputation62,201,653,753,684
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,929,866
net_rshares0
@geeekgirl ·
大哥,您的數學太了得了…  您是唸電腦工程的嗎?
properties (22)
authorgeeekgirl
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170816t190226945z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-16 19:02:27
last_update2017-08-16 19:02:27
depth1
children1
last_payout2017-08-23 19:02:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length24
author_reputation124,223,225,338
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,014,187
net_rshares0
@justyy ·
是的,本科学的是计算机,博士学的是无线通讯。
properties (22)
authorjustyy
permlinkre-geeekgirl-re-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170816t194355227z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-16 19:43:57
last_update2017-08-16 19:43:57
depth2
children0
last_payout2017-08-23 19:43:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation280,616,224,641,976
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,017,510
net_rshares0
@liangfengyouren ·
我们只能花时间在如何提高文章的质量上了。哈哈哈
properties (22)
authorliangfengyouren
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170816t124118691z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-16 12:41:18
last_update2017-08-16 12:41:18
depth1
children0
last_payout2017-08-23 12:41:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length23
author_reputation5,130,020,498,207
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,980,631
net_rshares0
@mrrifat1 ·
Very interesting and helpfull.
properties (22)
authormrrifat1
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170816t072725772z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-16 07:27:15
last_update2017-08-16 07:27:15
depth1
children0
last_payout2017-08-23 07:27:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length30
author_reputation3,567,229,566,376
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,957,844
net_rshares0
@randowhale ·
This post received a 3.0% upvote from @randowhale thanks to @justyy!  For more information, [click here](https://steemit.com/steemit/@randowhale/randowhale-is-now-only-1-steem-sbd-per-vote-spread-the-news)!
👍  
properties (23)
authorrandowhale
permlinkre-the-best-upvoting-strategy-calculator-in-javascript-20170816t085956
categorycn
json_metadata"{"format": "markdown", "app": "randowhale/0.1"}"
created2017-08-16 08:59:57
last_update2017-08-16 08:59:57
depth1
children0
last_payout2017-08-23 08:59:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length206
author_reputation47,657,457,485,459
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,964,326
net_rshares2,117,196,179
author_curate_reward""
vote details (1)
@tumutanzi ·
每次100%点击的话,是消耗当前剩余能量的2%。

技术上来分析有点意思,但实际上我是根据内容来点赞的,那才是真正意义所在。
properties (22)
authortumutanzi
permlinkre-justyy-the-best-upvoting-strategy-calculator-in-javascript-20170815t230749240z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-15 23:07:51
last_update2017-08-15 23:07:51
depth1
children0
last_payout2017-08-22 23:07:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation193,777,509,634,731
root_title"The Best Upvoting Strategy Calculator in Javascript - 怎么样点赞收益最高? (新老用户都来看看)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,925,387
net_rshares0