找回密碼
 立即注册
『海燕策略研究論壇』溫馨提醒您 距离 2026 美 加 墨 世 界 杯 还有
000
:
00
:
00
:
00
吉祥坊吉祥坊KGameKGame
查看: 97|回復: 6

最近很流行的机器人话题,我贴一部分用按键精灵写的代码

[複製鏈接]
發表於 2021-3-11 13:56 | 顯示全部樓層 |閱讀模式

註冊論壇會員,發現更多精彩

您需要 登錄 才可以下載或查看,沒有賬號?立即注册

×
很多平台都有机器人的,这确实是事实,PS ipoker都爆过机器人,像ps 的plo 200都有机器人赢了好像大概200w刀?不过这机器人肯定不是像另外一个帖子提到的什么翻牌前不管任何牌都跟别人all in,假如这是机器人的话,那写这个程序的程序员肯定是个智障。我贴的这个程序去年以前大概能打赢德扑圈的1-2不带anti的级别,总体来讲这个程序打得特别的紧弱,spr>6面对flop的raise它能弃掉底set,在天顺,天花面顶set都会弃掉,所以这程序大概赢率是3bb/100h左右吧,比较弱智,以下是部分源码Function 翻牌(card1, card2, color1, color2, a1, a2, a3, b1, b2, b3, id)Dim flopface,pairface,flashface,wet,power,drawflopface = 牌面(a1, a2, a3, b1, b2, b3)pairface = CInt(Mid(flopface, 1, 1))flashface = CInt(Mid(flopface, 2, 1))straightface= CInt(Mid(flopface, 3, 1))wet=CInt(Mid(flopface, 3, 1))power=牌力(card1,card2,color1,color2,a1,a2,a3,b1,b2,b3)draw=Lib.德扑数学.听牌(card1,card2,color1,color2,a1,a2,a3,b1,b2,b3)if pairface=2 thenif power=12 then翻牌= "6"+CStr(wet)ElseIf power = 4 and card1 >= 12 and card1 >= a1 Then翻牌= "5"+CStr(wet)elseif power=4 and card1<=11 and card1>=a1 then翻牌 = "4" + CStr(wet)ElseIf power >= 1 Then翻牌 = "2" + CStr(wet)ElseIf prepower <= 3 Then//AK翻牌 = "1" + CStr(wet)else 翻牌= "0"+CStr(wet)end ifelseifpairface=1 thenif power>=11 then翻牌= "6"+CStr(wet)elseif power>=4 thenif power=5 and a1<>14 and a2<>14 and a3<>14 and (card1=14 or card2=14) then翻牌= "5"+CStr(wet)elseif card1>=11 and power=4 or power=5 Then翻牌 = "4" + CStr(wet)Else 翻牌 = "2" + CStr(wet)end ifelseif power>=3 or draw>=2 then翻牌 = "2" + CStr(wet)ElseIf power = 2 Then翻牌 = "1" + CStr(wet)else 翻牌= "0"+CStr(wet)end ifelseif flashface=1 thenif power=10 and (card1=14 or card2=14) or power=12 then翻牌= "6"+CStr(wet)elseif power=10 and (card1>=12 or card2>=12) then翻牌= "5"+CStr(wet)elseif power=10 then翻牌= "4"+CStr(wet)elseif card1=14 and color1=b1 or card2=14 and color2=b2 or power=7 or power=8 or card1=13 and color1=b1 and Lib.德扑数学.三取大(a1, a2, a3)=14 or card2=13 and color2=b2 and Lib.德扑数学.三取大(a1, a2, a3)=14 then翻牌= "3"+CStr(wet)elseif power>=3 then翻牌 = "2" + CStr(wet)else 翻牌= "0"+CStr(wet)end ifelseif straightface>=1 thenIf power >= 10 or power = 9 and card1 <> Lib.德扑数学.四取小(card1, a1, a2, a3) and card2 <> Lib.德扑数学.四取小(card2, a1, a2, a3) or power = 9 and Lib.德扑数学.五取大(card1,card2, a1, a2, a3)=14 and Lib.德扑数学.五取小(card1,card2, a1, a2, a3)=10 or power = 9 and Lib.德扑数学.五取大(card1,card2, a1, a2, a3)=14 and Lib.德扑数学.五取小(card1,card2, a1, a2, a3)=5 and card1<>14 and card2<>14 Then翻牌= "6"+CStr(wet)elseif power>=7 then翻牌= "5"+CStr(wet)ElseIf power >= 4 ThenIf card1<=10 and power = 4 Then翻牌 = "2" + CStr(wet)Else 翻牌 = "4" + CStr(wet)End Ifelseif draw>=2 then翻牌= "3"+CStr(wet)elseif power=3 then翻牌 = "2" + CStr(wet)ElseIf power = 2 Then翻牌 = "1" + CStr(wet)else 翻牌= "0"+CStr(wet)end ifelseif power>=8 and card1 <> Lib.德扑数学.四取小(card1, a1, a2, a3) and card2 <> Lib.德扑数学.四取小(card2, a1, a2, a3) or power>=7 and wet>=2 or power=7 and 翻牌两高张()=1 Then翻牌= "6"+CStr(wet)elseif power>=6 then翻牌= "5"+CStr(wet)elseif power>=4 thenIf card1<=10 and power = 4 Then翻牌 = "2" + CStr(wet)Else 翻牌 = "4" + CStr(wet)End Ifelseif draw>=2 then翻牌= "3"+CStr(wet)elseif power=3 then翻牌 = "2" + CStr(wet)elseif power=2 then翻牌 = "1" + CStr(wet)else 翻牌= "0"+CStr(wet)end ifEnd IfIf prepower = 10 Then翻牌 = "0" + CStr(wet)dm.WriteFile "排错.txt", " id=" +id+ CStr(session)End Ifdm.WriteFile id+".txt", "翻牌圈牌力=" + CStr(power)dm.WriteFile id+".txt", "翻牌圈听牌=" + CStr(draw)dm.WriteFile id+".txt", "翻牌圈成对牌面=" + CStr(pairface)dm.WriteFile id+".txt", "翻牌圈同花牌面=" + CStr(flashface)dm.WriteFile id+".txt", "翻牌圈湿度=" + CStr(wet)end functionFunction 牌面(a, b, c, x, y, z)Dim min,mid2,max,flashface,straightface,pairface,wetmin = Lib.德扑数学.三取小(a, b, c)mid2 = Lib.德扑数学.三取中(a, b, c)max = Lib.德扑数学.三取大(a, b, c)flashface = 0straightface = 0pairface = 0wet= 0if a=b and a=c then牌面 = "2000"Exit Functionend ifif max=mid2 or max=min or mid2=min thenpairface=1end ifif max-min<=3 or max-min=4 and min>=10 thenstraightface=1elseif max-min=4 thenstraightface=2end ifif x=y and y=z thenflashface=1elseif x=y or x=z or y=z thenflashface=2end ifif pairface=1 thenif flashface=2 thenwet=1else wet=0end ifelseif flashface=1 and straightface>=1 thenwet=4elseif flashface=1 and straightface=0 thenwet=3elseif flashface=2 and straightface=1 thenwet=3elseif flashface=2 thenwet=2elseif straightface>=1 thenwet=1end if牌面= CStr(pairface)+CStr(flashface)+CStr(wet)+CStr(straightface)end functionfunction 牌力(c1,c2,r1,r2,a,b,c,x,y,z)if Lib.德扑数学.同花(r1,r2,x,y,z)=1 and Lib.德扑数学.顺子(c1,c2,a,b,c)=1 or Lib.德扑数学.四条(c1,c2,a,b,c)=1 then牌力 = 12ElseIf Lib.德扑数学.带A明三(c1, c2, a, b, c) = 1 ThenMessageBox "有带A明三"牌力= 12elseif Lib.德扑数学.葫芦(c1,c2,a,b,c)=1 then牌力= 11elseif Lib.德扑数学.同花(r1,r2,x,y,z)=1 then牌力= 10elseif Lib.德扑数学.顺子(c1,c2,a,b,c)=1 then返回值 = Lib.德扑翻牌圈.牌力(c1,c2,r1,r2,a,b,c,x,y,z)牌力= 9elseif Lib.德扑数学.暗三(c1,c2,a,b,c)>=2 then牌力= 8elseif Lib.德扑数学.暗三(c1,c2,a,b,c)=1 then牌力= 7elseif Lib.德扑数学.明三(c1,c2,a,b,c)=1 then牌力= 5elseif Lib.德扑数学.顶两对(c1,c2,a,b,c)=1 then牌力= 6elseif Lib.德扑数学.中两对(c1,c2,a,b,c)=1 then牌力= 5elseif Lib.德扑数学.底两对(c1,c2,a,b,c)=1 then牌力= 5elseif Lib.德扑数学.超对(c1,c2,a,b,c)=1 then牌力= 4elseif Lib.德扑数学.顶对(c1,c2,a,b,c)=1 then牌力= 3elseif Lib.德扑数学.中对(c1,c2,a,b,c)=1 then牌力= 2elseif Lib.德扑数学.底对(c1,c2,a,b,c)=1 then牌力= 1else 牌力= 0End IfTracePrint "牌力="+CStr(牌力)End Function这是按键精灵写的,我想大部分程序员都可以看懂个大概,看起来像是伪代码,实际上就是源码,想要源码的不用私聊我了,不会回,更不会给的。
海燕策略論壇,迴歸福利不斷
發表於 2021-3-11 14:21 | 顯示全部樓層
看不懂,但觉得很厉害

                               
登錄/註冊後可看大圖

