Skip to main content
added 360 characters in body
Source Link
Loc Nguyen
  • 503
  • 3
  • 6

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant. You will also be able to rake sidepots in proper sequence if you need to.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Calculating sidepots at any point in the hand based on player chip contribution is another way and probably the intuitive way. However, you have to remember to (a) keep a side count of miscellaneous dead money and (b) include contributions from players that have folded earlier in the hand (the biggest downside of the contribution method, in my opinion).

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant. You will also be able to rake sidepots in proper sequence if you need to.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant. You will also be able to rake sidepots in proper sequence if you need to.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Calculating sidepots at any point in the hand based on player chip contribution is another way and probably the intuitive way. However, you have to remember to (a) keep a side count of miscellaneous dead money and (b) include contributions from players that have folded earlier in the hand (the biggest downside of the contribution method, in my opinion).

added 74 characters in body
Source Link
Loc Nguyen
  • 503
  • 3
  • 6

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant. You will also be able to rake sidepots in proper sequence if you need to.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant. You will also be able to rake sidepots in proper sequence if you need to.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.
deleted 2 characters in body
Source Link
Loc Nguyen
  • 503
  • 3
  • 6

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.

Coding sidepot management from "sidepot rules" is not very easy. Having done this myself, I'll give a general algorithm in two phases. This approach doesn't care about pot sizes, so any overlay to the pot, such as penalty blinds, is irrelevant.

Manage Sidepots

  1. Manage the sidepots at the end of each street/round. The number of new sidepots is simply one less than the number of different player bet totals, after returning any uncalled bets to the last aggressor.
  2. Keep a list of the last sidepot each player is eligible to win.

Award Sidepots

  1. Evaluate hands, building a list of hand ranks. If the game is High/Low Split (e.g. 8 or Better), do all Low awarding before any High.
  2. Going through your sidepots, build a list of winners of a particular sidepot (the list will consist of a single player unless there are ties). These winners should fit the eligibility built in the managed phase. Be careful not to award ineligible players shares of pots for which they tie by hand rank (an easy mistake that will depend on your hand evaluator).
  3. Award each winner his down-rounded share of each sidepot, half of that if this is a Low award, taking the award amount out of that sidepot (so that when you run High after Low, you don't have to deal with the logic of splitting).
  4. Distribute the remainder by share. You may want to start from the small blind or there will be a bias for the zeroith seat. If you do steps 3 and 4 right, there should be no round-off errors.
deleted 2 characters in body
Source Link
Loc Nguyen
  • 503
  • 3
  • 6
Loading
Source Link
Loc Nguyen
  • 503
  • 3
  • 6
Loading