My primary reservation for the given format is the lack of information.
- If I fold, will my AI function still be called, even though game_info.has_folded[my_id] is true? If not, I will lose all further information for the hand.
- Even if I stay in to the end, if I am the first to raise and some players call, others fold, but no one raises, will it ever come back to me so I can poll the struct to see who stayed and who folded? If not I have no way to tell what the effects of my action were.
- If I call someone's big bet, I need to see what they had. Was their hand (number) really bigger than mine or were they bluffing? Or did they just overvalue their hand?
My secondary reservation, which is not quite as much of a problem, is the format.
- Except for some really old variations of poker (which I wasn't aware of until I did some wiki research), a hand of poker contains one or more changes, each accompanied by a round of betting.
- Hold'em and Omaha have pre-flop, flop, turn and river
- 7-card stud and Razz have 5 "streets", some face up, some face down
- Draw has one or more draws before showdown (triple draw has 3 draws for example).
- These changes allow the players to gather more information, both during the hand and over the course of several hands. They also allow more complex patterns of betting.
I say the format is not quite as much of a problem because even a simple version of Draw poker allows a large amount of variation in play. Such complexity might be beyond the scope of a module crafted in only a couple weeks. If the format were to be expanded to include some change during a hand, the value of a hand could easily be kept as a float:
I would like to submit an entry even if things stay as-is, though I would like the questions in my other post answered so I know what assumptions I can make from hand to hand.Code:"Deal" the starting hand (random value between 0 and 1 for each player) Blind betting round (big blind forced bet and responses from everyone) Emulate a "flop" or a "draw" by adding a random value between 0 and 1 to each player's existing hand Normal betting round (players may check) Showdown - highest hand (which is now between 0 and 2) wins
Given:Originally Posted by MK27
- Player A has $20
- Player B has $50
- Player C has $75
- Player A goes all-in (bets his entire $20)
Scenario 1: Players B and C can simply call. The pot now has $60 ($20 from each player). Whoever has the best hand wins the entire pot.
Scenario 2: Player B raises to $50 and Player C calls. $20 of Player B's bet goes to the main pot to match Player A's $20, and the other $30 is placed in a side pot. Player C calls, so $20 more goes into the main pot for a total of $60 and $30 more goes into the side pot to match B's $30. First the side pot goes to B or C, whichever has the better hand, because only B and C contributed to that pot. Next, the main pot goes to the better hand of A, B or C because all 3 contributed to the main pot.
Scenario 3: Player B raises to $50 and Player C re-raises to $75. Exactly like Scenario 2, except the extra $25 that Player C raised would go into a second side-pot. If there are only these three players, Player C gets that $25 back no matter what because only C contributed to the second side pot (he most definitely has the best hand amongst himself).
Scenario 3a: If we add Player D with $100 and he calls the $75, the main pot now has $80 ($20 from each), the first side pot has $90 ($30 each from B, C and D), and the second side pot has $50 ($25 each from C and D). The second side pot of $50 would go to the better hand of C or D because they contributed to it. The first side pot of $90 would then go to B, C or D because they contributed to it. And then the main pot of $80 would go to A, B, C or D.
Actually, all of the popular formats that I am aware of have the same type of All-in rules that I described above. The format Sang-drax is proposing would be considered No Limit, so a player can bet up to their entire stack on any betting round, vs. Limit where there is a limit to how much can be bet, and usually it is a fixed number.Originally Posted by SlyMaelstrom
A $5 limit game means if you want to bet, you must bet $5. If you want to raise, you can raise by $5. If it comes around to you to call, your call will be in an increment of $5. If you want to raise but only have $4 left, you would be considered all-in. Everyone who calls your raise would be calling $5, with $1 from each going to a side pot.
There is also Pot-Limit, which is similar to no-limit (you can bet any amount rather than in steps), but your bet can not be larger than what is currently in the pot (including bets from the current betting round). This betting variation usually limits the betting early in the hand and keeps things a little more conservative.