New issue 30 by mihanovik: when All-in sum is a little more then amount to
call, other players should't call this difference
http://code.google.com/p/opentestbed/issues/detail?id=30
Player 1 (1$)
Player 2 (2$)
Player 3 (2$)
p1 small blind 0.1$ (0.1$ , 0$, 0$)
p2 big blind 0.2$ (0.1$, 0,2$,0$)
p3 call 0.2$ (0.1$, 0,2$, 0,2$)
p1 calls 0.1 (0.2$, 0,2$, 0,2$)
p2 raises 0.6$ (0.2$, 0.8$, 0,2$)
p3 calls 0.6$ (0.2$, 0.8$, 0,8$)
p1 goes all-in (1$, 0,8$, 0.8$) (p1 calls 0.6$ and bets 0.2$ (but this is'
not raise (sum is to small) so it's all in, but other still should call 0.2
$), but in opentestbed next stage is occurred without calls from other.
PublicGameInfo.java
public void update(Action act, int s) {
...
if (act.isAllInPass()) {
+ if (getPlayer(s).getBankRoll() > getAmountToCall(s)) {
+ this.lastToAct = previousActivePlayer(s);
+ this.lastAggressor = s;
+ numRaises++;
+ }
- potManager.addToPot(s, act.getAmount());
+ potManager.addToPot(s, getPlayer(s).getBankRoll()); // this variant works
for me better, because act.getAmount() returns 0 when bot returns
Action.allInPassAction()
getPlayer(s).update(act);
this.toAct = nextActivePlayerNotAllIn(getCurrentPlayerSeat());
}
..
Hi Mihanovik,
thanks for providing the patch. I tried to reproduce your scenario first
with a JUnit-Test (see DealerTest.testIssue30), unfortunately I cannot
reproduce this issue.
p2 + p3 are asked for their actions after the all-in of p1 and are both
able to call 0.2.
So just like it should be.
Right now I won't include your patch because everything looks allright, but
maybe you can put up another scenario, where your patch is needed ?
Hello bluegaspode,
This test works strange for me.
It did't ask big blind player to act in preflop round at all when all other
players calls.
@Test
public void testGameEventsForPlayer() throws Exception {
Deck deck = new MockDeck(new String[] { "Jh 9h 2h 3c 5h" }, new String[]
{ "As Ks|2s 8d|8h Qc" });
PublicGameInfo gameInfo = new PublicGameInfo();
gameInfo.setNumSeats(3);
gameInfo.setPlayer(0, PublicPlayerInfo.create("player0", 200, new
AlwaysCallBot()));
gameInfo.setPlayer(1, PublicPlayerInfo.create("player1", 200, new
AlwaysCallBot()));
BotLoggingDecorator botLog = new BotLoggingDecorator(new AlwaysCallBot(),
true);
gameInfo.setPlayer(2, PublicPlayerInfo.create("player2", 200, botLog));
gameInfo.setBlinds(0.05, 0.10);
Dealer dealer = new Dealer(deck, gameInfo);
dealer.playHand();
}
I added toString implementation to PublicPlayerInfo and PublicGameInfo
object. and added sysout to playStage method
private void playStage() {
while (gameInfo.getNumToAct() > 0) {
int currentPlayerSeat = gameInfo.getCurrentPlayerSeat();
PublicPlayerInfo currentPlayer = gameInfo.getPlayer(currentPlayerSeat);
gameInfo.update(currentPlayer.getBot().getAction(), currentPlayerSeat);
System.out.println(gameInfo);
}
}
so my output is:
Current stage: flop
Table cards =
0.player0: 200.0 | Pot 0.0 | Action = None | Cards : X X
1.player1: 200.0 | Pot 0.0 | Action = None | Cards : X X
2.player2: 200.0 | Pot 0.0 | Action = None | Cards : X X| D
Current stage: flop
Table cards =
0.player0: 199.95 | Pot 0.05 | Action = Small blind | Cards : X X
1.player1: 200.0 | Pot 0.0 | Action = None | Cards : X X
2.player2: 200.0 | Pot 0.0 | Action = None | Cards : X X| D
Current stage: flop
Table cards =
0.player0: 199.95 | Pot 0.05 | Action = Small blind | Cards : X X
1.player1: 199.9 | Pot 0.1 | Action = Big blind | Cards : X X
2.player2: 200.0 | Pot 0.0 | Action = None | Cards : X X| D
Current stage: flop
Table cards =
0.player0: 199.95 | Pot 0.05 | Action = Small blind | Cards : As Ks
1.player1: 199.9 | Pot 0.1 | Action = Big blind | Cards : 2s 8d
2.player2: 199.9 | Pot 0.1 | Action = Call | Cards : 8h Qc| D
Current stage: flop
Table cards =
0.player0: 199.9 | Pot 0.1 | Action = Call | Cards : As Ks
1.player1: 199.9 | Pot 0.1 | Action = Big blind | Cards : 2s 8d
2.player2: 199.9 | Pot 0.1 | Action = Call | Cards : 8h Qc| D
Current stage: postFlop
Table cards = Jh 9h 2h
0.player0: 199.9 | Pot 0.1 | Action = Check | Cards : As Ks
1.player1: 199.9 | Pot 0.1 | Action = Big blind | Cards : 2s 8d
2.player2: 199.9 | Pot 0.1 | Action = Call | Cards : 8h Qc| D
As you can see player1 posted BB and didn't act in preflop anymore. The
same issue you can see by playerTestLog1.txt log.
I checked CashGameConsoleStarter have this problem too.
Full Tilt Poker Game #23732737019074: Table OpenTestBed - $0.01/$0.02 -
Limit Hold'em - 02:42:09 EET - 2010/11/14
Seat 1: Agt 1 (DemoBot/AlwaysCallBot) ($2.00)
Seat 2: Agt 2 (DemoBot/AlwaysCallBot) ($2.00)
Seat 3: Agt 3 (DemoBot/AlwaysCallBot) ($2.00)
Agt 2 (DemoBot/AlwaysCallBot) posts the small blind of $0.01
Agt 3 (DemoBot/AlwaysCallBot) posts the big blind of $0.02
The button is in seat #1
*** HOLE CARDS ***
Dealt to Agt 1 (DemoBot/AlwaysCallBot) [Js 9d]
Dealt to Agt 2 (DemoBot/AlwaysCallBot) [As Kd]
Dealt to Agt 3 (DemoBot/AlwaysCallBot) [5c 8s]
Agt 1 (DemoBot/AlwaysCallBot) calls $0.02
Agt 2 (DemoBot/AlwaysCallBot) calls $0.01
*** FLOP *** [9c Kh 5s]
..
I am very thankful to this project, much easer to work for meerkat api bot
development.
Close this issue. Those are my own mistakes. Just cloned fresh opentesbed
version and all works well. Sorry for that :)
Comment #4 on issue 30 by bluegaspode: when All-in sum is a little more
then amount to call, other players should't call this difference
http://code.google.com/p/opentestbed/issues/detail?id=30
(No comment was entered for this change.)