Ejemplo n.º 1
0
  private void theirBetAction(PerformedAction performedAction) {
    theirBetsThisStreet += performedAction.getAmount();

    double potBet =
        (double) performedAction.getAmount() / (brain.potSize - performedAction.getAmount());

    if (potBet < 0.2) return;

    theirRaiseHistory[currentState.ordinal()].add(performedAction.getAmount());

    double PFR = adjustPFR(maj.getPFR());
    double AGGRO = adjustAggro(maj.getAggression());
    double AGGROFREQ = adjustAggroFreq(maj.getAggressionFrequency());

    double logFactor =
        HelperUtils.logisticSmall(3.0, 3.0, potBet)
            * Math.min(
                100.0,
                (HelperUtils.logistic(400.0, 400.0, performedAction.getAmount()) + 300.0) / 4);

    if (currentState == GameState.PREFLOP) {
      changeEquity -= pfRaiseFactor * logFactor / PFR;
    } else {
      changeEquity -= pfRaiseFactor * logFactor / AGGROFREQ;
    }

    changeEquityCall = 0.0;
  }
Ejemplo n.º 2
0
  private void theirRaiseAction(PerformedAction performedAction) {

    double potBet =
        (double) (performedAction.getAmount() - theirBetsThisStreet)
            / (brain.potSize - performedAction.getAmount());
    if (potBet < 0.2) {
      theirBetsThisStreet += performedAction.getAmount();
      return;
    }

    theirRaiseHistory[currentState.ordinal()].add(performedAction.getAmount());

    double PFR = adjustPFR(maj.getPFR());
    double AGGRO = adjustAggro(maj.getAggression());
    double AGGROFREQ = adjustAggroFreq(maj.getAggressionFrequency());

    double logFactor =
        HelperUtils.logisticSmall(3.0, 3.0, potBet)
            * Math.min(
                100.0,
                (HelperUtils.logistic(
                            400.0, 400.0, performedAction.getAmount() - theirBetsThisStreet)
                        + 300.0)
                    / 4);

    double THREEB = maj.get3BetRate();
    double TWOB = maj.get2BetRate();

    if (myRaiseHistory[currentState.ordinal()].size() == 1
        && theirRaiseHistory[currentState.ordinal()].size() == 1) {
      logFactor *=
          1.0
              + (0.2 - TWOB)
                  * Math.min(100.0, myRaiseHistory[currentState.ordinal()].get(0))
                  / 30.0;
    } else if (theirRaiseHistory[currentState.ordinal()].size() == 2) {
      logFactor *= 1.0 + (0.25 - THREEB) * 1.5;
    } else if (theirRaiseHistory[currentState.ordinal()].size() >= 3) {
      logFactor *= 1.0 + (0.25 - THREEB) * 3.0;
    }

    if (currentState == GameState.PREFLOP) {
      changeEquity -= pfRaiseFactor * logFactor / PFR;
    } else {
      changeEquity -= pfRaiseFactor * logFactor / AGGROFREQ;
    }

    changeEquityCall = 0.0;
    theirBetsThisStreet += performedAction.getAmount();
  }