三国杀吧 关注:3,403,754贴子:88,470,011
求助

王荣的摸牌期望怎么算的

只看楼主收藏回复



来自Android客户端1楼2022-12-06 10:01回复
    王荣主技能—丰姿


    IP属地:陕西来自Android客户端3楼2022-12-06 10:04
    回复
      垃圾将


      IP属地:江苏来自iPhone客户端5楼2022-12-06 10:04
      回复
        不会


        IP属地:广东来自Android客户端6楼2022-12-06 10:05
        回复
          import random
          import numpy as np
          from itertools import product, combinations
          # 生成牌堆
          pile = []
          for i in range(1, 14):
          pile += [i] * 12
          pile += [5, 5, 12, 12]
          def shuffle():
          return random.shuffle(pile)
          def simulation():
          shuffle()
          last_card = None
          result = []
          for card in pile:
          result.append(card)
          if last_card is None:
          last_card = card
          else:
          if card == last_card:
          break
          elif card > last_card and last_card <= 7:
          last_card = card
          continue
          elif card < last_card and last_card >= 8:
          last_card = card
          continue
          else:
          break
          return result
          if __name__ == '__main__':
          N = 10000
          r = []
          for i in range(N):
          result = simulation()
          r.append(len(result))
          mean = np.mean(r)
          std = np.std(r)
          m = np.max(r)
          print(mean, std, m)


          IP属地:黑龙江来自Android客户端7楼2022-12-06 10:10
          收起回复
            1/(2e^-0.5-1)代码楼上


            IP属地:黑龙江来自Android客户端8楼2022-12-06 10:13
            回复
              不是2吗,2后面跟A


              IP属地:江苏来自Android客户端9楼2022-12-06 10:20
              收起回复
                很多时候可能就是三张


                IP属地:内蒙古来自Android客户端10楼2022-12-06 10:22
                回复
                  4.8左右


                  IP属地:英国来自Android客户端11楼2022-12-06 10:22
                  回复
                    期望是4吧


                    IP属地:浙江来自iPhone客户端12楼2022-12-06 11:12
                    回复
                      4.2左右


                      IP属地:浙江来自iPhone客户端13楼2022-12-06 11:15
                      回复
                        这个主要还是看玩的人的阳寿了


                        IP属地:江苏来自iPhone客户端14楼2022-12-06 11:46
                        回复
                          会玩的王荣就是160


                          IP属地:广东来自Android客户端15楼2022-12-06 11:56
                          回复
                            我王荣已关


                            IP属地:河北来自Android客户端16楼2022-12-06 12:28
                            回复
                              王荣【吉占】的摸牌期望是 55592826/24910339 + 2 ≈ 4.23171695897033。


                              IP属地:安徽来自Android客户端17楼2022-12-06 14:07
                              回复