john1571 / RoboPoker

Arena for poker playing computer programs to play against each other.
1 stars 2 forks source link

Fix payout #33

Closed john1571 closed 1 year ago

john1571 commented 2 years ago

Bug Description All the money left in the pot after a side pot winner takes his cut. Is forfeit.

Causal Issue

7 when re-working payout. I think

To Reproduce You need a side pot to win. Then watch what happens to the rest of the chips.

Additional context Here ELI has won with a set, he takes his cut Pot: 3375 Table: K♦ 2♠ 6♣ Q♦ Q♠ Names: | Adam | Ben | Caleb | Dan | Eli |
Bots: | JoanBot1 | bot3 | bot2 | bot1 | JoanBot1 |
Chips: | 1035 | 180 | 175 | 235 | 0 |
Hands: | A♠ 9♠ | A♣ 3♠ | K♠ 6♠ | -- | 4♠ Q♥ |
Values: | pair | pair | 2 pair | -- | set |
Bets: | 280 | 280 | 280 | fold | 0 |
Stats: Names: | Adam | Ben | Caleb | Dan | Eli |
Last: | 290 | 0 | 0 | -5 | -285 |
Av. D.: | 428 | 0 | -2 | -110 | -315 |
Av. W.: | 428 | 0 | 0 | 0 | 0 |
Av. L.: | 0 | 0 | -5 | -110 | -315 |
Win %: | %100 | %0 | %0 | %0 | %0 |

Now the remaining 1525 should go to Caleb. but it is just tossed away and round 3 starts. Pot: 1525 Table: K♦ 2♠ 6♣ Q♦ Q♠ Names: | Adam | Ben | Caleb | Dan | Eli |
Bots: | JoanBot1 | bot3 | bot2 | bot1 | JoanBot1 |
Chips: | 1035 | 180 | 175 | 235 | 1850 |
Hands: | A♠ 9♠ | A♣ 3♠ | K♠ 6♠ | -- | 4♠ Q♥ |
Values: | pair | pair | 2 pair | -- | set |
Bets: | 280 | 280 | 280 | fold | 0 |
Stats: Names: | Adam | Ben | Caleb | Dan | Eli |
Last: | 290 | 0 | 0 | -5 | -285 |
Av. D.: | 428 | 0 | -2 | -110 | -315 |
Av. W.: | 428 | 0 | 0 | 0 | 0 |
Av. L.: | 0 | 0 | -5 | -110 | -315 |
Win %: | %100 | %0 | %0 | %0 | %0 | Poor caleb.
Round: 3 Pot: 40 Table: Names: | >Adam | Ben | Caleb | Dan | Eli |
Bots: | JoanBot1 | bot3 | bot2 | bot1 | JoanBot1 |
Chips: | 1005 | 170 | 175 | 235 | 1850 |
Hands: | 6♣ 2♥ | 5♥ 3♦ | J♥ 3♠ | Q♣ 5♦ | A♥ Q♠ |
Values: | hi card | hi card | hi card | hi card | hi card |
Bets: | 30 | 10 | 0 | 0 | 0 |

john1571 commented 2 years ago

Side pots. Do this:

get all winners get winner with least chips in pot (A) establish the pot that (A) can be a part of Split that pot up evenly between winners Remove (A) from winners. Repeat until pot or winners is empty.

If pot is empty but winners aren't, get new winners

john1571 commented 1 year ago

I think this is completed.