Vinnaren i pepparkakshustävlingen!
  • 6
  • 7
2007-01-09, 18:18
  #73
Medlem
Rumpelstiltskins avatar
Om du vill läsa på lite om pokerbottar så tycker jag du ska kolla in detta. De är seriösa pokerbotforskare, det finns även möjlighet att testa sin bot mot deras som är en av världens bästa. Sen kan du läsa The Challenge of Poker som beskriver mycket av vad som krävs av en bot, kanske inte så mycket programmering men en del matematisk bakgrund och annat.

När det gäller själva "programmet" så har jag tyvärr inte så mycket att tipsa om, men lycka till och berätta gärna hur det går för dig!
Citera
2007-01-20, 13:25
  #74
Medlem
Intressant tråd!
jag önskar dig lycka till!

Jag har okså tänkt på detta ganska mycket, men jag är inte i närheten av att kunna koda ett sådant här projekt, men själva tanken är rolig.
Hoppas det blir något, du får posta hur projektet går
Citera
2007-01-20, 16:07
  #75
Medlem
Mitt tips är att du sattsar på att programmera för småstackar, att du bara köper in för 10-20bb då är du oftast allin på flop. Du kan ställa in botten mot de andras löshet och hur många som är kvar i handen. Sklansky beskriver detta o sin nya no limit bok då ska du kunna spela på rätt så höga nivåer. Fördelen är att du eliminera bluffar och implicita odds i nolimit
Citera
2007-03-25, 20:18
  #76
Medlem
wiigens avatar
Pokerbot script

Hej!

Behöver hjälp med att fixa mitt script till pokerboten, det som inte fungerar är att den foldar när den kan checka! vad ska jag ändra så de blir rätt?

; Play Party Poker

; Pre-initialization : Set Name of Table
Global $tablename = "Play money 4071811"
Global $inspector = "Connected to """ & $tablename

; Initialize Buttons
; These are the button names you might have to change these for different poker clients
$FoldButton = "AfxWnd42u17";
$CheckButton = "AfxWnd42u25";
$CallButton = "AfxWnd42u25";
$BetButton = "AfxWnd42u19";
$RaiseButton = "AfxWnd42u19";

; Set Coordinate mode to relative to window client area
AutoItSetOption ( "PixelCoordMode", 2 )

; Wait for the window of table to become active
WinWaitActive($tablename)

; Main Loop
While WinExists($tablename)
Sleep(300);

$FoldVisible = ControlCommand($tablename, "", $FoldButton, "IsVisible", "");
$RaiseVisible = ControlCommand($tablename, "", $RaiseButton, "IsVisible", "");

if $FoldVisible = 1 then
Sleep(Random(1500, 2500))
$action = GetAction();
if $action = 1 then
; Fold/Check
; if we can check for free, then do that instead of folding
if StringInStr(ControlGetText($tablename, "", $CheckButton), "Check") = 1 then
ControlClick($tablename, "", $CheckButton);
else
ControlClick($tablename, "", $FoldButton);
endif
elseif $action = 2 then
; Check/Call
ControlClick($tablename, "", $CallButton);
elseif $action = 3 then
; Call/Bet
; if we can call then call otherwise bet
if StringInStr(ControlGetText($tablename, "", $CallButton), "Call") = 1 then
ControlClick($tablename, "", $CallButton);
else
ControlClick($tablename, "", $BetButton);
endif
elseif $action = 4 then
; Bet/Raise or Call
if $RaiseVisible = 1 then ; Cannot raise if its capped already -- so just call in that case
ControlClick($tablename, "", $RaiseButton);
else
ControlClick($tablename, "", $CallButton);
endif
endif
endif

WEnd

; Poker Inspector Actions
Func GetAction()
WinActivate ($inspector);

; Make sure we at least have hold cards - if not then do nothing for now
if GotHoleCards() = 0 then
return 0;
endif

;yellow
$color = PixelGetColor (335, 45);
if $color = 16776960 then
WinActivate($tablename);
return 2;
endif

; blue
$color = PixelGetColor (335, 56);
if $color = 65535 then
; sometimes bet or just call 50% of the time
WinActivate($tablename);
return 3;
endif

; green
$color = PixelGetColor (335, 66);
if $color = 65280 then
; If we've got the nuts or close to then sometimes just check 20% of the time
; otherwise raise or reraise
WinActivate($tablename);
return 4;
endif

; red - fold
WinActivate($tablename);
return 1;
EndFunc

; Returns yes=1, no=0
Func GotHoleCards()
$hole1 = PixelGetColor(9,35)
$hole2 = PixelGetColor(50,35)
if ($hole1 = 16777215) and ($hole2 = 16777215) then
return 1
endif
return 0
EndFunc
Citera
2007-03-25, 21:40
  #77
