OK論壇

 找回密碼
 註冊
查看: 3837|回復: 5

骰子機的機率

[複製鏈接]

該用戶從未簽到

發表於 2008-10-7 12:40:43 | 顯示全部樓層 |閱讀模式
骰子機的機率                                                                                                                                                                                                                                                                                                                        這幾個星期以來 一直在研究腳本
骰子機 投下三個骰子點數合為大於9為大 小於9為小 等於9為中 三數相同為豹子
為了計算骰子機的勝率賠率 發現到

   點數合   :   3      4     5      6      7        8        9      10
機率/216  :    1     3     6     10    15      21      25      27
   點數合   :  18   17   16     15    14     13      12      11

由上可知: 小之機率為  56/216-2/216(因為111 222為豹子而不是小)=54/216
                中之機率為  25/216-1/216(因為333算豹子而不是中)=24/216
                大之機率為135/216-3/126(因為444 555 666為豹子而不是大)=132/216
             豹子之機率為 6/216

大的機率比小還的多太多  但是大和小的獎品卻是一樣  實在不是很公平
按照機率理論來講 大之機率為132/216>1/2 獎品確是2倍
只要賭大很多次之後 勢必是會賺 然而賭小則會輸很慘
這樣子分析後 覺得好像有點問題呢!

且不明白 為何要以9為中心 這種比大小應以10.5為中心較來的公平吧
所以想了一想  是否該修正一下腳本會比較好呢  了解腳本的玩家應該會知道
賭大是會贏比較多吧 也許


附上腳本

//瘋狂骰子樂
//完全由︴流浪者×夜∥大g自創之腳本
//如要轉載~請勿刪除此附錄!
//我是不知道有沒有人寫過,我只是想到..所以寫來用的~順便分享!

