和小卖部猜拳赢的机率是多少?

in #cn5 years ago (edited)



最近很多人说小卖部@teamcn-shop 猜拳输多赢少,是不是小卖部的猜拳有黑幕?

为了证明小卖部不是黑店,这里和大家谈谈小卖部猜拳的机率。

可能有人以为猜拳的机率是50:50,因为不是赢就是输,为什么小卖部那么难赢呢?

其实玩家要猜赢小卖部的机率是1/3,因为有3种结果:胜,平,输

要获得每日小卖部的猜拳小能手的机率就更低了。

每日猜拳小能手需要至少获得2胜,要获得2胜,机率是1/3 * 1/3 = 1/9.
也就是说平均要猜9局才能获得2胜(小卖部是RC克星!~)。

说了那么多,如果你们还不信小卖部没有黑幕,这里是小卖部猜拳部分的代码,加了注释方便大家理解。

steem.api.streamTransactions("head", function (err, result) {
        if (result && !err) {
            let txType = result.operations[0][0];
            let txData = result.operations[0][1];
            var result;
            var choice;
            var machine;
            var count = 0;
            var rps_result = "";
            //查看是否有人在回复小卖部
            let includesMention = checkContent(txType, txData);
            if (includesMention) {
                //如果有,查看是否在黑名单里面
                if (blacklist.indexOf(txData.author) < 0) {
                    var lowerCaseBody = txData.body.toLowerCase();
                    //查看回复是不是包含‘rock','石头','石頭','软哥','軟哥'
                    if (lowerCaseBody.includes('rock') || lowerCaseBody.includes('石头') || lowerCaseBody.includes('石頭') || lowerCaseBody.includes('软哥') || lowerCaseBody.includes('軟哥')) {
                        choice = 'rock';
                        count++;
                    }
                    //查看回复是不是包含'paper','布','米高'
                    if (lowerCaseBody.includes('paper') || lowerCaseBody.includes('布') || lowerCaseBody.includes('米高')) {
                        choice = 'paper';
                        count++;
                    }
                    //查看回复是不是包含'剪刀','村长','村長'
                    if (lowerCaseBody.includes('scissors') || lowerCaseBody.includes('剪刀') || lowerCaseBody.includes('村长') || lowerCaseBody.includes('村長')) {
                        choice = 'scissors';
                        count++;
                    }
                    if (count == 1) {
                        //机器随机从石头,剪刀,布选一个
                        machine = choices[getRandomInt(3)];
                        result = results[choice][machine];
                        sendComment(txData, result);
                        //如果玩家赢了
                        if (result == rock_win || result == paper_win || result == scissors_win) {
                            //给玩家点赞
                            sendVote(txData);
                            rps_result = "win"
                        } 
                        //如果平局
                        else if (result == rock_tie || result == paper_tie || result == scissors_tie) {
                            rps_result = "tie";
                        } 
                        //如果玩家输了
                        else {
                            rps_result = "lose"
                        }
                    }
                }
            }
        }

如果也看不明白代码,那看猜拳胜负的数据,毕竟数据不说谎。

从11月份以来,总共1061次猜拳。
胜:360 次
平:362 次
输:339 次



可以从数据中看出,玩家输的机率是最低的,只有32%

所以小卖部没有黑幕!请大家放心来玩耍吧~


Posted from my blog with SteemPress : http://ericet.vornix.blog/2019/01/18/%e5%92%8c%e5%b0%8f%e5%8d%96%e9%83%a8%e7%8c%9c%e6%8b%b3%e8%b5%a2%e7%9a%84%e6%9c%ba%e7%8e%87%e6%98%af%e5%a4%9a%e5%b0%91%ef%bc%9f/

Sort:  

从来没猜过啊?怎么猜?

Posted using Partiko Android

回复@teamcn-shop的帖子或者回复就行了

Posted using Partiko iOS

@ericet给您叫了一份外卖!

@kidsreturn 小兔子 迎着飓风 骑着共享单车给您送来
美味的和牛

吃饱了吗?跟我猜拳吧! 石头,剪刀,布~

如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex

石头

Posted using Partiko iOS


You lose! 你输了!愿赌服输,请给我点赞~

石头!

Posted using Partiko Android


You lose! 你输了!愿赌服输,请给我点赞~





This post has been voted on by the SteemSTEM curation team and voting trail in collaboration with @curie.

If you appreciate the work we are doing then consider voting both projects for witness by selecting stem.witness and curie!

For additional information please join us on the SteemSTEM discord and to get to know the rest of the community!

村长
刚刚看到O神的文章
总觉得你们文章很相似。

Posted using Partiko Android

我们都是程序员嘛

Posted using Partiko iOS

@also.einstein给您叫了一份外卖!

@kadishakho 卡姐 迎着沙尘暴 搭着巴士给您送来
心太软

吃饱了吗?跟我猜拳吧! 石头,剪刀,布~

如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex

剪刀,我赢了!

Posted using Partiko Android


You lose! 你输了!不给我点赞,你就再吃我一拳~

石头

Posted using Partiko iOS


It’s a tie! 平局!再来!下回我再出拳头!


It’s a tie! 平局!再来!在猜拳界,我还没有输过!

支持小賣部!卡姐除非是懶惰還是其他原因沒有玩猜拳,贏得機率也會是50%對50%喔!加油

Posted using Partiko Android

加油卡姐!

Posted using Partiko iOS

帅哥/美女!想一展歌喉吗?好声音@cn-voice欢迎你~假如我的留言打扰到你,请回复“取消”。

开诚布公~我相信小卖铺(。・ω・。)ノ♡

Posted using Partiko Android

谢谢朱师傅

Posted using Partiko iOS

哦……原来石头是软哥,布是米高,剪刀是村长……这是为什么呢……?😊

Posted using Partiko Android

随机的,纯粹是为了好玩

Posted using Partiko iOS

Thank you so much for participating the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64243.42
ETH 3152.93
USDT 1.00
SBD 4.28