Medlem
Aardwarks avatar
Kanske ska skriva ut
ControlGetText($tablename, "", $CheckButton)

för att se varför denna raden:
StringInStr(ControlGetText($tablename, "", $CheckButton), "Check")

returnerar fel värde.
Citera
2007-03-25, 22:16
  #78
Medlem
wiigens avatar
tog bort , "Check") i scriptet men fick då ett error meddelande när de kom till att den skulle checka istället.
Är nybörjare på detta området och jag säger något konsigt..
Men om du skulle kunna kopiera de gamla och skriva om de till rätt så vore de väldigt shysst.
Citera
2007-03-25, 22:56
  #79
Medlem
wiigens avatar
någon som kan hjälpa mej?
Citera
2007-03-27, 20:58
  #80
Medlem
wiigens avatar
Script till pokerbot

Hej!

Behöver hjälp med att fixa mitt script till pokerboten, det som inte fungerar är att den foldar när den kan checka! vad ska jag ändra så de blir rätt? Förklara gärna noggrant eftersom jag inte är så bra på script.

; Play Party Poker

; Pre-initialization : Set Name of Table
Global $tablename = "Play money 4071811"
Global $inspector = "Connected to """ & $tablename

; Initialize Buttons
; These are the button names you might have to change these for different poker clients
$FoldButton = "AfxWnd42u17";
$CheckButton = "AfxWnd42u25";
$CallButton = "AfxWnd42u25";
$BetButton = "AfxWnd42u19";
$RaiseButton = "AfxWnd42u19";

; Set Coordinate mode to relative to window client area
AutoItSetOption ( "PixelCoordMode", 2 )

; Wait for the window of table to become active
WinWaitActive($tablename)

; Main Loop
While WinExists($tablename)
Sleep(300);

$FoldVisible = ControlCommand($tablename, "", $FoldButton, "IsVisible", "");
$RaiseVisible = ControlCommand($tablename, "", $RaiseButton, "IsVisible", "");

if $FoldVisible = 1 then
Sleep(Random(1500, 2500))
$action = GetAction();
if $action = 1 then
; Fold/Check
; if we can check for free, then do that instead of folding
if StringInStr(ControlGetText($tablename, "", $CheckButton), "Check") = 1 then
ControlClick($tablename, "", $CheckButton);
else
ControlClick($tablename, "", $FoldButton);
endif
elseif $action = 2 then
; Check/Call
ControlClick($tablename, "", $CallButton);
elseif $action = 3 then
; Call/Bet
; if we can call then call otherwise bet
if StringInStr(ControlGetText($tablename, "", $CallButton), "Call") = 1 then
ControlClick($tablename, "", $CallButton);
else
ControlClick($tablename, "", $BetButton);
endif
elseif $action = 4 then
; Bet/Raise or Call
if $RaiseVisible = 1 then ; Cannot raise if its capped already -- so just call in that case
ControlClick($tablename, "", $RaiseButton);
else
ControlClick($tablename, "", $CallButton);
endif
endif
endif

WEnd

; Poker Inspector Actions
Func GetAction()
WinActivate ($inspector);

; Make sure we at least have hold cards - if not then do nothing for now
if GotHoleCards() = 0 then
return 0;
endif

;yellow
$color = PixelGetColor (335, 45);
if $color = 16776960 then
WinActivate($tablename);
return 2;
endif

; blue
$color = PixelGetColor (335, 56);
if $color = 65535 then
; sometimes bet or just call 50% of the time
WinActivate($tablename);
return 3;
endif

; green
$color = PixelGetColor (335, 66);
if $color = 65280 then
; If we've got the nuts or close to then sometimes just check 20% of the time
; otherwise raise or reraise
WinActivate($tablename);
return 4;
endif

; red - fold
WinActivate($tablename);
return 1;
EndFunc

; Returns yes=1, no=0
Func GotHoleCards()
$hole1 = PixelGetColor(9,35)
$hole2 = PixelGetColor(50,35)
if ($hole1 = 16777215) and ($hole2 = 16777215) then
return 1
endif
return 0
EndFunc
Citera
2007-03-27, 21:32
  #81
Medlem
Stockos avatar
Va det nåt fel på din gamla tråd om samma sak? http://www.flashback.org/showthread.php?t=463511

Tråd låst.

/Mod
Citera
  • 6
  • 7

Stöd Flashback

Flashback finansieras genom donationer från våra medlemmar och besökare. Det är med hjälp av dig vi kan fortsätta erbjuda en fri samhällsdebatt. Tack för ditt stöd!

Stöd Flashback