prontera.gat,163,178,4    script    瘋狂骰子-管理員    98,{
  mes "[瘋狂骰子-管理員]";
  mes "歡迎光臨,瘋狂骰子遊樂場.";
  mes "這裡主要是提供骰子賭博遊戲.";
  mes "你可以賭大賭小都沒問題!";
  mes "押金從1枚代幣~5000枚代幣.";
  mes "每一枚代幣相當於1000元.";
  mes "你目前的代幣數為: "+coin+" 枚";
  next;
  menu "我要玩玩看!",Play,"我要買代幣.",Buymo,"代幣換錢.",Change,"好貴唷,我不玩!",Giveup;

//***************玩的部分***************
Play:
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├●┤├●┤├●┤";
  mes "└┴┘└┴┘└┴┘";
  mes "我將會搖這三個骰子.";
  mes "然後你猜這三個骰子是大還是小!";
  next;
  mes "[瘋狂骰子-管理員]";
  mes "大以九為界線,大於九則是'大'.";
  mes "小以九為界線,小於九則是'小'.";
  mes "如果三個骰子點數相加等於九則為'中'.";
  mes "如果三個骰子一樣,我們稱它'豹子'.";
  next;
  mes "[瘋狂骰子-管理員]";
  mes "你猜是大還是小呢?";
  mes "還是豹子或傻子呢?";
  mes "我這裡賠率是這樣算的!";
  mes "豹子就一賠五.";
  mes "傻子就一賠三.";
  mes "如猜中大或小,則一賠二";
  next;
  mes "[瘋狂骰子-管理員]";
  mes "你要買什麼呢?";
  mes "注意!代幣不能押超過5000枚!";
  mes "代幣的庫存量也不能少於你輸入的!";
  input @coin1;
  if(coin<@coin1) goto Error;
  if((@coin1==0)||(@coin1>5000)) goto Error;
  next;
  menu "大  1:2",Big,"小  1:2",Small,"中  1:3",Center,"豹子  1:5",Puma;

//**大**
Big:
  set coin,coin-@coin1;
  set @mose,1;
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├●┤├●┤├●┤";
  mes "└┴┘└┴┘└┴┘";
  mes "要搖骰子囉!";
  next;
  menu "搖骰子",Wng;

Mo1:
  if(@dice1+@dice2+@dice3<9) goto Lose;
  mes "此盤..你贏了!";
  set coin,coin+@coin1*2;
  mes "你總共贏 "+@coin1*2+" 枚.";
  mes "已經把代幣給你囉!";
  close;
  end;
//**小**
Small:
  set coin,coin-@coin1;
  set @mose,2;
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├●┤├●┤├●┤";
  mes "└┴┘└┴┘└┴┘";
  mes "要搖骰子囉!";
  next;
  menu "搖骰子",Wng;

Mo2:
  if(@dice1+@dice2+@dice3>9) goto Lose;
  mes "此盤..你贏了!";
  set coin,coin+@coin1*2;
  mes "你總共贏 "+@coin1*2+" 枚.";
  mes "已經把代幣給你囉!";
  close;
  end;
//**中**
Center:
  set coin,coin-@coin1;
  set @mose,3;
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├●┤├●┤├●┤";
  mes "└┴┘└┴┘└┴┘";
  mes "要搖骰子囉!";
  next;
  menu "搖骰子",Wng;
Mo3:

  if(@dice1+@dice2+@dice3!=9) goto Lose;
  mes "此盤..你贏了!";
  set coin,coin+@coin1*3;
  mes "你總共贏 "+@coin1*3+" 枚.";
  mes "已經把代幣給你囉!";
  close;
  end;
//**豹子**
Puma:
  set coin,coin-@coin1;
  set @mose,4;
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├●┤├●┤├●┤";
  mes "└┴┘└┴┘└┴┘";
  mes "要搖骰子囉!";
  next;
  menu "搖骰子",Wng;

Mo4:
  if((@dice1!=@dice2)||(@dice1!=@dice3)||(@dice2!=@dice3)) goto Lose;
  mes "此盤..你贏了!";
  set coin,coin+@coin1*5;
  mes "你總共贏 "+@coin1*5+" 枚.";
  mes "已經把代幣給你囉!";
  close;
  end;

//**搖骰子**
Wng:
  set @dice1,rand(5)+1;
  set @dice2,rand(5)+1;
  set @dice3,rand(5)+1;
  if(@dice1==1) set @dice11$,"1";
  if(@dice1==2) set @dice11$,"2";
  if(@dice1==3) set @dice11$,"3";
  if(@dice1==4) set @dice11$,"4";
  if(@dice1==5) set @dice11$,"5";
  if(@dice1==6) set @dice11$,"6";
  if(@dice2==1) set @dice22$,"1";
  if(@dice2==2) set @dice22$,"2";
  if(@dice2==3) set @dice22$,"3";
  if(@dice2==4) set @dice22$,"4";
  if(@dice2==5) set @dice22$,"5";
  if(@dice2==6) set @dice22$,"6";
  if(@dice3==1) set @dice33$,"1";
  if(@dice3==2) set @dice33$,"2";
  if(@dice3==3) set @dice33$,"3";
  if(@dice3==4) set @dice33$,"4";
  if(@dice3==5) set @dice33$,"5";
  if(@dice3==6) set @dice33$,"6";
  mes "[瘋狂骰子-管理員]";
  mes "(經過一陣劇烈的搖晃後...)";
  next;
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├"+@dice11$+"┤├"+@dice22$+"┤├"+@dice33$+"┤";
  mes "└┴┘└┴┘└┴┘";
  mes "以上骰子已經開盤啦!";
  if(@mose==1) goto Mo1;
  if(@mose==2) goto Mo2;
  if(@mose==3) goto Mo3;
  if(@mose==4) goto Mo4;


//***************輸的部分***************
Lose:
  next;
  mes "[瘋狂骰子-管理員]";
  mes "┌┬┐┌┬┐┌┬┐";
  mes "├"+@dice11$+"┤├"+@dice22$+"┤├"+@dice33$+"┤";
  mes "└┴┘└┴┘└┴┘";
  mes "以上骰子已經開盤啦!";
  if(@mose==1) mes "你賭的是大!所以你輸了.";
  if(@mose==2) mes "你賭的是小!所以你輸了.";
  if(@mose==3) mes "你賭的是中!所以你輸了.";
  if(@mose==4) mes "你賭的是豹子!所以你輸了.";
  close;
  end;

//***************離開部分***************
Giveup:
  mes "[瘋狂骰子-管理員]";
  mes "好吧!掰掰~";
  close;
  end;

Error:
  mes "[瘋狂骰子-管理員]";
  mes "你輸入的數目有錯誤,請重新輸入.";
  close;
  end;

//***************買代幣部分***************
Buymo:
  mes "[瘋狂骰子-管理員]";
  mes "請輸入你要買的代幣數.";
  mes "如輸入錯誤,則會跳開.";
  input @coin2;
  if(@coin2*1000>Zeny) goto Error;
  set Zeny,Zeny-@coin2*1000;
  set coin,coin+@coin2;
  next;
  mes "[瘋狂骰子-管理員]";
  mes "你目前的代幣數為: "+coin+" 枚";
  mes "你目前的金錢數為: "+Zeny+" 元";
  close;
  end;

//***************代幣換錢部分***************
Change:
  mes "[瘋狂骰子-管理員]";
  mes "你目前的代幣數為: "+coin+" 枚";
  mes "請輸入你要換的金錢數.";
  mes "如輸入錯誤,則會跳開.";
  input @coin2;
  if(@coin2>coin) goto Error;
  if(@coin2*1000>(1000000000-Zeny)) goto Error;
  set Zeny,Zeny+@coin2*1000;
  set coin,coin-@coin2;
  next;
  mes "[瘋狂骰子-管理員]";
  mes "你目前的代幣數為: "+coin+" 枚";
  mes "你目前的金錢數為: "+Zeny+" 元";
  close;
  end;
}

該用戶從未簽到

發表於 2008-10-8 13:24:02 | 顯示全部樓層
原來還有這種機率問題
大大真厲害~我也來研究研究
回復 支持 反對

使用道具 舉報

頭像被屏蔽

該用戶從未簽到

發表於 2009-3-28 19:40:53 | 顯示全部樓層
提示: 作者被禁止或刪除 內容自動屏蔽
回復 支持 反對

使用道具 舉報

頭像被屏蔽

該用戶從未簽到

發表於 2009-4-27 11:38:52 | 顯示全部樓層
提示: 作者被禁止或刪除 內容自動屏蔽
回復 支持 反對

使用道具 舉報

頭像被屏蔽

該用戶從未簽到

發表於 2009-4-27 12:11:35 | 顯示全部樓層
提示: 作者被禁止或刪除 內容自動屏蔽
回復 支持 反對

使用道具 舉報

該用戶從未簽到

發表於 2011-1-27 01:11:10 | 顯示全部樓層
謝謝分享~ 希望用的成功
回復 支持 反對

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|OK討論區

GMT+8, 2024-5-8 06:35 AM , Processed in 0.057549 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回復 返回頂部 返回列表