LarsHeppert / opentestbed

Automatically exported from code.google.com/p/opentestbed
0 stars 0 forks source link

GameInfo.getEligiblePot() is implemented wrong #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Correct behaviour (tracked with a logging-bot in Poker Academy) is as follows:

Player1: Bankroll 1000: Bet 250
Player2: Bankroll 1000: Call 250
Player3: Bankroll 50

getEligiblePot(3)=100

Reasoning: the current mainPot is 500 - but with the current Bankroll of 50
player 3 will get a maximum of 100 from this pot (because if he goes
All-In, a sidepot will be created).

Actually it should be quite simple to implement this:
Just add all otherPlayer.getAmountInPot, but limit these values to
(currentPlayer.getAmountInPot+BankRoll)

Original issue reported on code.google.com by bluegasp...@gmail.com on 27 Mar 2010 at 12:07

GoogleCodeExporter commented 8 years ago
I'll take care of this. I wasn't sure how to implement it when I did it. P.S. 
I'll be
a bit more active for the time being.

Original comment by schatzbe...@gmail.com on 31 Mar 2010 at 3:09

GoogleCodeExporter commented 8 years ago
I made some changes but I'm not convinced its correct for situations where the 
player
in the seat in question has already committed to the pot in the current round 
(for
example when raises were made all around).

Original comment by schatzbe...@gmail.com on 31 Mar 2010 at 4:18

GoogleCodeExporter commented 8 years ago
I'm not sure if the last line is correct 
eligiblePot += getPlayer(seat).getAmountInPot() -
getPlayer(seat).getAmountInPotThisRound();

I'd put in the full amount of the player, not reduced by the 
amountInPotThisRound.

If you look at the SimpleBot.postFlopAction, they have a line:

        // immediate pot odds
        double PO = toCall / (double) (gi.getEligiblePot(ourSeat) + toCall);

As one can also win what he put in the pot already this round I guess. One 
might need
to double check with a dummy-bot in PokerAcademy though.

Original comment by bluegasp...@gmail.com on 31 Mar 2010 at 9:15

GoogleCodeExporter commented 8 years ago

Original comment by bluegasp...@gmail.com on 4 Apr 2010 at 11:13