RecPoker Forums

Find answers, ask questions, and connect with our community!

  • Noob question about side-pots, for poker simulator project

    Posted by firegazer on January 11, 2022 at 4:41 am

    Apologies if this is a FAQ. I’ve checked lots of sites on the internet, and they don’t seem to answer this one. I’m writing a poker simulator, and want to get the basic rules correct.

    A has 60 chips, B has 110 chips, C has 210 chips.

    All 10 players round the table bet/call 10 chips pre-flop.

    Flop betting: A goes all-in for another 50, B raises all-in for 100, C calls, everyone else folds.

    We now have 3 ‘virtual’ piles of chips:

    a) a ‘main’ pot (A:50, B:50, C:50) 150

    b) a ‘side’ pot (—-, B:50, C:50) 100

    c) the orphaned chips from everyone else: 70

    As there’s only one player left in this deal with chips, there’s no more betting, so I fast-forward through the turn and river, so we can compare hands.

    Then, I award the second pot (side pot) first, with the best hand out of B and C winning the 100.

    Then, I award the first pot (main pot) next, with the best hand out of A, B, and C getting the 150.

    My question is: what happens to the orphaned chips (70)?

    Are they treated as part of the main pot, or side pot, or something else?

    All the examples I can find explain what happens when everyone is all-in, but none seem to address the issue of other chips bet in the same round by players now folded.

    Apologies if the answer is obvious, but I’d be grateful for any help.

    Best regards,

    John

    firegazer replied 2 years, 3 months ago 3 Members · 6 Replies
  • 6 Replies
  • rabman50

    Administrator
    January 11, 2022 at 12:52 pm

    There are no orphaned chips. A is all-in for 50 so his chips go to the main pot along with the 100 chip pot pre-flop. B goes all-in for 100 so 50 is added to the main pot and 50 goes to the side pot. When C calls he is calling 100 chips 50 to the main pot and 50 to the side pot. Main pot = 250 chips which can be won by A, B or C. The side pot contains 100 chips which can be won by B or C.

  • firegazer

    Member
    January 12, 2022 at 2:41 am

    Thanks for the (clear) reply. That’s very helpful.

    If there were 3 players in the side pot, and they continued to bet on the turn (all calling), and then one of them folded in the river betting, I guess those chips from the folded player stay in the side pot, so only winnable by those 2 remaining in the showdown? They wouldn’t be added to the main pot that A is competing for?

    So, in my programme, I create a new pot every time a remaining player can’t fully call, or someone bets/raises more than a remaining player who wants to call can match.

    Any chips folded before that happens stay in the original (main) pot.

    Any chips folded after the new (side) pot is created are added to (left in) the new (side) pot.

    If I need to create another side pot later, then folded chips might be spread across the different pots, depending on when those pots were brought into existence(?)

    I guess the pots contain both the bet of the all-in player, matching bets from players going on to bet further (in side pots), and any bets from players who folded while that pot was the ‘active’ pot?

    Many thanks for any help with this.

    Best regards,

    John

  • rabman50

    Administrator
    January 12, 2022 at 12:05 pm

    Okay let’s add another player to the mix. Same scenario as above except now we have player D with 310 chips.

    Pre-flop betting is the same. A goes all-in for 50, B goes all-in for 100, C and D both call for 100. The main pot has 300 chips 100 from pre-flop betting plus 50 from each of the players which can be won by players A, B, C, and D. The side pot has 150 chips 50 from players B, C, D which can only be won by players B, C, and D. On the turn player C goes all-in for 100 and player D calls. We now have an additional side pot with 200 chips which can only be won by players C or D and so on and so on.

    Player A can only win the main pot (300 chips).

    Player B can only win the main pot and first side pot (300 + 150 chips).

    Player C and D can win the main pot the first side pot and the second side pot (300 + 150 + 200 chips).

    Let’s say that on the turn player C bets 50 not all-in and player D calls the second side pot has 100 chips. On the river player C checks and player D goes all-in. If player C folds player D is immediately awarded the second side pot. If player C calls player D would get back the 100 chips over and above player C’s call.

    You have to really respect dealers who easily make this happen. And you have to really pay attention in a home game.

  • firegazer

    Member
    January 13, 2022 at 9:25 am

    Thanks for that further explanation. I think I get it, now, and I agree with your comments about the level of dealer skills involved, particularly as any errors are likely to be catastrophic, especially if not caught straight away!

    My last example for your consideration is an extension of the last example in your reply, where this time we have one more player going through to the river (now C + D + E). D bets 50, E calls, C folds. D and E showdown. I’m guessing the money C put into the second side pot stays there?

    In my programme, I’m keeping track of each pot created by having values for each of the seats/players plus an ‘orphaned’ amount. Amounts for a player mean two things: 1) this player still has a right to this pot, and 2) how many of the chips the player put in (to check if the betting round is over, or how much more this player needs to put in to call).

    Here’s my understanding (in a spreadsheet!) of what things look like before and after C folds.

    After C folds, the three pots have the same amount, but C has been stripped out of all three pots, and C’s previous bets have been moved to ‘orphaned’ in each pot.

    So, this is the same as your last example, but instead of D winning the second pot by dint of C folding, D wins (maybe) by showdown with E.

    I think this all works for me, now. The way I was modelling it seemed a good way to do it for the programme, but may have confused me a bit 🙂

    Thanks, again.

    John

  • binkley

    Member
    January 16, 2022 at 11:58 pm

    I’d like to point out an important concept. Once a player has placed money into the pot (either by betting or calling a bet), that money now belongs to whoever eventually wins the pot. The player that placed the bet does not have any special claim to that part of the pot.

    Suppose on the flop, player A bets 100 into a pot of 200. Both player B and player C call the 100. The pot going to the turn is now 500. That 500 belongs to whoever eventually wins the hand. Player A does not have any special claim to 100 of the 500. Same with player B and player C.

    I think that the idea that some of the pot is “orphaned” is adding confusion. When someone folds, they are giving up on their right to win the pot. They are not “orphaning” the bets that they placed into the pot. Once the money was placed into the pot, it no longer belonged to them.

  • firegazer

    Member
    January 17, 2022 at 2:06 am

    Thanks, Binkley. I understand.

    I was trying to keep track of a number of things at once, in the programme. By keeping track of money in the pot that was contributed by someone who can no longer win it (because they folded), I was also able to easily see if the others, still in the pot, had contributed equal amounts. If ‘Yes, they have’, and they’ve all had a chance to bet, then the betting is over.

    I’ve programmed up a number of games, and they are normally pretty easy as far as the basic rules are concerned, and they only get hard when the player strategy starts.

    With Poker, I’m finding it quite hard just to get the rules encoded 🙂 I think some of the bits, like side-pots and minimum raises and when an all-in player has triggered a new round of betting, aren’t simple. They seem simple to an experienced player, who has played with them for ages, but when you try to programme them (which demands simple rules), it can take more effort than I expected.

    No worries: I’m nearly there. Thanks for your help.

    Stay safe, and have a great week,

    John

Log in to reply.