海燕策略論壇,迴歸福利不斷
發表於 2021-3-11 14:31 | 顯示全部樓層
看不懂,但觉得很厉害
海燕策略論壇,迴歸福利不斷
 樓主| 發表於 2021-3-11 14:51 | 顯示全部樓層
这部分代码是对自己手牌在翻牌圈的牌力判断,其实大部分机器人程序都比较弱智,程序员的想法很多时候理论上看起来很容易实现,但实际上你写程序的过程中会碰到各种各样的问题,很难把自己的策略都一一实现,所以这种机器人的核心策略都比较简单机械化,跟“冷扑大师”这种人工智能差距太远,打不赢这种机器人肯定是牌手自己的问题。
海燕策略論壇,迴歸福利不斷
發表於 2021-3-11 15:11 | 顯示全部樓層
再简单的机器人起码不会情绪化,被动严格的遵守纪律··

                               
登錄/註冊後可看大圖

海燕策略論壇,迴歸福利不斷
發表於 2021-3-11 15:30 | 顯示全部樓層
流弊。楼主有为平台编过程序吗?
海燕策略論壇,迴歸福利不斷
發表於 2021-3-11 15:43 | 顯示全部樓層
一般平台就算真有机器人也只是为了填桌,打不打得过真人还另说呢,不用太担心这些。
海燕策略論壇,迴歸福利不斷
您需要登錄後才可以回帖 登錄 | 立即注册

