Problems I have found.

11 views
Skip to first unread message

bob101

unread,
Nov 14, 2010, 7:01:57 AM11/14/10
to opentestbed
Have have made quite a number of changes to the source so cant upload
them but will give you some problems that I found.

1. If the SB is a dead sb then getnumtoact goes into infinite loop as
lastToact is never currentplayer.

I changed the following code.
PublicGameInfo NewHand()

this.toAct = nextActivePlayerNotAllIn(buttonSeat);
this.lastToAct = previousActivePlayerNotAllIn(bigBlindSeat);

Also change Update() had to remove check for smallblindseat this
should also probably check if BB was all in due to bb
if (stage == Holdem.PREFLOP && lastToAct == smallBlindSeat &&
numRaises == 0) {
lastToAct = bigBlindSeat;
}

have also changed in update this.lastToAct again this was causing
newtoact to go into infinite loop
else if (act.isRaise()) {
potManager.addToPot(s, act.getAmount() + act.getToCall());
getPlayer(s).update(act);
this.numRaises++;
if (act.getAmount() > this.minRaise) {
this.minRaise = act.getAmount();
}
this.toAct = nextActivePlayerNotAllIn(s);
this.lastToAct = previousActivePlayerNotAllIn(s);
this.lastAggressor = s;

Also changed the following in dealer playhand
if (!gameInfo.getPlayer(smallBlindSeat).isSittingOut())

gameInfo.update(Action.smallBlindAction(gameInfo.getSmallBlindSize()),
smallBlindSeat);


Also I think you need to look at the getNumToAct code
becuase you cant just do currentToAct++ because if currentToAct is the
last seat. The code should never get called because hadActedThisRound
will always be true but think it should be fixed.
if (!getPlayer(getBigBlindSeat()).hasActedThisRound()) {
currentToAct++;
numToAct++;
}

That is all for now.

Bob

bluegaspode

unread,
Nov 14, 2010, 6:13:02 PM11/14/10
to opent...@googlegroups.com
Hi Bob, 

how do you get a dead sb ? 
OpenTestbed didn't handle sitting out players so far - as the bots buy in instantly ? Do you have a bot that sits out ?
Also I'm not sure if changes for sitting out players are as easy as the changes you did. For instance there are special rules when a player is allowed to sit in again (which are not so easy when considering 2,3,4-player games).

Without a patch-file it's also very hard to know exactly which places you want to have changed.

Also I'd appreciate a JUnit-Test for your issues - I won't commit changes to the core logic without a JUnit-Test that reproduces the original issue.
Without a test I cannot assure that people won't break stuff that has worked before.

Cheers
Stefan
Reply all
Reply to author
Forward
0 new messages