deanyxu / opentestbed

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

big blind and bet should increment numRaises #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Poker academy:
HAND #171
bot1 blinds $0.50
bot2 blinds $1

now, for bot1 gameInfo.getNumRaises() returns 1 in poker academy pro, and 
returns 0 in opentestbed.

I am not sure that big blind is actually raise, but academy knows better what 
getNumRaises() should do.

PublicGameInfo.java

 public void update(Action act, int s) {
 ...
  } else if (act.isBigBlind()) {
  potManager.addToPot(s, act.getAmount());
  getPlayer(s).update(act);
  this.toAct = nextActivePlayerNotAllIn(getCurrentPlayerSeat());
  this.lastAggressor = s;
+ numRaises++;// Poker academy thinks that, big blind is a raise too
  }
 ...

 Poker academy pro also increment numRaises after bet actions too.

 PublicGameInfo.java
 public void update(Action act, int s) {
 ...
 } else if (act.isBet()) {
  potManager.addToPot(s, act.getAmount());
  getPlayer(s).update(act);
-  // Bet from BigBlind PreFlop is considered a raise
+  //bet is considered a raise
-  if (stage == Holdem.PREFLOP && numRaises == 0 && s == bigBlindSeat) {
    numRaises++;
-  }
  if (act.getAmount() > minRaise) {
    minRaise = act.getAmount();
  }
  this.toAct = nextActivePlayerNotAllIn(getCurrentPlayerSeat());
            this.lastToAct = previousActivePlayer(s);
            this.lastAggressor = s;
        }

Those fixes should help FellOmen_2 to work correctly.

Original issue reported on code.google.com by mihano...@gmail.com on 6 Nov 2010 at 3:50

GoogleCodeExporter commented 8 years ago
Hi guy, 
I'd like to implement this change, but this might influence the recorded 
Weka-Model of MCTSBot.
Do you know how CSPoker implemented NumRaises ?

Easiest thing might be to just recreate the WekaModel after I committed the 
patch, but I don't know how to do it (nor do I have the original HandHistories 
you used) ?

Original comment by bluegasp...@gmail.com on 13 Nov 2010 at 9:39

GoogleCodeExporter commented 8 years ago
I do not know how CSPoker works, but i i've planned to learn it. So you can 
wait, until that happens, and then implement NumRaises without breaking MCTSBot.

Original comment by mihano...@gmail.com on 14 Nov 2010 at 1:16

GoogleCodeExporter commented 8 years ago
This issue was closed by revision abc30a54f8.

Original comment by bluegasp...@gmail.com on 14 Nov 2010 at 10:52

GoogleCodeExporter commented 8 years ago
I just realized, that MCTSBot isn't calling #getNumRaises at all as it keeps 
its own statistics.
Change is thus safe (makes MCTSBot play a little bit less aggressive).

I checked against PA too and made same changes to your proposal:
- getNumRaise=1 already after small blind
- getNumRaises gets reset after each round, I implemented that too.

- some more adjustments to keep JUnit-Tests green (the logic to detect the 
possible bigblind-action preflop, looks at numRaises).

Original comment by bluegasp...@gmail.com on 14 Nov 2010 at 10:57