本版積分規則

關閉

福利推荐上一條 /3 下一條

📢 重要聲明

服務條款

本討論區是以即時上載留言的方式運作,論壇對所有留言的真實性、完整性及立場等,不負任何法律責任。 而一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷内容之真實性。 於有關情形下,用戶應尋求專業意見(如涉及醫療、法律或投資/博彩等問題)。 由於本討論區受到「即時上載留言」運作方式所規限,故不能完全監察所有留言,若讀者發現有留言出現問題,請聯絡我們。 論壇有權刪除任何留言及拒絕任何人士上載留言,同時亦有不刪除留言的權利。 切勿撰寫粗言穢語、誹謗、渲染色情暴力或人身攻擊的言論,敬請自律。嚴禁直接以名稱公開批評任何機構或人士,或指名道姓地公開批評任何人仕、機構、公司。 嚴禁干擾或破壞本服務或與本服務相連線之伺服器和網路,破壞正常的對話流程、造成螢幕快速移動,或使本服務其他使用者無法打字,或對其他使用者參加即時交流的能力產生負面影響。 本網站保留一切法律權利。

廣告合作

你於本服務或經由本服務與廣告商進行通訊或商業往來,或參與促銷活動,包含相關商品或服務之付款及交付,以及前開交易其他任何相關條款、條件、保證或陳述,完全為你與前開廣告商之間之行為。 前開任何交易或前開廣告商出現於本服務所生之任何性質的損失或損害,你同意論壇不予負責。

📄 請點擊查看免責權聲明及重要事項

文章及附件由海燕策略研究論壇會員製作,以共享創意署名-非商業性-禁止衍生3.0通用版授權條款釋出。
授權條款所屬的司法管轄領域(通用版),上文連接是一份普通人可以理解的法律文本(許可協議全文)的概要。
© 海燕策略研究論壇 All Rights Reserved.

Archiver|手機版|小黑屋|*海燕策略研究論壇*

GMT+8, 2026-2-11 14:43 , Processed in 0.072211 second(s), 19 queries .

*海燕策略研究論壇*

© 2006-2026 All Rights Reserved.